Verbesserung der Suchfunktionen der Historie und Visualisierung der Sortierreihenfolge.
[kivitendo-erp.git] / templates / webpages / common / show_history_de.html
index 8c4af80..a0b0e40 100644 (file)
@@ -1,38 +1,72 @@
 <form>
-<input type="hidden" name="path" value="<TMPL_VAR NAME=path ESCAPE=HTML>">
 <input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>">
 <input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>">
 </form> 
 <TMPL_IF NAME=SUCCESS>
+<script type="text/javascript">
+  function orderBy(order) {
+    var desc = 0;
+    var reg = /\&order\=(.+)\-\-(\d)$/;
+    reg.exec(document.location.href);
+    if(RegExp.$1 == order) {
+      if(RegExp.$2 == 0) {
+        document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--1";
+      }
+      else{  
+        document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--0";
+      }
+    }
+    else {
+      if(reg.test(document.location.href)) {
+        document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--0";
+      }
+      else {
+        document.location.href = document.location.href + "&order=" + order + "--1";
+      }
+    }
+  }
+</script>
 <table>
        <tr>
                <th class=listtop>
-                       Zeitpunkt
+                       &nbsp;<a href="javascript:orderBy('h.itime');">Zeitpunkt</a>&nbsp;<TMPL_IF NAME=ITIME><a title="Reihenfolge"><TMPL_IF NAME=ITIMEBY>&or;<TMPL_ELSE>&and;</TMPL_IF></a></TMPL_IF>&nbsp;
                </th>
                <th class=listtop>
-                       Mitarbeiter
+                       &nbsp;<a href="javascript:orderBy('emp.name');">Mitarbeiter</a>&nbsp;<TMPL_IF NAME=NAME><a title="Reihenfolge"><TMPL_IF NAME=NAMEBY>&or;<TMPL_ELSE>&and;</TMPL_IF></a></TMPL_IF>&nbsp;
                </th>
                <th class=listtop>
-                       Vorgang
+                       &nbsp;<a href="">Aktion</a>&nbsp;
                </th>
                <th class=listtop>
-                       Zusatz
-               </th>
+      &nbsp;<a href="">Zusatz</a>&nbsp;
+    </th>
+    <th class=listtop>
+      &nbsp;<a href="javascript:orderBy('h.trans_id');">ID-Nummer (intern)</a>&nbsp;<TMPL_IF NAME=TRANS_ID><a title="Reihenfolge"><TMPL_IF NAME=TRANS_IDBY>&or;<TMPL_ELSE>&and;</TMPL_IF></a></TMPL_IF>&nbsp;
+    </th>
+    <th class=listtop>
+      &nbsp;<a href="javascript:orderBy('h.snumbers');">Buchungsnummer</a>&nbsp;<TMPL_IF NAME=SNUMBERS><a title="Reihenfolge"><TMPL_IF NAME=SNUMBERSBY>&or;<TMPL_ELSE>&and;</TMPL_IF></a></TMPL_IF>&nbsp;
+    </th>
        </tr>
 <TMPL_LOOP NAME=DATEN>
        <tr class="listrow<TMPL_IF __odd__>1<TMPL_ELSE>0</TMPL_IF>">
                <td nowrap>
-                       <TMPL_VAR NAME=itime ESCAPE=HTML>
+                       &nbsp;<TMPL_VAR NAME=itime ESCAPE=HTML>&nbsp;
                </td>
                <td nowrap>
-                       <TMPL_VAR NAME=name ESCAPE=HTML>
+                       &nbsp;<TMPL_VAR NAME=name ESCAPE=HTML>&nbsp;
                </td>
                <td>
-                       <TMPL_VAR NAME=addition ESCAPE=HTML>
+                       &nbsp;<TMPL_VAR NAME=addition ESCAPE=HTML>&nbsp;
                </td>
                <td>
-                       <TMPL_VAR NAME=what_done ESCAPE=HTML>
-               </td>
+      &nbsp;<TMPL_VAR NAME=what_done ESCAPE=HTML>&nbsp;
+    </td>
+    <td>
+      &nbsp;<TMPL_VAR NAME=id ESCAPE=HTML>&nbsp;
+    </td>
+    <td>
+      &nbsp;<TMPL_VAR NAME=snumbers ESCAPE=HTML>&nbsp;
+    </td>
        </tr>   
 </TMPL_LOOP>
 </table>