source: products/SimpleBlog/trunk/skins/SimpleBlog/prefs_simpleblog_form.cpt @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 4.9 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/prefs_main_template/macros/master"
4      i18n:domain="SimpleBlog">
5
6  <metal:block fill-slot="top_slot"
7             tal:define="dummy python:request.set('disable_border',1)" />
8
9<body>
10
11<div metal:fill-slot="prefs_configlet_main"
12     tal:define="errors python:request.get('errors', {})">
13    <h1>SimpleBlog Setup</h1>
14
15    <p>
16    Portal-wide settings.
17    </p>
18
19    <form name="simpleblogForm" method="post"
20                name="pref_simpleblog_set"
21                tal:define="errors options/state/getErrors;props python:here.portal_properties;"
22                tal:attributes="action template/id">
23        <fieldset>
24            <legend>SimpleBlog details</legend>
25            <div class="field"
26                 tal:define="error errors/publishedState | nothing;
27                                         pstate python:here.simpleblog_tool.getPublishedState();
28                                                         allStates python:here.simpleblog_tool.getEntryWorkflowStates(here);
29                                                         reqState request/publishedState|nothing;
30                                                         cursel python:test(reqState,reqState,pstate)"
31                 tal:attributes="class python:test(error, 'field error', 'field')">
32                 
33                                <label>Workflow 'published' state name</label>
34                <div class="formHelp">
35                    Workflow state that is used to filter Blog Entries on the Blog front page. Usually 'published'. <br/>
36                                        Check the workflow for the BlogEntry portal type.
37                </div>
38                <div tal:content="error">Validation error output</div>
39                <select name="publishedState"
40                    size="1"
41                    tal:attributes="tabindex tabindex/next">
42                                        <tal:states tal:repeat="st allStates">
43                                                <option value="1"
44                                                        tal:attributes="selected python:test(st==cursel ,'select', None);
45                                                                value st"
46                                                        tal:content="st">
47                                                        state
48                                                </option>
49                                        </tal:states>
50                    </select>
51            </div>
52                       
53            <div class="field"
54                                tal:define="submitted request/sub|python:0;
55                                        checkit python:test(submitted,request.has_key('createPortletOnBlogCreation'),here.simpleblog_tool.getCreatePortletOnBlogCreation())">
56                <div class="formHelp">
57                        SimpleBlog can create a portlet in the Blog's folder that displays the top most recent entries
58                                        and a list of categories you can search for.
59                </div>
60                                <input type="checkbox"
61                     class="noborder"
62                     id="createPortletOnBlogCreation"
63                     name="createPortletOnBlogCreation"
64                                         tal:attributes="checked python:test(checkit, 'checked', None)" />
65                <label for="createPortletOnBlogCreation">
66                Create a local portlet for newly created Blogs
67                </label>
68            </div>
69
70            <div class="field"
71                 tal:define="error errors/maxItemsInPortlet | nothing;
72                                         items request/maxItemsInPortlet| python:here.simpleblog_tool.getMaxItemsInPortlet()"
73                 tal:attributes="class python:test(error, 'field error', 'field')">
74                                <label>Maximum number of most recent Entries shown in the portlet</label>
75                <div tal:content="error">Validation error output</div>
76                <input name="maxItemsInPortlet" size="2" value="" tabindex=""
77                       tal:attributes="value items;tabindex tabindex/next;" />
78            </div>
79
80            <div class="field" tal:define="cats python:here.simpleblog_tool.getGlobalCategories();
81                                                                                   reqCats request/globalCategories | nothing;
82                             error errors/globalCategories | nothing">
83                <label>Global categories</label>
84                <div class="formHelp">
85                                        Global categories are available to all Blog Entries in the site. One category per line.
86                </div>
87                <textarea cols="30" rows="6" name="globalCategories" tabindex="" tal:attributes="tabindex tabindex/next"><span tal:condition="not: reqCats" tal:replace="python:'\n'.join(cats)"/><span tal:condition="reqCats" tal:replace="reqCats"/></textarea>
88            </div>
89                       
90                        <br/>
91                        <div class="formControls">
92                        <input class="context"
93                               tabindex=""
94                               type="submit"
95                               name="form.button.Save"
96                               value="Save"
97                               i18n:attributes="value"
98                               tal:attributes="tabindex tabindex/next;"
99                               />
100                                <input class="standalone"
101                               tabindex=""
102                               type="submit"
103                               name="form.button.Cancel"
104                               value="Cancel"
105                               i18n:attributes="value"
106                               tal:attributes="tabindex tabindex/next;"
107                               />
108                        </div>
109                <input type="hidden" name="sub" value="1" />
110                <input type="hidden" name="form.submitted" value="1" />
111        </fieldset>
112    </form>
113</div>
114</body>
115</html>
Note: See TracBrowser for help on using the repository browser.