5b6b18e72055d85ef9ff36a826666b398bda71dd
[kivitendo-erp.git] / templates / webpages / common / search_history_master.html
1 <style type="text/css">@import url(js/jscalendar/calendar-win2k-1.css);</style>
2 <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
3 <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
4 <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
5
6 <form method="post" action="<TMPL_VAR NAME=script ESCAPE=HTML>">
7
8 <input type="hidden" name="path" value="<TMPL_VAR NAME=path ESCAPE=HTML>">
9 <input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>">
10 <input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>">
11 <input type="hidden" name="action" value="show_am_history">
12
13         <table>
14                 <tr>
15                         <th class ="listtop"><translate>history search engine</translate></th>
16                         </th>
17                 </tr>
18                 <tr>
19                         <td>
20                                 <script type="text/javascript">
21                                         <!--
22                     function uncheckOther(id) {
23                                                 if(!(
24                                                     (document.getElementById('non-deleted').checked == false) 
25                                                 && 
26                                                     (document.getElementById('both').checked == false) 
27                                                     && 
28                                                     (document.getElementById('deleted').checked == false)
29                                                   )) {
30                                                                 if(id == "deleted") {
31                                                                         document.getElementById('non-deleted').checked = false;
32                                                                         document.getElementById('both').checked = false;
33                                                                 }
34                                                                 if(id == "non-deleted") {
35                                                                         document.getElementById('deleted').checked = false;
36                                                                         document.getElementById('both').checked = false;
37                                                                 }
38                                                                 if(id == "both") {
39                                                                         document.getElementById('non-deleted').checked = false;
40                                                                         document.getElementById('deleted').checked = false;
41                                                                 }
42                                                 }
43                                         }
44                                         
45                                         var defaults = new Array('SAVED', 'DELETED', 'ADDED', 'PAYMENT POSTED', 'POSTED', 'POSTED AS NEW', 'SAVED FOR DUNNING', 'DUNNING STARTED', 'PRINTED');
46                                         var translated = new Object();
47                                         translated['SAVED'] = '<translate>SAVED</translate>';
48                                         translated['DELETED'] = '<translate>DELETED</translate>';
49                                         translated['ADDED'] = '<translate>ADDED</translate>';
50                                         translated['PAYMENT POSTED'] = '<translate>PAYMENT POSTED</translate>';
51                                         translated['POSTED'] = '<translate>POSTED</translate>';
52                                         translated['POSTED AS NEW'] = '<translate>POSTED AS NEW</translate>'
53                                         translated['SAVED FOR DUNNING'] = '<translate>SAVED FOR DUNNING</translate>';
54                                         translated['DUNNING STARTED'] = '<translate>DUNNING STARTED</translate>';
55                                         translated['PRINTED'] = '<translate>PRINTED</translate>';
56                                         
57                                         var jscalender = "<table valign=\"top\">"
58                                                                         + "<tr><td colspan=\"2\"><b><translate>Zeitraum</translate>:&nbsp;</b></td></tr>"
59                                                                         + "<tr><td><translate>von</translate>:&nbsp;"
60                                                                         + "<input name=\"transdate\" id=\"transdate\" size=\"11\" title=\"<TMPL_VAR NAME=myconfig_dateformat ESCAPE=HTML>\" value=\"<TMPL_VAR NAME=transdate ESCAPE=HTML>\">"
61                                                                         + "<input type=\"button\" name=\"transdate\" id=\"trigger1\" value=\"?\">"
62                                                                         + "&nbsp;</td><td><translate>bis</translate>:&nbsp;"
63                                                                         + "<input name=\"reqdate\" id=\"reqdate\" size=\"11\" title=\"<TMPL_VAR NAME=myconfig_dateformat ESCAPE=HTML>\" value=\"<TMPL_VAR NAME=reqdate ESCAPE=HTML>\">"
64                                                                         + "<input type=\"button\" name=\"reqdate\" id=\"trigger2\" value=\"?\"></td></tr></table>";
65                                         var mitarbeiter = "<table valign=\"top\">"
66                                                                         + "<tr><td><b>Mitarbeiter:</b>&nbsp;</td>"
67                                                                         + "<td><input type='text' name='mitarbeiter' id='mitarbeiter'></td>"
68                                                                         + "</tr></table>";
69                                         
70                                         var tempString = "";
71                                         function addForm(last, remove) {
72                                                 if(last == "INIT") {
73                                                         tempString = "<select id='selectForm'>";
74                                                         for(i=0;i<defaults.length;i++) {
75                                                                 tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
76                                                         }
77                                                         tempString += "</select>";
78                                                         document.getElementById('selectEmployee').innerHTML = mitarbeiter;
79                                                         document.getElementById('selectDate').innerHTML = jscalender;
80                                                         document.getElementById('selectTable').innerHTML = tempString;
81                                                         
82                                                         Calendar.setup(
83                                         {
84                                       inputField : "transdate",
85                                       ifFormat :"%d.%m.%Y",
86                                       align : "BL",
87                                       button : "trigger1"
88                                         });
89
90                                             Calendar.setup(
91                                                 {
92                                       inputField : "reqdate",
93                                           ifFormat :"%d.%m.%Y",
94                                           align : "BL",
95                                           button : "trigger2"
96                                                 });
97                                                 }                       
98                                                 else {
99                                                         defaults.splice(remove,1);
100                                                         document.getElementById('inputText').innerHTML += ((document.getElementById('inputText').innerHTML == "") ? ("<b><translate>Folgende Einschränkungen haben Sie bereits vorgenommen:</translate></b><br>") : ("<br>")) + translated[last];
101                                                         if(defaults.length > 0) {
102                                                                 document.getElementById('einschraenkungen').value += ((document.getElementById('einschraenkungen').value == "") ? ("") : (",")) + last;
103                                                                 tempString = "<select id='selectForm'>";
104                                                                 for(i=0;i<defaults.length;i++) {
105                                                                         tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n";
106                                                                 }
107                                                                 tempString += "</select>";
108                                                                 document.getElementById('selectTable').innerHTML = tempString;
109                                                         }
110                                                         else {
111                                                                 document.getElementById('selectTable').innerHTML = "";
112                                                         }
113                                                 }
114                                         }
115                                         
116                                         function resetAll() {
117                                                 document.getElementById('selectTable').innerHTML = "<a href=\"javascript:addForm('INIT')\"><translate>Ja</translate>";
118                                                 document.getElementById('inputText').innerHTML = "";
119                                         }
120                                         //-->
121                                 </script>
122                                 <table>
123                                         <tr>
124                                                 <td>
125                                                         <translate><b>Wonach</b> möchten Sie suchen?</translate>:
126                                                 </td>
127                                                 <td>
128                                                         <select name="what2search" id="what2search">
129                                                                 <option name="Artikelnummer" value="Artikelnummer" id="Artikelnummer"><translate>Artikelnummer</translate></option>
130                                                                 <option name="Kundennummer" value="Kundennummer" id="Kundennummer"><translate>Kundennummer</translate></option>
131                                                                 <option name="Lieferantennummer" value="Lieferantennummer" id="Lieferantennummer"><translate>Lieferantennummer</translate></option>
132                                                                 <option name="Projektnummer" value="Projektnummer" id="Projektnummer"><translate>Projektnummer</translate></option>
133                                                                 <option name="Buchungsnummer" value="Buchungsnummer" id="Buchungsnummer"><translate>Buchungsnummer</translate></option>
134                                                                 <option name="Eingangsrechnungnummer" value="Eingangsrechnungnummer" id="Eingangsrechnungnummer"><translate>Eingangsrechnungnummer</translate></option>
135                                                                 <option name="Ausgangsrechnungnummer" value="Ausgangsrechnungnummer" id="Ausgangsrechnungnummer"><translate>Ausgangsrechnungnummer</translate></option>
136                                                         </select>
137                                                 </td>
138                                         </tr>
139                                         <tr>
140                                                 <td>
141                                                         <translate>Wie lautet der <b>Suchbegriff</b> nach dem Sie suchen?:</translate>
142                                                 </td>
143                                                 <td>
144                                                         <input type="text" name="searchid" id="searchid" value="<TMPL_VAR NAME=searchid ESCAPE=HTML>">
145                                                 </td>
146                                         </tr>
147                                         <tr>
148                                                 <td valign="top">
149                                                         <translate>Möchten Sie Ihre Suche <b>spezialisieren</b>?</translate>
150                                                 </td>
151                                                 <td>
152                                                         <table valign=\"top\" cellpadding=\"0\" marginheight=\"0\" marginwidth=\"0\" cellspacing=\"0\" topmargin=\"0\" leftmargin=\"0\">
153                                                                 <tr>
154                                                                         <td>
155                                                                                 <div id="selectTable"><a href="javascript:addForm('INIT')"><translate>Ja</translate></div>
156                                                                                 <div id="inputText"></div>
157                                                                         </td>
158                                                                 </tr>
159                                                                 <tr>
160                                                                         <td>
161                                                                                 <div id="selectEmployee"></div>
162                                                                         </td>
163                                                                 </tr>
164                                                                 <tr>
165                                                                         <td>
166                                                                                 <div id="selectDate"></div>
167                                                                         </td>
168                                                                 </tr>
169                                                         </table>
170                                                         <input type="hidden" name="einschraenkungen" id="einschraenkungen" value="">
171                                                 </td>
172                                         </tr>
173                                         </tr>
174                                         <tr>
175                                                 <td colspan="6">
176                                                         <input type="submit" value="<translate>abschicken</translate>">
177                                                         <input type="reset" value="<translate>reset</translate>" onClick="javascript:resetAll();">
178                                                 </td>
179                                                 <td>
180                                                 </td>
181                                         </tr>
182                                 </table>
183                         </td>
184                 </tr>   
185         </table>
186 </form>