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