source: products/qPloneComments/tags/2.0/skins/qplonecomments/prefs_recent_comments_form.cpt

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

Building directory structure

File size: 6.0 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xml:lang="en"
3      lang="en"
4      i18n:domain="plone"
5      metal:use-macro="here/prefs_main_template/macros/master">
6        <!--      metal:use-macro="here/main_template/macros/master" -->
7<body>
8
9<div metal:fill-slot="prefs_configlet_main"
10     tal:define="errors python:request.get('controller_state', None).getErrors();">
11
12    <div metal:define-macro="main" i18n:domain="plone">
13    <div class="configlet">
14    <div class="documentEditable">
15
16    <!-- simulating views -->
17    <ul class="contentViews"
18       tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),;
19                   tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];"
20    >
21        <li class="selected"
22            tal:repeat="tab tabs"
23            tal:attributes="class python:tab['name']==template.id and 'selected' or ''">
24        <a href=""
25           tal:attributes="href string:${here/absolute_url}/${tab/name}"
26           i18n:translate="" tal:content="tab/label">Recent comments moderation</a>
27        </li>
28    </ul>
29     
30    <div class="contentActions">
31    &nbsp;
32    </div>       
33    <!-- End of tabs -->
34
35    <div class="documentContent" metal:define-slot="prefs_content"
36         tal:define ="results python:here.portal_catalog.searchResults(portal_type='Discussion Item',review_state='private',sort_on='created',sort_order='reverse');">
37
38        <h1 i18n:translate="qpc_setup">Recent comments</h1>
39
40        <a href=""
41           class="link-parent"
42           tal:attributes="href string: $portal_url/plone_control_panel"
43           i18n:translate="label_up_to_plone_setup">
44           Up to Plone Setup
45        </a>
46        <div tal:condition="not:results"> No new comments.</div>
47
48        <div tal:condition="results"
49             tal:define="dummy python:results and results[0].getObject()"
50             tal:on-error="string:You must have DiscussionManager role to access this page">
51           
52            <form name="edit_form"
53                  action="href"
54                  method="post"
55                  enctype="multipart/form-data"
56                  tal:condition="results"
57                  tal:attributes="action string:${here/getId}/${template/getId}">
58                <fieldset>
59                    <legend i18n:translate="legend_qpc_notification_legend">List of recent comments</legend>
60
61                    <table><tbody>
62
63                      <tr>
64                      <th class="nosort">
65                          <input class="noborder"
66                                 type="checkbox"
67                                 src="select_all_icon.gif"
68                                 name="selectButton"
69                                 title="Select all items"
70                                 onClick="toggleSelect(this,'ids:list');"
71                                 tal:attributes="src string:$portal_url/select_all_icon.gif"
72                                 alt="Select all items"
73                                 i18n:attributes="title label_select_all_items; alt label_select_all_items;"
74                      />
75                      </th>
76                      <th class="nosort">&nbsp;<tal:title i18n:translate="listingheader_comment"
77                          >Comment</tal:title>&nbsp;</th>
78                      </tr>
79
80                      <tal:comment tal:repeat="comment results">
81                         <tal:object tal:define="comm_url comment/getURL;
82                                                 oddrow repeat/comment/odd;">
83                             <tr class="" tal:attributes="class python:test(oddrow, 'even', 'odd')">
84                                <td><input value="0" type="checkbox"
85                                           name="ids:list"
86                                           tal:attributes="value python:comment.getObject().getId()" /></td>
87                                <td>
88                                   <dl>
89                                       <dt>
90                                         <a href="#"
91                                            tal:attributes="href comment/getURL;"
92                                            tal:content="comment/Title"/>
93                                       </dt>
94                                       <dd>
95                                          <span><em tal:content="string: ${comment/Creator}"> Creator</em></span>
96                                          <span tal:content="python: comment.getObject().text[:400]+'...'"> Description</span>
97                                       </dd>
98                                   </dl>
99                                </td>
100                             </tr>
101                         </tal:object>
102                      </tal:comment>
103
104                    </tbody></table>
105
106                    <div class="formControls">
107                        <input type="hidden" name="form.submitted" value="1" />
108
109                        <input class="context"
110                               tabindex=""
111                               type="submit"
112                               name="form.button.form_delete"
113                               value="Delete"
114                               i18n:attributes="value"
115                               tal:attributes="tabindex tabindex/next;"
116                               />
117
118                        <input class="context"
119                               tabindex=""
120                               type="submit"
121                               name="form.button.form_publish"
122                               value="Publish"
123                               i18n:attributes="value"
124                               tal:attributes="tabindex tabindex/next;"
125                               />
126
127
128                    </div>
129                </fieldset>
130            </form>
131        </div>
132    </div>
133    </div>
134    </div>
135    </div>
136    </div>
137</body>
138</html>
Note: See TracBrowser for help on using the repository browser.