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