1a25c3ad05ca919d15c65f1eecbcbe6a8daf122e
[mir.git] / templates / admin / commentlist.template
1 <html>
2 <head>
3   <title>${config["Mir.Name"]} | ${lang("commentlist.htmltitle")}</title>
4   <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
5
6 </head>
7
8 <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
9
10 <include "FUNCTIONS.template">
11 <include "head.template">
12
13 <assign grey="0">
14
15 <form method="post" action="${config.actionRoot}">
16   <input type="hidden" name="module" value="Comment">
17   <input type="hidden" name="do" value="search">
18    
19   <table border="0" cellpadding="2" cellspacing="3">
20   <tr>
21     <td class="table-head">${lang("commentsearch.field")}</td>
22     <td class="table-head">${lang("commentsearch.value")}</td>
23     <td class="table-head">${lang("commentsearch.publishedstate")}</td>
24     <td class="table-head">${lang("commentsearch.status")}</td>
25     <td class="table-head">${lang("commentsearch.order")}</td>
26     <td class="table-head">&nbsp;</td>
27   </tr>
28
29   <tr>
30     <td class="listrow2">
31       <input type="text"   size="10" maxlength="20" name="searchtext" value="${searchtext}">
32     </td>
33     <td class="listrow2">
34       <select name="searchfield">
35         <option value="title"<if searchfield=="title"> selected</if>>${lang("commentsearch.field.title")}</option>
36         <option value="creator"<if searchfield=="creator"> selected</if>>${lang("commentsearch.field.creator")}</option>
37         <option value="description"<if searchfield=="description"> selected</if>>${lang("commentsearch.field.description")}</option>
38         <option value="main_url"<if searchfield=="main_url"> selected</if>>${lang("commentsearch.field.main_url")}</option>
39         <option value="email"<if searchfield=="email"> selected</if>>${lang("commentsearch.field.email")}</option>
40         <option value="comment"<if searchfield=="comment"> selected</if>>${lang("commentsearch.field.comment")}</option>
41       </select>
42     </td>
43     <td class="listrow2">
44       <select name="searchispublished">
45         <option value="">--</option>
46         <option value="0" <if searchispublished=="0"> selected</if>>${lang("commentsearch.publishedstate.hidden")}</option>
47         <option value="1" <if searchispublished=="1"> selected</if>>${lang("commentsearch.publishedstate.published")}</option>
48       </select>
49     </td>
50     <td class="listrow2">
51       <select name="searchstatus">
52         <option value="">--</option>
53         <list commentstatuses as cs>
54           <option value="${cs.id}" <if searchstatus==cs.id> selected</if>>${lang("commentstatus." + cs.name)}</option>
55         </list>
56       </select>
57     </td>
58     <td class="listrow2">
59       <select name="searchorder">
60         <option value="datedesc" <if searchorder=="datedesc"> selected</if>>${lang("commentsearch.order.datedesc")}</option>
61         <option value="dateasc" <if searchorder=="dateasc"> selected</if>>${lang("commentsearch.order.dateasc")}</option>
62         <option value="articletitle" <if searchorder=="articletitle"> selected</if>>${lang("commentsearch.order.articletitle")}</option>
63       </select>
64     </td>
65     <td class="listrow2">
66       <input class="majorbutton" type="submit" name="search" value="${lang("commentsearch.searchbutton")}">
67     </td>
68   </tr>
69 </table>
70 </form>
71
72 <if comments>
73   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
74     <form method="post" action="${config.actionRoot}">
75       <input type="hidden" name="module" value="Localizer">
76       <input type="hidden" name="do" value="commentoperationbatch">
77       <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
78       <p class="box">
79         <input class="majorbutton" type="submit" name="save" value="${lang("save")}">&nbsp; (${lang("commentlist.activate")})
80       </p>
81   </if>    
82
83   <call showPrevNextLinks (prevurl, nexturl, "right")>
84   
85   <table border="0" cellpadding="2" cellspacing="3">  
86   
87     <tr class="table-head">
88       <td valign="top">
89         ${lang("comment.date")}
90       </td>
91       <td>
92         ${lang("comment.article")} / ${lang("comment.title")} / ${lang("comment.creator")} / ${lang("comment.text")}
93       </td>
94       <td>
95         ${lang("comment.comment")}
96       </td>
97       <td>
98         &nbsp;
99       </td>
100     </tr>
101       
102   <list comments as entry>
103     <tr <if grey=="1"><assign grey="0">class="listrow1"<else><assign grey="1">class="listrow2"</if>>
104       <td valign="top" class="small">
105         ${entry.creationdate.format(config["Mir.DefaultDateTimeFormat"])}<br>
106         <if entry.is_published=="0"><b>${lang("commentlist.hidden")}</b><else>-</if><br>
107         <br>
108         ${lang("comment.status")}: <br>
109         <if entry.status>
110           <b>
111             ${lang("commentstatus." + entry.status.name)}
112           </b>
113         <else> 
114           - 
115         </if>
116       </td>
117           
118       <td>
119         <a name="${entry.id}"></a>
120         <if entry.to_content>
121             <div class="small">
122             ${lang("comment.article")}:
123             <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
124               ${utility.encodeHTML(entry.to_content.title)} (${entry.to_content.id})
125             </a>
126               (${lang("articletypes."+entry.to_content.article_type.name)}) 
127   
128               [
129               <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
130               ${lang("edit")}
131               </a> |
132               <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.to_content.id}">
133                 ${lang("commentlist.allcomments")}
134               </a>
135               ]
136               </div>
137             </if>
138   
139         
140         <b>${utility.encodeHTML(entry.title)}</b> (${entry.id})&nbsp;
141         <if entry.creator>
142           ${lang("by")}: ${utility.encodeHTML(entry.creator)}
143         </if>
144         <br>
145         ${utility.prettyEncodeHTML(utility.subString(entry.description, 0, config["Mir.Admin.ListTextLengthLimit"]))}
146
147         <br>
148           <if entry.to_all_media_images><call showCommentAttachment(entry, thisurl)></if>
149           <if entry.to_all_media_audio><call showCommentAttachment(entry, thisurl)></if>
150           <if entry.to_all_media_video><call showCommentAttachment(entry, thisurl)></if>
151           <if entry.to_all_media_other><call showCommentAttachment(entry, thisurl)></if>
152         <br>
153         
154         <if entry.main_url><br>URL: ${utility.encodeHTML(entry.main_url)}</if>
155         <br>
156         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
157           <list entry.operations as op>
158             [ <a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${lang("comment.operation."+op)}</a> ]
159           </list>
160         </if>
161         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
162           <list entry.operations as op>
163              <input type="checkbox" name="operation" value="${entry.id};${op}">${lang("comment.operation."+op)} 
164           </list>
165         </if>
166         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
167           <select name="operation">
168             <option value="" selected>&nbsp;</option>
169             <list entry.operations as op>
170               <option value="${entry.id};${op}">${lang("comment.operation."+op)}</option>
171             </list>
172           </select>
173         </if>
174         <if entry.operations>&nbsp;|&nbsp;</if>
175         <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>
176       </td>
177         
178       <td valign="top">
179         ${utility.prettyEncodeHTML(entry.comment)}
180       </td>    
181       <td valign="top">
182         &nbsp;
183         <if config["Mir.Localizer.Admin.AllowDeleteComment"]=="1">
184           <a class="small" href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&okurl=${utility.encodeURI(thisurl)}&cancelurl=${utility.encodeURI(thisurl)}">[${lang("delete")}]</a>
185         </if>
186       </td>    
187     </tr>
188   </list>
189         
190     <tr>
191       <td colspan="4" class="table-foot">
192         ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
193       </td>
194     </tr>
195   </table>
196   
197   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
198     <p class="box">
199       <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
200     </p>
201     </form> 
202   </if>  
203   
204   <call showPrevNextLinks (prevurl, nexturl, "right")>
205   
206 <else>
207   <P align="center" class="box">${lang("no_matches_found")}</p>
208 </if>
209
210 <include "foot.template">
211
212 </body>
213 </html>
214
215