description is now shown in the article list if the title isn't available
[mir.git] / templates / admin / contentlist.template
index b1ac89f..45d7601 100755 (executable)
@@ -2,18 +2,18 @@
   if selectarticleurl is set, this list is used to select an article
 </comment>
 
-<if selectarticleurl!="">
-       <assign showsearch="1">
-       <assign showactions="0">
+<if selectarticleurl && selectarticleurl!="">
+  <assign showsearch="1">
+  <assign showactions="0">
 <else>
-       <assign showactions="1">
-       <assign showsearch="0">
+  <assign showactions="1">
+  <assign showsearch="0">
 </if>
 
 <html>
 <head>
-       <title>${config["Mir.Name"]} | ${lang("contentlist.htmltitle")} </title>
-       <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
+  <title>${config["Mir.Name"]} | ${lang("contentlist.htmltitle")} </title>
+  <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
 </head>
 
 <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
 <include "head.template">
 
 <if showsearch=="1">
-       <call ContentSearch ("layouted")>
+  <call ContentSearch ("layouted")>
 </if>
 
-<if articles>
+<if entities>
 
 <if showactions=="1">
-       <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
-               <form method="post" action="${config.actionRoot}">
-                       <input type="hidden" name="module" value="Localizer">
-                       <input type="hidden" name="do" value="articleoperationbatch">
-                       <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
-                       <p class="box">
-                               <input type="submit" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
-                       </p>
-       </if>    
+  <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
+    <form method="post" action="${config.actionRoot}">
+      <input type="hidden" name="module" value="Localizer">
+      <input type="hidden" name="do" value="articleoperationbatch">
+      <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
+      <p class="box">
+        <input type="submit" class="majorbutton" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
+      </p>
+  </if>    
 </if>
 
-<call PrevNext ("right")>
+<call showPrevNextLinks(prevurl, nexturl, "right")>
 
 <table border="0" width="100%" cellspacing="3" cellpadding="2">
-       <tr>
-               <td class="table_head" valign="top">
-                       <span class="small">      
-                       ${lang("content.creationdate")}<br>
-                       ${lang("content.modificationdate")}<br>
-                       ${lang("content.status")}
-                       </span>
-               </td>
-               <td class="table_head" valign="top">
-                       ${lang("content.type")} - ${lang("content.title")} <br>
-                       ${lang("content.creator")}
-               </td>
-               <td class="table_head" valign="top">
-                       ${lang("content.comment")}
-               </td>
-               <td class="table_head" valign="top">&nbsp;</td>
-       </tr>
+  <tr>
+    <td class="table-head" valign="top">
+      <span class="small">    
+      ${lang("content.creationdate")}<br>
+      ${lang("content.modificationdate")}<br>
+      ${lang("content.status")}
+      </span>
+    </td>
+    <td class="table-head" valign="top">
+      ${lang("content.type")} - ${lang("content.title")} (id # )<br>
+      ${lang("content.creator")} (${lang("content.language")})
+    </td>
+    <td class="table-head" valign="top">
+      ${lang("content.comment")}
+    </td>
+    <td class="table-head" valign="top">&nbsp;</td>
+  </tr>
 
 <assign grey="0">
-
-       <list articles as entry>
-               <tr <if grey=="1"><assign grey="0">class="listrow1"<else>class="listrow2"<assign grey="1"></if>>
-                       <td class="x-small">
-                                       ${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
-                                       ${entry.changedate.formatted["dd.MM.yyyy HH:mm"]}<br>
-                                       <if entry.is_published!="0">Pub.<else>-</if> <if entry.is_html!="0">HTML<else>-</if>
-                       </td>
-                       <td>
-                               <b>${entry.title}</b><br>
-                               ${lang("by")}: ${entry.creator}<br>
-                               (${lang("articletypes." + entry.article_type.name)}) 
-                               <if showactions=="1">
-                                       <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
-                                               <list entry.operations as op>
-                                                       [ <a href="${config.actionRoot}?module=Localizer&do=articleoperation&operation=${op}&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.operation."+op)}</a> ]
-                                               </list>
-                                       </if>
-                               <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
-                                       <list entry.operations as op>
-                                               [ <input type="checkbox" name="operation" value="${entry.id};${op}"> ${lang("content.operation."+op)} ]
-                                       </list>
-                               </if>
-                                       <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
-                                               <select name="operation">
-                                                       <option value="" selected>&nbsp;</option>
-                                                       <list entry.operations as op>
-                                                               <option value="${entry.id};${op}">${lang("content.operation."+op)}</option>
-                                                       </list>
-                                               </select>
-                                       </if>
-                                       <if entry.operations> | </if>
-                                       <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("edit")}</a> |
-                                       <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("contentlist.comments")}</a> (${entry.commentcount})
-                               <else>
-                                       <span class="text">
-                                       <a href="${config.actionRoot}?${selectarticleurl}&id=${entry.id}">${lang("contentlist.select")}</a>
-                               </if>
-                       </td>
-                       <td width="25%"  <if grey=="1">class="listrow3"<else>class="listrow4"</if> valign="top">
-                               <span class="small">${entry.comment}&nbsp;</span>
-                       </td>
-                       <td valign="top" class="listcommand">
-                               <if showactions=="1">
-                                       <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>
-                               </if>
-                       </td>
-       </tr>
+  <list entities as entry>
+    <tr <if grey=="1"><assign grey="0">class="listrow1"<else>class="listrow2"<assign grey="1"></if>>
+      <td class="x-small">
+          ${entry.creationdate.format(config["Mir.DefaultDateTimeFormat"])}<br>
+          ${entry.changedate.format(config["Mir.DefaultDateTimeFormat"])}<br>
+          <if entry.is_published!="0">Pub.<else>-</if> <if entry.is_html!="0">HTML<else>-</if>
+      </td>
+      <td>
+        ${lang("articletypes." + entry.article_type.name)} <b>
+       <if entry.title>${utility.prettyEncodeHTML(entry.title)}<else>${utility.prettyEncodeHTML(entry.description)}</if></b> (${entry.id})<br>
+        ${lang("by")} <i>${utility.prettyEncodeHTML(entry.creator)}</i> (${entry.language.name})<br>
+        <if showactions=="1">
+          <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
+            <list entry.operations as op>
+              [ <a href="${config.actionRoot}?module=Localizer&do=articleoperation&operation=${op}&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("content.operation."+op)}</a> ]
+            </list>
+          </if>
+        <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
+          <list entry.operations as op>
+            [ <input type="checkbox" name="operation" value="${entry.id};${op}"> ${lang("content.operation."+op)} ]
+          </list>
+        </if>
+          <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
+            <if entry.operations>
+              <br>
+              <select name="operation">
+                <option value="" selected>&nbsp;</option>
+                <list entry.operations as op>
+                  <option value="${entry.id};${op}">${lang("content.operation."+op)}</option>
+                </list>
+              </select>
+            </if>
+          </if>
+          <if entry.operations> | </if>
+          <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("edit")}</a> |
+         <comment> <a href="${entry.publicurl}">${lang("preview")}</a> |</comment>
+          <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${lang("contentlist.comments")}</a> (${entry.commentcount})
+        <else>
+          <span class="text">
+          <a href="${config.actionRoot}?${selectarticleurl}&id=${entry.id}">${lang("contentlist.select")}</a>
+        </if>
+      </td>
+      <td width="25%"  <if grey=="1">class="listrow3"<else>class="listrow4"</if> valign="top">
+        <span class="small">${utility.prettyEncodeHTML(entry.comment)}&nbsp;</span>
+      </td>
+      <td valign="top" class="listcommand">
+        <if showactions=="1">
+          <if config["Mir.Localizer.Admin.AllowDeleteArticle"]=="1">
+            <a href="${config.actionRoot}?module=Content&do=delete&id=${entry.id}&okurl=${utility.encodeURI(thisurl)}&cancelurl=${utility.encodeURI(thisurl)}">[${lang("delete")}]</a>
+          </if>
+        </if>
+      </td>
+  </tr>
 </list>
-       <tr>
-               <td colspan="4" class="table_foot">
-                       ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
-               </td>
-       </tr>
+  <tr>
+    <td colspan="4" class="table-foot">
+      ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
+    </td>
+  </tr>
 </table>
 
 <if showactions=="1">
-       <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
-               <p class="box">
-                       <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; ( ${lang("commentlist.activate")})
-               </p>
-       </form> 
-       </if>  
+  <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
+    <p class="box">
+      <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; ( ${lang("commentlist.activate")})
+    </p>
+  </form> 
+  </if>  
 </if>
 
-
-<call PrevNext ("right")>
-
-
+<call showPrevNextLinks(prevurl, nexturl, "right")>
 
 <else>
 <p align="center" class="box">${lang("no_matches_found")}</p>