preliminary support for translation + misc. fixes
[mir.git] / templates / admin / contentlist.template
1 <comment>
2   if selectarticleurl is set, this list is used to select an article
3 </comment>
4
5 <if selectarticleurl!="">
6   <assign showsearch="1">
7   <assign showactions="0">
8 <else>
9   <assign showactions="1">
10   <assign showsearch="0">
11 </if>
12
13 <html>
14   <head>
15     <title>${config["Mir.Name"]} | ${lang("contentlist.htmltitle")} </title>
16     <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
17   </head>
18
19   <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
20
21     <include "head.template">
22     
23     <if showsearch=="1">
24       <form method="get" action="${config.actionRoot}">
25         <input type="hidden" name="module" value="Content">
26         <input type="hidden" name="do" value="search">
27         <input type="hidden" name="selectarticleurl" value="${utility.encodeHTML(selectarticleurl)}">
28          
29         <table border="0" cellpadding="2" cellspacing="1">
30           <tr class="pink">
31             <td>for value</td>
32             <td>search in field</td>
33             <td>published</td>
34             <td>article type</td>
35             <td>order</td>
36           </tr>
37           <tr>
38             <td><input type="text"   size="10" maxlength="20" name="searchvalue" value="${searchvalue}"></td>
39             <td>
40                       <select name="searchfield">
41                   <option value="title"<if searchfield=="title"> selected</if>>${lang("content.title")}</option>
42                   <option value="creator"<if searchfield=="creator"> selected</if>>${lang("content.creator")}</option>
43                   <option value="contents"<if searchfield=="content"> selected</if>>${lang("content.contents")}</option>
44                 </select>
45             </td>
46             <td>
47                 <select name="searchispublished">
48                   <option value="">--</option>
49                   <option value="0" <if searchispublished=="0"> selected</if>>${lang("contentlist.hidden")}</option>
50                   <option value="1" <if searchispublished=="1"> selected</if>>${lang("contentlist.published")}</option>
51                 </select>
52             </td>
53             <td>
54                 <select name="searcharticletype">
55                   <option value="">--</option>
56                   <list articletypes as at>
57                     <option value="${at.id}" <if searcharticletype=="${at.id}"> selected</if>>${lang("articletype."+at.name)}</option>
58                   </list>
59                 </select>
60             </td>
61             <td>
62                 <select name="searchorder">
63                   <option value="datedesc" <if searchorder=="datedesc"> selected</if>>${lang("contentlist.order.datedesc")}</option>
64                   <option value="dateasc" <if searchorder=="dateasc"> selected</if>>${lang("contentlist.order.dateasc")}</option>
65                   <option value="title" <if searchorder=="title"> selected</if>>${lang("contentlist.order.title")}</option>
66                   <option value="creator" <if searchorder=="creator"> selected</if>>${lang("contentlist.order.creator")}</option>
67                 </select>
68             </td>
69             <td>
70                 <input type="submit" name="search" value="${lang("contentlist.search")}">
71             </td>
72           </tr>
73         </table>
74       </form>
75     </if>
76
77     <if articles>
78
79       <if showactions=="1">
80         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
81           <form method="post" action="${config.actionRoot}">
82             <input type="hidden" name="module" value="Localizer">
83             <input type="hidden" name="do" value="articleoperationbatch">
84             <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
85         
86             <p>
87               <input class="majorbutton" type="submit" name="save" value="${lang("save")}">
88             </p>
89         </if>    
90       </if>
91
92       <table border="0" width="100%" cellspacing="0" cellpadding="2">
93         <tr class="darkgrey">
94           <td><span class="witesmall">
95             ${lang("content.creationdate")}<br>
96             ${lang("content.modificationdate")}<br>
97             ${lang("content.status")}
98           </span></td>
99           <td><span class="witesmall">
100             ${lang("content.type")} - ${lang("content.title")} <br>
101             ${lang("content.creator")}
102           </span></td>
103           <td width="25%"><span class="witesmall">
104             ${lang("content.comment")}
105           </span></td>
106           <td class="darkgrey">&nbsp;</td>
107         </tr>
108
109         <assign grey="0">
110
111         <list articles as entry>
112           <tr <if grey=="1"><assign grey="0">class="list1"<else>class="list2"<assign grey="1"></if>>
113             <td>
114               <span class="x-small">
115                 ${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
116                 ${entry.changedate.formatted["dd.MM.yyyy HH:mm"]}<br>
117                 <if entry.is_published!="0">F<else>-</if><if entry.is_html!="0">H<else>-</if>
118               </span>
119             </td>
120             <td>
121               <span class="small">
122                 <b>
123                   <span class="x-small">
124                     ${lang("articletypes." + entry.article_type.name)} -
125                   </span>
126                   ${entry.title}
127                 </b><br>
128                 ${entry.creator}<br>
129                 
130                 <if showactions=="1">
131                   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
132                     <list entry.operations as op>
133                       [<a href="${config.actionRoot}?module=Localizer&do=articleoperation&operation=${op}&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${op}</a>]
134                     </list>
135                   </if>
136                   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
137                     <list entry.operations as op>
138                       [<input type="checkbox" name="operation" value="${entry.id};${op}">${op}]
139                     </list>
140                   </if>
141                   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
142                     <select name="operation">
143                       <option value="" selected>&nbsp;</option>
144                       <list entry.operations as op>
145                         <option value="${entry.id};${op}">${op}</option>
146                       </list>
147                     </select>
148                   </if>
149                   <if entry.operations>
150                     |
151                   </if>
152                   <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("edit")}</a> |
153                   <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.id}">${lang("contentlist.comments")}</a> (${entry.commentcount})
154                 <else>
155                   <span class="text">
156                     <a href="${config.actionRoot}?${selectarticleurl}&id=${entry.id}">${lang("contentlist.select")}</a>
157                   </span>
158                 </if>
159               </span>
160             </td>
161             <td width="20%" <if grey=="1">class="list3"<else>class="list4"</if> valign="top">
162               <span class="x-small">
163                 ${entry.comment}&nbsp;
164               </span>
165             </td>
166             <td>
167               <if showactions=="1">
168                 <span class="text">
169                   <a href="${config.actionRoot}?module=Content&do=delete&id=${entry.id}&where=${utility.encodeURI(where)}&order=${utility.encodeURI(order)}&offset=${utility.encodeURI(offset)}">${lang("delete")}</a>
170                 </span>
171               </if>
172             </td>
173           </tr>
174         </list>
175         <tr class="darkgrey">
176           <td colspan="4"><span class="witesmall">
177             ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
178           </span></td>
179         </tr>
180       </table>
181       
182       <if showactions=="1">
183         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
184             <p>
185               <input class="majorbutton" type="submit" name="save" value="${lang("save")}">
186             </p>
187           </form> 
188         </if>  
189       </if>
190       <p>
191
192       <if prevurl || nexturl>      
193         <if prevurl>
194           <a href="${config.actionRoot}?${prevurl}">${lang("list.previous")}</a>
195         </if>
196         <if nexturl>
197           <a href="${config.actionRoot}?${nexturl}">${lang("list.next")}</a>
198         </if>
199       </if>
200     
201     <else>
202       <p align="center">${lang("no_matches_found")}</p>
203     </if>
204     
205     <include "foot.template">
206   </body>
207 </html>