From 7c128d33b4db9f5d2a090a04ffdcb9e08a0a3db3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 6 May 2009 14:11:00 +0000 Subject: [PATCH] Das Umsortieren der Ergebnisliste der Historiensuchmaschine gefixt und ohne JavaScript realisiert, sodass sie auch funktioniert, wenn sie per POST-Request aufgerufen wurde. --- bin/mozilla/am.pl | 6 +- .../webpages/common/show_history_de.html | 93 ++++--------------- .../webpages/common/show_history_master.html | 93 ++++--------------- 3 files changed, 45 insertions(+), 147 deletions(-) diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index b38236052..a99204c33 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -2818,6 +2818,9 @@ sub show_am_history { $auth->assert('config'); + my $callback = build_std_url(qw(action einschraenkungen fromdate todate mitarbeiter searchid what2search)); + $form->{order} ||= 'h.itime--1'; + my %search = ( "Artikelnummer" => "parts", "Kundennummer" => "customer", "Lieferantennummer" => "vendor", @@ -2867,7 +2870,8 @@ sub show_am_history { "SUCCESS" => ($form->get_history($dbh, $daten, $restriction, $form->{order}) ne "0"), "NONEWWINDOW" => 1, uc($sort) => 1, - uc($sort) . "BY" => $sortby + uc($sort) . "BY" => $sortby, + 'callback' => $callback, }); $dbh->disconnect(); diff --git a/templates/webpages/common/show_history_de.html b/templates/webpages/common/show_history_de.html index 5443530e9..e7f90d8d8 100644 --- a/templates/webpages/common/show_history_de.html +++ b/templates/webpages/common/show_history_de.html @@ -1,22 +1,21 @@ [% USE HTML %] [% IF SUCCESS %] - + +[% BLOCK column_header %] + + [% IF THIS_COLUMN && !THIS_COLUMN_DOWN %] + + [% ELSE %] + + [% END %] + [% IF THIS_COLUMN && THIS_COLUMN_DOWN %] + + [% ELSE %] + + [% END %] +
+[% END %] +
@@ -26,20 +25,7 @@  Zeitpunkt  - - [% IF ITIME %] - [% IF ITIMEBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=ITIME THIS_COLUMN_DOWN=ITIMEBY column='h.itime' %]
@@ -51,20 +37,7 @@  Mitarbeiter  - - [% IF NAME %] - [% IF NAMEBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=NAME THIS_COLUMN_DOWN=NAMEBY column='emp.name' %] @@ -94,20 +67,7 @@  ID-Nummer (intern)  - - [% IF TRANS_ID %] - [% IF TRANS_IDBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=TRANS_ID THIS_COLUMN_DOWN=TRANS_IDBY column='h.trans_id' %] @@ -119,20 +79,7 @@  Buchungsnummer  - - [% IF SNUMBERS %] - [% IF SNUMBERSBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=SNUMBERS THIS_COLUMN_DOWN=SNUMBERSBY column='h.snumbers' %] diff --git a/templates/webpages/common/show_history_master.html b/templates/webpages/common/show_history_master.html index 038d7fc95..4e28b33d8 100644 --- a/templates/webpages/common/show_history_master.html +++ b/templates/webpages/common/show_history_master.html @@ -1,22 +1,21 @@ [% USE HTML %] [% IF SUCCESS %] - + +[% BLOCK column_header %] + + [% IF THIS_COLUMN && !THIS_COLUMN_DOWN %] + + [% ELSE %] + + [% END %] + [% IF THIS_COLUMN && THIS_COLUMN_DOWN %] + + [% ELSE %] + + [% END %] +
+[% END %] +
@@ -26,20 +25,7 @@  Zeitpunkt  - - [% IF ITIME %] - [% IF ITIMEBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=ITIME THIS_COLUMN_DOWN=ITIMEBY column='h.itime' %]
@@ -51,20 +37,7 @@  Mitarbeiter  - - [% IF NAME %] - [% IF NAMEBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=NAME THIS_COLUMN_DOWN=NAMEBY column='emp.name' %] @@ -94,20 +67,7 @@  ID-Nummer  - - [% IF TRANS_ID %] - [% IF TRANS_IDBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=TRANS_ID THIS_COLUMN_DOWN=TRANS_IDBY column='h.trans_id' %] @@ -119,20 +79,7 @@  Belegnummer  - - [% IF SNUMBERS %] - [% IF SNUMBERSBY %] - - - [% ELSE %] - - - [% END %] - [% ELSE %] - - - [% END %] -
+ [% PROCESS column_header THIS_COLUMN=SNUMBERS THIS_COLUMN_DOWN=SNUMBERSBY column='h.snumbers' %] -- 2.20.1