fixed comment/article search + configurable icon sizes
[mir.git] / templates / admin / commentlist.template
index 151a381..14f29b5 100755 (executable)
    
   <table border="0" cellpadding="2" cellspacing="1">
     <tr class="pink">
-      <td>
-        search in field
-      </td>
-      <td>
-        for value
-      </td>
-      <td>
-        published
-      </td>
-      <td>
-        order
-      </td>
+      <td>${lang("commentsearch.field")}</td>
+      <td>${lang("commentsearch.value")}</td>
+      <td>${lang("commentsearch.publishedstate")}</td>
+      <td>${lang("commentsearch.status")}</td>
+      <td>${lang("commentsearch.order")}</td>
     </tr>
     <tr>
       <td>
 
       <td>
              <select name="searchfield">
-            <option value="title"<if searchfield=="title"> selected</if>>${lang("comment.title")}</option>
-            <option value="creator"<if searchfield=="creator"> selected</if>>${lang("comment.creator")}</option>
-            <option value="description"<if searchfield=="description"> selected</if>>${lang("comment.text")}</option>
+            <option value="title"<if searchfield=="title"> selected</if>>${lang("commentsearch.field.title")}</option>
+            <option value="creator"<if searchfield=="creator"> selected</if>>${lang("commentsearch.field.creator")}</option>
+            <option value="description"<if searchfield=="description"> selected</if>>${lang("commentsearch.field.description")}</option>
           </select>
       </td>
       <td>
           <select name="searchispublished">
             <option value="">--</option>
-            <option value="0" <if searchispublished=="0"> selected</if>>${lang("commentlist.hidden")}</option>
-            <option value="1" <if searchispublished=="1"> selected</if>>${lang("commentlist.published")}</option>
+            <option value="0" <if searchispublished=="0"> selected</if>>${lang("commentsearch.publishedstate.hidden")}</option>
+            <option value="1" <if searchispublished=="1"> selected</if>>${lang("commentsearch.publishedstate.published")}</option>
+          </select>
+      </td>
+      <td>
+          <select name="searchstatus">
+            <option value="">--</option>
+            <list commentstatuses as cs>
+              <option value="${cs.id}" <if searchstatus==cs.id> selected</if>>${lang("commentstatus." + cs.name)}</option>
+            </list>
           </select>
       </td>
       <td>
           <select name="searchorder">
-            <option value="datedesc" <if searchorder=="datedesc"> selected</if>>${lang("commentlist.order.datedesc")}</option>
-            <option value="dateasc" <if searchorder=="dateasc"> selected</if>>${lang("commentlist.order.dateasc")}</option>
-            <option value="articletitle" <if searchorder=="articletitle"> selected</if>>${lang("commentlist.order.articletitle")}</option>
+            <option value="datedesc" <if searchorder=="datedesc"> selected</if>>${lang("commentsearch.order.datedesc")}</option>
+            <option value="dateasc" <if searchorder=="dateasc"> selected</if>>${lang("commentsearch.order.dateasc")}</option>
+            <option value="articletitle" <if searchorder=="articletitle"> selected</if>>${lang("commentsearch.order.articletitle")}</option>
           </select>
       </td>
       <td>
-          <input type="submit" name="search" value="${lang("commentlist.search")}">
+          <input class="majorbutton" type="submit" name="search" value="${lang("commentsearch.searchbutton")}">
       </td>
     </tr>
   </table>
 </form>
-<table border="0" cellpadding="2" cellspacing="1">  
-  <if comments>
-    <tr><td>
-      <if prevurl>
-        <a href="${config.actionRoot}?${prevurl}">${lang("list.previous")}</a>&nbsp;
-      </if>
-      <if nexturl>
-        <a href="${config.actionRoot}?${nexturl}">${lang("list.next")}</a>&nbsp;
-      </if>
-    </td></tr>
-  </if>
-  <tr class="pink">
-       <td><p class="head">${lang("comment.date")}</p></td>
-               <td><p class="head">${lang("comment.title")}/ ${lang("comment.creator")}<br>
-                                       ${lang("comment.text")}</p></td>
-  </tr>
 
-  <if comments>
-    <list comments as entry>
-      <tr <if grey=="1"><assign grey="0">class="list1"<else><assign grey="1">class="list2"</if>>
-    
-               <td>${entry.creationdate.formatted["dd.mm.yyyy"]}<br>
-         <if entry.is_published=="0"><span class="spezialtext">hidden</span><else>-</if>
-               </td>
-    
-        <td>
-          ${lang("comment.article")}
-          <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
-            ${utility.encodeHTML(entry.to_content.title)}
-          </a>
-          <br>
-            <a name="${entry.id}"></a>
-          <if entry.status>${entry.status.name} - </if> <b>${entry.title}</b><br>
+<if comments>
+ <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="commentoperationbatch">
+    <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
 
-          <if entry.creator>${lang("comment.creator")}: ${entry.creator}<br></if>
-          <span class="small">${entry.description}</span>
-          <if entry.main_url><br>URL: ${entry.main_url}</if>
-          <br><a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>
-          <if entry.operations>|</if>
-          
-                           <list entry.operations as op>
-                             [<a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${op}</a>]
-                           </list>
+    <p>
+      <input class="majorbutton" type="submit" name="save" value="${lang("save")}">
+    </p>
+ </if>    
 
-        </td>
-  
-        <td>
-          <span class="text">&nbsp;
-            <a href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}">${lang("delete")}</a>
-          </span>
-        </td>
+    <table border="0" cellpadding="2" cellspacing="1">  
+      <if comments>
+        <tr><td>
+          <if prevurl>
+            <a href="${config.actionRoot}?${prevurl}">${lang("list.previous")}</a>&nbsp;
+          </if>
+          <if nexturl>
+            <a href="${config.actionRoot}?${nexturl}">${lang("list.next")}</a>&nbsp;
+          </if>
+        </td></tr>
+      </if>
+      <tr class="darkgrey">
+        <td><p class="witesmall">${lang("comment.date")}</p></td>
+        <td><p class="witesmall">${lang("comment.title")}/ ${lang("comment.creator")}<br>
+            ${lang("comment.text")}</p></td>
+        <td>&nbsp;</td>
+      </tr>
     
-       </tr>
-    </list>
+        <list comments as entry>
+          <tr <if grey=="1"><assign grey="0">class="list1"<else><assign grey="1">class="list2"</if>>
+        
+                       <td>${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
+                 <if entry.is_published=="0"><span class="spezialtext">hidden</span><else>-</if>
+                       </td>
+        
+            <td>
+                ${lang("comment.article")}
+                <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
+                  ${utility.encodeHTML(entry.to_content.title)}
+                </a>
+                <br>
+                  <a name="${entry.id}"></a>
+                    <if entry.status>${lang("commentstatus." + entry.status.name)} - </if> 
+                    <b>${entry.title}</b><br>
+      
+                <if entry.creator>${lang("comment.creator")}: ${entry.creator}<br></if>
+                <span>${utility.encodeHTML(entry.description)}</span>
+                <if entry.main_url><br>URL: ${entry.main_url}</if>
+                <br>
+                <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
+                                     <list entry.operations as op>
+                               [<a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${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}">${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}">${op}</option>
+                               </list>
+                  </select>
+                           </if>
+                <if entry.operations>|</if>
+                <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>                
+            </td>
+      
+            <td>
+              <span class="text">&nbsp;
+                <a href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&searchtext=${utility.encodeHTML(searchtext)}&searchfield=${utility.encodeHTML(searchfield)}&searchispublished=${searchispublished}&searchorder=${searchorder}&offset=${offset}">${lang("delete")}</a>
+              </span>
+            </td>
+        
+               </tr>
+        </list>
+      
+        <tr class="darkgrey">
+          <td colspan="3"><span class="witesmall">${count} ${lang("records")} / ${lang("show_from_to", from, to)}</span></td>
+        </tr>
+        <tr><td>
+          <if prevurl>
+            <a href="${config.actionRoot}?${prevurl}">${lang("list.previous")}</a>&nbsp;
+          </if>
+          <if nexturl>
+            <a href="${config.actionRoot}?${nexturl}">${lang("list.next")}</a>&nbsp;
+          </if>
+        </td></tr>
+    </table>
+
+  <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
+      <p>
+        <input class="majorbutton" type="submit" name="save" value="${lang("save")}">
+      </p>
+    </form>    
+  </if>  
   
-    <tr class="pink">
-      <td colspan="3">${count} ${lang("records")} / ${lang("show_from_to", from, to)}</span></td>
-    </tr>
-    <tr><td>
-      <if prevurl>
-        <a href="${config.actionRoot}?${prevurl}">${lang("list.previous")}</a>&nbsp;
-      </if>
-      <if nexturl>
-        <a href="${config.actionRoot}?${nexturl}">${lang("list.next")}</a>&nbsp;
-      </if>
-    </td></tr>
-    <else>
-      <tr><td align="center">${lang("no_matches_found")}</td></tr>
-    </if>
-</table>
+<else>
+  <P align="center">${lang("no_matches_found")}</p>
+</if>
 
 <include "foot.template">