8aaaf74563e3fa194bf4939b136490085dc2b5b3
[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 && 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 <include "FUNCTIONS.template">
21 <include "head.template">
22
23 <if showsearch=="1">
24   <call ContentSearch ("layouted")>
25 </if>
26
27 <if entities>
28
29 <if showactions=="1">
30   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
31     <form method="post" action="${config.actionRoot}">
32       <input type="hidden" name="module" value="Localizer">
33       <input type="hidden" name="do" value="articleoperationbatch">
34       <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
35       <p class="box">
36         <input type="submit" class="majorbutton" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
37       </p>
38   </if>    
39 </if>
40
41 <call showPrevNextLinks(prevurl, nexturl, "right")>
42
43 <table border="0" width="100%" cellspacing="3" cellpadding="2">
44   <tr>
45     <td class="table-head" valign="top">
46       <span class="small">    
47       ${lang("content.creationdate")}<br>
48       ${lang("content.modificationdate")}<br>
49       ${lang("content.status")}
50       </span>
51     </td>
52     <td class="table-head" valign="top">
53       ${lang("content.type")} - ${lang("content.title")} (id # )<br>
54       ${lang("content.creator")} 
55     </td>
56     <td class="table-head" valign="top">
57       ${lang("content.comment")}
58     </td>
59     <td class="table-head" valign="top">&nbsp;</td>
60   </tr>
61
62 <assign grey="0">
63   <list entities as entry>
64     <tr <if grey=="1"><assign grey="0">class="listrow1"<else>class="listrow2"<assign grey="1"></if>>
65       <td class="x-small">
66           ${entry.creationdate.format(config["Mir.DefaultDateTimeFormat"])}<br>
67           ${entry.changedate.format(config["Mir.DefaultDateTimeFormat"])}<br>
68           <if entry.is_published!="0">Pub.<else>-</if> <if entry.is_html!="0">HTML<else>-</if>
69       </td>
70       <td>
71         ${lang("articletypes." + entry.article_type.name)} <b>${utility.prettyEncodeHTML(entry.title)}</b> (${entry.id})<br>
72         ${lang("by")} <i>${utility.prettyEncodeHTML(entry.creator)}</i><br>
73         <if showactions=="1">
74           <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
75             <list entry.operations as op>
76               [ <a href="${config.actionRoot}?module=Localizer&do=articleoperation&operation=${op}&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.operation."+op)}</a> ]
77             </list>
78           </if>
79         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
80           <list entry.operations as op>
81             [ <input type="checkbox" name="operation" value="${entry.id};${op}"> ${lang("content.operation."+op)} ]
82           </list>
83         </if>
84           <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
85             <if entry.operations>
86               <br>
87               <select name="operation">
88                 <option value="" selected>&nbsp;</option>
89                 <list entry.operations as op>
90                   <option value="${entry.id};${op}">${lang("content.operation."+op)}</option>
91                 </list>
92               </select>
93             </if>
94           </if>
95           <if entry.operations> | </if>
96           <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("edit")}</a> |
97           <comment> <a href="${entry.publicurl}">${lang("preview")}</a> |</comment>
98           <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("contentlist.comments")}</a> (${entry.commentcount})
99         <else>
100           <span class="text">
101           <a href="${config.actionRoot}?${selectarticleurl}&id=${entry.id}">${lang("contentlist.select")}</a>
102         </if>
103       </td>
104       <td width="25%"  <if grey=="1">class="listrow3"<else>class="listrow4"</if> valign="top">
105         <span class="small">${utility.prettyEncodeHTML(entry.comment)}&nbsp;</span>
106       </td>
107       <td valign="top" class="listcommand">
108         <if showactions=="1">
109           <if config["Mir.Localizer.Admin.AllowDeleteArticle"]=="1">
110             <a href="${config.actionRoot}?module=Content&do=delete&id=${entry.id}&okurl=${utility.encodeURI(thisurl)}&cancelurl=${utility.encodeURI(thisurl)}">[${lang("delete")}]</a>
111           </if>
112         </if>
113       </td>
114   </tr>
115 </list>
116   <tr>
117     <td colspan="4" class="table-foot">
118       ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
119     </td>
120   </tr>
121 </table>
122
123 <if showactions=="1">
124   <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
125     <p class="box">
126       <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; ( ${lang("commentlist.activate")})
127     </p>
128   </form> 
129   </if>  
130 </if>
131
132 <call showPrevNextLinks(prevurl, nexturl, "right")>
133
134 <else>
135 <p align="center" class="box">${lang("no_matches_found")}</p>
136 </if>
137
138 <include "foot.template">
139 </body>
140 </html>