different layout for the filter list
authorzapata <zapata>
Sun, 23 Nov 2003 06:31:19 +0000 (06:31 +0000)
committerzapata <zapata>
Sun, 23 Nov 2003 06:31:19 +0000 (06:31 +0000)
templates/admin/LISTFUNCTIONS.template
templates/admin/abuse.filters.template

index ae40b8e..27f043b 100755 (executable)
         <b>${i}</b> 
       </td>
     </list>
-      <td class="${TABLE_HEAD_CLASS}">
+      <td class="${TABLE_HEAD_CLASS}" width="50">
         &nbsp;
       </td> 
   </tr>
 </function>
 \r
+<function SpannedListHead(aHeaders, aSpans)>\r
+  <tr class="${TABLE_HEAD_CLASS}">
+    <assign index="0">\r
+    <list aHeaders as i>
+      <td colspan="${aSpans[index]}" class="${TABLE_HEAD_CLASS}">
+        <b>${i}</b> 
+      </td>
+      <assign index=utility.increment(index)>
+    </list>
+      <td class="${TABLE_HEAD_CLASS}">
+        &nbsp;
+      </td> 
+  </tr>
+</function>
+
 <function ListFoot(aNrRecords, aFrom, aTo)>\r
   <tr>    
     <td colspan="${TABLE_NR_COLUMNS}" class="table-foot">
 </function>\r
 
 
+<function SpannedListEntry(aFields, aSpans, aLinkPrefix,  aLinks, aLinkTitles)>\r
+    <if alt=="1">
+      <tr class="${LIST_ROW_CLASS_ALTERNATIVE}">
+    <else>
+      <tr class="${LIST_ROW_CLASS}">
+    </if>
+      
+    <assign index="0">\r
+    <list aFields as i>   
+      <td colspan="${aSpans[index]}">
+        ${i}
+      </td>
+      <assign index=utility.increment(index)>
+    </list>
+      <td>\r
+        <assign index="0">\r
+        <assign first="1">\r
+        <list aLinks as i>\r
+          <if first=="1">\r
+            <assign first="0">\r
+          <else>  \r
+            |\r
+          </if>\r
+          <a class="listcommand" href="${config.actionRoot}?${utility.encodeHTML(aLinkPrefix)}${utility.encodeHTML(i)}">${aLinkTitles[index]}</a>        \r
+          <assign index=utility.increment(index)>
+        </list>\r
+      </td>
+    </tr>
+</function>    
 <function ListEntry(aFields, aLinkPrefix, aLinks, aLinkTitles)>\r
     <if alt=="1">
       <assign alt="0">
index 1c4db94..50503c1 100755 (executable)
       <br><br>
     </p>
     <call ListStart()>\r
-    <call ListHead([
+    <call SpannedListHead([
           lang("abuse.filter.type"), 
-          lang("abuse.filter.expression"),
+          lang("abuse.filter.expression")], ["1","3"])>
+    <call ListHead([
           lang("abuse.filter.articleaction"),
           lang("abuse.filter.commentaction"),
           lang("abuse.filter.comments"),
-          lang("abuse.filter.lasthit"), 
-           ])>
+          lang("abuse.filter.lasthit")])>
     <list filters as f>    
-    <if f.lastHit>\r
-        <call ListEntry([
-          lang("abuse.filtertype."+f.type),
-          utility.encodeHTML(f.expression),
-          lang("content.operation."+f.articleAction),
-          lang("comment.operation."+f.commentAction),
-          utility.prettyEncodeHTML(f.comments),
-          f.lastHit.format(config["Mir.DefaultDateTimeFormat"], config["Mir.DefaultTimezone"])
-          ], 
-          "module=Abuse&id="+f.id, 
-          ["&do=edit", "&do=delete", "&do=moveup", "&do=movedown"], 
-          [lang("edit"), lang("delete"), lang("abuse.filters.moveup"), lang("abuse.filters.movedown")])
-        >
-    <else>
-        <call ListEntry([
+        <call SpannedListEntry([
           lang("abuse.filtertype."+f.type),
-          utility.encodeHTML(f.expression),
-          lang("content.operation."+f.articleAction),
-          lang("comment.operation."+f.commentAction),
-          utility.prettyEncodeHTML(f.comments),
-          "-"
-          ], 
+          utility.encodeHTML(f.expression)],
+          ["1","3"],
           "module=Abuse&id="+f.id, 
-          ["&do=edit", "&do=delete", "&do=moveup", "&do=movedown"], 
-          [lang("edit"), lang("delete"), lang("abuse.filters.moveup"), lang("abuse.filters.movedown")])
-        >
-    </if>
+           ["&do=edit", "&do=delete"], 
+           [lang("edit"), lang("delete")])>
+          <if f.lastHit>\r
+              <call ListEntry([
+                lang("content.operation."+f.articleAction),
+                lang("comment.operation."+f.commentAction),
+                utility.prettyEncodeHTML(f.comments),
+                f.lastHit.format(config["Mir.DefaultDateTimeFormat"], config["Mir.DefaultTimezone"])
+                ], 
+                "module=Abuse&id="+f.id, 
+                ["&do=moveup", "&do=movedown"], 
+                [lang("abuse.filters.moveup"), lang("abuse.filters.movedown")])
+              >
+          <else>
+              <call ListEntry([
+                lang("content.operation."+f.articleAction),
+                lang("comment.operation."+f.commentAction),
+                utility.prettyEncodeHTML(f.comments),
+                "-"
+                ], 
+                "module=Abuse&id="+f.id, 
+                ["&do=moveup", "&do=movedown"], 
+                [lang("abuse.filters.moveup"), lang("abuse.filters.movedown")])
+              >
+          </if>
+        <tr height="2" class="${TABLE_HEAD_CLASS}"><td colspan="6"> </td></tr>
     </list>\r
     <call ListEnd()>\r