Merge remote-tracking branch 'origin/new/bug_8092'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / suggestion / suggestion.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions  &rsaquo;
3     [% IF ( op_save ) %]
4         [% IF ( suggestionid) %]
5             [% IF ( op == 'show' ) %]
6                 Show purchase suggestion #[% suggestionid %]
7             [% ELSE %]
8                 Edit purchase suggestion #[% suggestionid %]
9             [% END %]
10         [% ELSE %]
11             Enter a new purchase suggestion
12         [% END %]
13     [% ELSE %]
14         Suggestions management
15     [% END %]
16 </title>
17 [% INCLUDE 'doc-head-close.inc' %]
18 [% INCLUDE 'calendar.inc' %]
19 [% IF ( op_else ) %] <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
20 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
21 <script type="text/javascript">
22 // <![CDATA[
23
24     function yuiToolbar() {
25         new YAHOO.widget.Button("newsuggestion");
26     }
27 $.tablesorter.addParser({
28     id: 'articles',
29     is: function(s) {return false;  },
30     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
31     type: 'text'
32 });
33 /**
34 *  displayOther.
35 *  This function display the select or an textaera to write a reason.
36 */
37 function displayOther(id,show,hide){
38         $("#"+hide+id).hide();
39         $("#"+show+id).show();
40 }
41 $(document).ready(function() {
42     yuiToolbar();
43     $('#suggestiontabs').tabs({
44         select: function(ui) {
45             $("#loadingtab").show();
46         },
47         show: function(ui) {
48             $("#loadingtab").hide();
49         }
50         });
51     $.tablesorter.defaults.widgets = ['zebra'];
52
53 [% FOREACH suggestion IN suggestions %]
54 // functions for [% suggestion.suggestiontype %] interactions
55     $("#[% suggestion.suggestiontype %]t").tablesorter({[% IF ( dateformat == 'metric' ) %]
56     dateFormat: 'uk',[% END %]
57     headers: {0:{sorter: false}, 1: { sorter: 'articles' },5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false},9:{sorter: false},10:{sorter: false}}
58     });
59     $("#CheckAll[% suggestion.suggestiontype %]").click(function(){
60                 $("#[% suggestion.suggestiontype %]t").checkCheckboxes();
61     });
62     $("#UncheckAll[% suggestion.suggestiontype %]").click(function(){
63                 $("#[% suggestion.suggestiontype %]t").unCheckCheckboxes();
64         });
65         $("#other_reason[% suggestion.suggestiontype %]").hide();
66     $("input[name*=other_reason[% suggestion.suggestiontype %]]").focus(function(){ $(this).val(""); });
67     $("#reason[% suggestion.suggestiontype %]").change(function(){
68             if($(this).val() == "other"){
69                         $(this).hide();
70                         $("#other_reason[% suggestion.suggestiontype %]").show();
71     }
72     });
73         $("#[% suggestion.suggestiontype %]delete").change(function(){
74                 if(this.checked){
75                         $("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","delete");
76                 } else {
77                         $("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","change");
78                 }
79         });
80
81 [% END %]
82     $("a[href*=back]").click(function(){
83     var sid = $(this).attr("href").replace(/#back/,"");
84             $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
85                 $("#other_reason"+sid).hide();
86     });
87         $("h4.collapse a").click(function(){
88                 $(this).parent().parent().find("ol").toggle();
89     });
90 });
91 // ]]>
92 </script>
93 <style type="text/css">
94 h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
95 .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } .note { -moz-border-radius: 3px; border-radius:3px; background: transparent url("/intranet-tmpl/prog/img/famfamfam/silk/comment.png") top left no-repeat; padding : 1px 3px 1px 18px; font-size : 90%; }
96 </style>[% ELSE %]
97 <script type="text/javascript">
98 // <![CDATA[
99 $(document).ready(function() { calcNewsuggTotal(); });
100 // ]]>
101 </script>
102 [% END %]
103 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
104 </head>
105 <body id="acq_suggestion" class="acq">
106 [% INCLUDE 'header.inc' %]
107 [% INCLUDE 'cat-search.inc' %]
108 <div id="breadcrumbs">
109     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
110     [% IF ( op_save ) %]
111         <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;
112         [% IF ( op == 'show' ) %]
113             Show suggestion #[% suggestionid %]
114         [% ELSE %]
115             Suggestion edit #[% suggestionid %]
116         [% END %]
117     [% ELSE %]
118         Suggestions management
119     [% END %]
120 </div>
121
122 [% IF ( op == 'show' ) %]
123 <div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2"> -->
124 <div id="bd">
125     <div id="yui-main">
126     <div class="yui-b">
127
128     <fieldset class="rows">
129       <legend>Bibliographic information</legend>
130       <ol>
131         <li><span class="label">Title:</span>[% title |html %]</li>
132         <li><span class="label">Author:</span>[% author %]</li>
133         <li><span class="label">Copyright date:</span>[% copyrightdate %]</li>
134         <li><span class="label">ISBN or ISSN or other standard number:</span>[% isbn %]</li>
135         <li><span class="label">Publisher:</span>[% publishercode %]</li>
136         <li><span class="label">Publication place:</span>[% place %]</li>
137         <li><span class="label">Collection title:</span>[% collectiontitle %]</li>
138         <li><span class="label">Document type:</span>
139             [% FOREACH itemtypeloo IN itemtypeloop %]
140                 [% IF ( itemtypeloo.selected ) %][% itemtypeloo.description %][% END %]
141             [% END %]
142         </li>
143         [% IF ( patron_reason_loop ) %]
144           <li><span class="label">Reason for suggestion: </span>
145             [% FOREACH patron_reason_loo IN patron_reason_loop %]
146               [% IF ( patron_reason_loo.selected ) %][% patron_reason_loo.lib %][% END %]
147             [% END %]
148           </li>
149         [% END %]
150         <li><span class="label">Notes:</span>[% note %]</li>
151       </ol>
152     </fieldset>
153     <fieldset class="rows"> <legend>Suggestion management</legend>
154       <ol>
155         <li>
156           <span class="label">Status:</span>
157           [% IF ( STATUS == 'ASKED' ) %]Pending
158           [% ELSIF ( STATUS == 'ACCEPTED' ) %]Accepted
159           [% ELSIF ( STATUS == 'CHECKED' ) %]Checked
160           [% ELSIF ( STATUS == 'REJECTED' ) %]Rejected
161           [% ELSE %]No Status
162           [% END %]
163         </li>
164         <li>
165           <table>
166             <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
167             <tbody>
168             <tr>
169                 <th><span class="label">Suggestion creation</span> </th>
170                 <td>[% suggesteddate %]</td>
171                 <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %]
172                 </td>
173             </tr>
174             <tr>
175                 <th><span class="label">Suggestion management</span> </th>
176                 <td>[% manageddate %]</td>
177                 <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td>
178             </tr>
179             <tr>
180                 <th><span class="label">Suggestion accepted</span> </th>
181                 <td>[% accepteddate %]</td>
182                 <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td>
183             </tr>
184             </tbody>
185         </table></li></ol>
186     </fieldset>
187     <fieldset class="rows"> <legend>Acquisition information</legend>
188       <ol>
189         <li>
190           <span class="label">Library:</span> [% branchname %]
191         </li>
192         <li>
193           <span class="label">Budget:</span> [% budgetname %]
194         </li>
195         <li>
196           <span class="label">Copies:</span>[% quantity %]
197         </li>
198         <li>
199           <span class="label">Currency:</span>[% currency %]
200         </li>
201         <li>
202           <span class="label">Price:</span>[% price %]
203         </li>
204         <li>
205           <span class="label">Total</span>[% total %]
206         </li>
207       </ol>
208     </fieldset>
209
210     <a class="cancel" href="suggestion.pl">&lt;&lt;Back to the list</a>
211
212     </div>
213     </div>
214 </div>
215 [% ELSE %]
216
217 [% IF ( op_save ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
218 <div id="bd">
219     <div id="yui-main">
220     <div class="yui-b">
221 [% IF ( op_save ) %]
222     <form id="add_edit" action="suggestion.pl" method="post">
223     [% IF ( suggestionid ) %]
224         <h1>Edit purchase suggestion #[% suggestionid %]</h1>
225         <input type="hidden" name="suggestionid" value="[% suggestionid %]"/>
226     [% ELSE %]
227         <h1>Enter a new purchase suggestion</h1>
228     [% END %]
229     <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
230         <li><label for="title">Title:</label><input type="text" id="title" name="title" size="50" maxlength="80" value="[% title |html %]"/></li>
231         <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author %]"/></li>
232         <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate %]" /></li>
233         <li><label for="isbn">ISBN or ISSN or other standard number:</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn %]"/></li>
234         <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode %]"/></li>
235         <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place %]"/></li>
236         <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle %]"/></li>
237         <li><label for="itemtype">Document type:</label>
238             <select id="itemtype" name="itemtype" >
239             [% FOREACH itemtypeloo IN itemtypeloop %]
240                 [% IF ( itemtypeloo.selected ) %]<option selected="selected" value="[% itemtypeloo.itemtype %]">[% ELSE %]<option value="[% itemtypeloo.itemtype %]">[% END %]
241                 [% itemtypeloo.description %]</option>
242             [% END %]
243             </select>
244         </li>
245         [% IF ( patron_reason_loop ) %]<li><label for="patronreason">Reason for suggestion: </label><select name="patronreason" id="patronreason"><option value=""> -- Choose -- </option>[% FOREACH patron_reason_loo IN patron_reason_loop %]
246                 [% IF ( patron_reason_loo.selected ) %]<option value="[% patron_reason_loo.authorised_value %]" selected="selected">[% patron_reason_loo.lib %]</option>[% ELSE %]<option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>[% END %]
247            [% END %]</select></li>[% END %]
248         <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note %]</textarea></li>
249         </ol>
250     </fieldset>
251     <fieldset class="rows"> <legend>Suggestion management</legend>
252        <ol>
253             [% IF ( suggestionid ) %]<li><label for="status">Status:</label><select id="STATUS" name="STATUS"><option value="">No Status</option>
254                 [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
255                 [% ELSE %]<option value="ASKED">Pending</option>[% END %]
256                 [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
257                 [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
258                 [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
259                 [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
260                 [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
261                 [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
262             </select></li>[% END %]
263         <li><table>
264             <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
265             <tbody>
266             <tr>
267                 <th><label for="suggesteddate">Suggestion creation</label> </th>
268                 <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td>
269                 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %]
270                 </td>
271             </tr>
272             <tr>
273                 <th><label for="managedon">Suggestion management</label> </th>
274                 <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td>
275                 <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td>
276             </tr>
277             <tr>
278                 <th><label for="accepteddate">Suggestion accepted</label> </th>
279                 <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td>
280                 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td>
281             </tr>
282             </tbody>
283         </table></li></ol>
284     </fieldset>
285     <fieldset class="rows"> <legend>Acquisition information</legend><ol>
286         <li><label for="branchcode">Library:</label>
287             <select name="branchcode" id="branchcode">
288                 <option value="">Any</option>[% FOREACH branchloo IN branchloop %]
289                 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %][% END %]
290             </select>
291         </li>
292         <li><label for="budgetid">Budget:</label>
293             <select name="budgetid" id="budgetid">
294                 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
295                 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id %]" selected="selected">[% budgetsloo.budget_name %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id %]">[% budgetsloo.budget_name %]</option>[% END %][% END %]
296             </select>
297                 </li><li><label for="quantity">Copies:</label>
298                         <input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" onchange="calcNewsuggTotal();" />
299                 </li><li><label for="currency">Currency:</label>
300                         [% FOREACH loop_currenc IN loop_currency %]
301                             <input type="hidden" id="[% loop_currenc.currcode %]" name="[% loop_currenc.currcode %]" value="[% loop_currenc.rate %]" />
302                         [% END %]
303             <select name="currency" id="currency" onchange="calcNewsuggTotal();">
304                 [% FOREACH loop_currenc IN loop_currency %]
305                 [% IF ( loop_currenc.selected ) %]<option value="[% loop_currenc.currcode %]" selected="selected">[% loop_currenc.currcode %]</option>[% ELSE %]<option value="[% loop_currenc.currcode %]">[% loop_currenc.currcode %]</option>[% END %][% END %]
306             </select>
307                 </li><li><label for="price">Price:</label>
308                         <input type="text" size="20" name="price" id="price" value="[% price %]" onchange="calcNewsuggTotal();" />
309                 </li><li><label for="total">Total</label>
310                         <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/>
311                 </li></ol>
312     </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby %][% ELSE %]noone[% END %]"/>
313     <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl?suggestionid=[% suggestionid %]&amp;op=show[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit Your Suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %]
314     </fieldset>
315     </form>
316 [% END %]
317
318 [% IF ( op_else ) %]
319     <div id="toolbar">
320     <ul class="toolbar">
321     <li> <a id="newsuggestion" href="suggestion.pl?op=add">New purchase suggestion</a></li>
322     </ul></div>
323
324 <h1>Suggestions management</h1>
325
326 [% UNLESS ( notabs ) %]
327 <div id="sorting" class="overlay">Sorting...</div>
328 <div id="loadingtab" class="overlay">Loading tab...</div>
329 <div id="suggestiontabs" class="toptabs">
330 <ul class="ui-tabs-nav">
331 [% FOREACH suggestion IN suggestions %]
332 [% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %]
333     [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
334     [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
335     [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
336     [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
337     [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
338     [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %]
339     [% suggestion.suggestiontypelabel %][% END %]
340     [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li>
341 [% END %]
342     </ul>
343 [% END %]
344
345 [% FOREACH suggestion IN suggestions %]
346 <div id="[% suggestion.suggestiontype %]">
347 <form name="f[% suggestion.suggestiontype %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype %]">
348
349 [% IF ( suggestion.suggestions_loop ) %]
350 <p><a id="CheckAll[% suggestion.suggestiontype %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype %]" href="#">Uncheck all</a></p>
351     <table id="[% suggestion.suggestiontype %]t">
352         <thead>
353             <tr><th>&nbsp;</th>
354             <th>Suggestion</th>
355             <th>Suggested by /on</th>
356             <th>Managed by /on</th>
357             <th>Library</th>
358             <th>Budget</th>
359             <th>Status</th></tr>
360     </thead>
361         <tbody>
362             [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
363             [% IF ( suggestions_loo.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
364                 <td>
365                     <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid %]" />
366                 </td>
367                 <td>
368                     <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&amp;op=show" title="suggestion" >
369                         [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %]</a>
370                     [<a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&amp;op=edit" title="suggestion" >edit</a>]
371                     <br />
372                     [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate %] [% END %]
373                         [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc %]</i> [% END %]
374                         [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% suggestions_loo.itemtype %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note %]</span>[% END %]
375                 </td>
376                 <td>
377                     [% IF ( suggestions_loo.emailsuggestedby ) %]<a href="mailto:[% suggestions_loo.emailsuggestedby %]">[% END %][% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF ( suggestions_loo.emailsuggestedby ) %]</a>[% END %]
378                     [% IF ( suggestions_loo.suggesteddate ) %] / [% suggestions_loo.suggesteddate %][% END %]
379                 </td>
380                 <td>
381                     [% IF ( suggestions_loo.emailmanagedby ) %]<a href="mailto:[% suggestions_loo.emailmanagedby %]">[% END %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %] [% IF ( suggestions_loo.emailmanagedby ) %]</a>[% END %]
382                     [% IF ( suggestions_loo.manageddate ) %], [% suggestions_loo.manageddate %][% END %]
383                 </td>
384                 <td>
385                     [% suggestions_loo.branchcode %]
386                 </td>
387                 <td>
388                     [% suggestions_loo.budget_name %]
389                 </td>
390                 <td>
391                     [% IF ( suggestions_loo.ASKED ) %]Pending[% END %] [% IF ( suggestions_loo.ACCEPTED ) %]Accepted[% END %] [% IF ( suggestions_loo.ORDERED ) %]Ordered[% END %] [% IF ( suggestions_loo.REJECTED ) %]Rejected[% END %] [% IF ( suggestions_loo.CHECKED ) %]Checked[% END %] [% IF ( suggestions_loo.reason ) %]<br />([% suggestions_loo.reason %])[% END %]
392                 </td>
393         </tr>
394         [% END %]</tbody>
395         </table>  <fieldset>
396     <div id="select-reason[% suggestion.suggestiontype %]">
397         <div id="status[% suggestion.suggestiontype %]">
398         <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label><select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
399         <option value=""> -- Choose a status --</option>
400     [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
401     [% ELSE %]<option value="ASKED">Pending</option>[% END %]
402     [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
403     [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
404     [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
405     [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
406     [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
407     [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
408         </select>
409     <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>                 <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
410                     <option value=""> -- Choose a reason -- </option>
411                         [% FOREACH reasonsloo IN suggestion.reasonsloop %]
412                         <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
413                         [% END %]
414                     <option value="other">Others...</option>
415                     </select>   <span id="other_reason[% suggestion.suggestiontype %]">
416             <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." /> <a href="#back[% suggestion.suggestiontype %]">Cancel</a>
417         </span> <strong style="padding: 0 1em;">OR:</strong> <label for="[% suggestion.suggestiontype %]delete">Delete selected</label> <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" />
418         </div>
419         </div>
420
421
422     <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
423     <input type="hidden" name="op" value="change" />
424 </fieldset>
425         <fieldset class="action">
426     <input type="submit" value="Submit" /></fieldset>
427 </form>
428 [% ELSE %]
429     <b>No results.</b>
430 [% END %]
431 </div>
432 [% END %]
433     </div>
434 [% END %]
435 </div>
436 </div>
437
438       [% UNLESS ( op_save ) %] [% UNLESS ( op == 'show' ) %]<div class="yui-b">
439 <form name="suggestionfilter" action="suggestion.pl" method="get">
440 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
441                 <select name="displayby" id="displayby" style="width:auto;">
442                     <option value="STATUS">Status</option>
443                     <option value="branchcode">Library</option>
444                     <option value="itemtype">Item type</option>
445                     <option value="managedby">Managed by</option>
446                     <option value="acceptedby">Accepted by</option>
447                 </select> <input type="submit" value="Go" /></li></ol></fieldset>
448 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
449                 <div style="display:block;" id="limits">
450
451                                 <fieldset class="brief"><h4 class="collapse"><a href="#">Bibliographic information</a></h4>
452                    <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title |html %]" /></li>
453                     <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author %]" /></li>
454                     <li><label for="isbn"> ISBN:</label><input type="text" id="isbn"  name="isbn" value="[% isbn %]" /></li>
455                     <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode %]" /></li>
456                     <li><label for="publicationyear"> Publication year:</label><input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear %]" /></li>
457                     <li><label for="collectiontitle"> Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle %]" /></li><li><input type="submit" value="Go" /></li></ol>
458                 </fieldset>
459                                  <fieldset class="brief"><h4 class="collapse"><a href="#">Suggestion information</a></h4>
460                     <ol>
461                       <li><label for="STATUS"> Status:</label><select name="STATUS" id="STATUS"><option value="">Any</option>
462                         [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
463                         [% ELSE %]<option value="ASKED">Pending</option>[% END %]
464                         [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
465                         [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
466                         [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
467                         [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
468                         [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
469                         [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
470                       </select></li>
471                     <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
472 [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code %]" selected="selected">[% suggestedby_loo.desc %]</option>[% ELSE %]<option value="[% suggestedby_loo.code %]">[% suggestedby_loo.desc %]</option>[% END %][% END %]
473                                                                      </select></li>
474                     <li><label for="suggesteddate_from"> Suggested on:</label>[% suggesteddate %]
475                         <table class="invis">
476                         <tr>
477                         <td>from :</td><td><input type="text" id="suggesteddate_from" name="suggesteddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="suggesteddate_from_button" alt="Show calendar" />
478                         <script language="JavaScript" type="text/javascript">
479                             Calendar.setup(
480                             {
481                                 inputField : "suggesteddate_from",
482                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
483                                 //ifFormat : "%Y-%m-%d", 
484                                 button : "suggesteddate_from_button"
485                             });
486                         </script></td>
487                         </tr>
488                         <tr>
489                         <td>to :</td><td><input type="text" id="suggesteddate_to" name="suggesteddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="suggesteddate_to_button" alt="Show calendar" />
490                         <script language="JavaScript" type="text/javascript">
491                             Calendar.setup(
492                             {
493                                 inputField : "suggesteddate_to",
494                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
495                                 //ifFormat : "%Y-%m-%d", 
496                                 button : "suggesteddate_to_button"
497                             });
498                         </script></td>
499                         </tr>
500                         </table>
501                     </li>
502                     <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
503 [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code %]" selected="selected">[% managedby_loo.desc %]</option>[% ELSE %]<option value="[% managedby_loo.code %]">[% managedby_loo.desc %]</option>[% END %][% END %]
504                                                                      </select></li>
505                     <li><label for="manageddate_from"> Management date:</label>[% manageddate %]
506                         <table class="invis">
507                         <tr>
508                         <td>from :</td><td><input type="text" id="manageddate_from" name="manageddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="manageddate_from_button" alt="Show calendar" />
509                         <script language="JavaScript" type="text/javascript">
510                             Calendar.setup(
511                             {
512                                 inputField : "manageddate_from",
513                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
514                                 //ifFormat : "%Y-%m-%d", 
515                                 button : "manageddate_from_button"
516                             });
517                         </script></td>
518                         </tr>
519                         <tr>
520                         <td>to :</td><td><input type="text" id="manageddate_to" name="manageddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="manageddate_to_button" alt="Show calendar" />
521                         <script language="JavaScript" type="text/javascript">
522                             Calendar.setup(
523                             {
524                                 inputField : "manageddate_to",
525                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
526                                 //ifFormat : "%Y-%m-%d", 
527                                 button : "manageddate_to_button"
528                             });
529                         </script></td>
530                         </tr>
531                         </table>
532                     </li>
533                     <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
534 [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code %]" selected="selected">[% acceptedby_loo.desc %]</option>[% ELSE %]<option value="[% acceptedby_loo.code %]">[% acceptedby_loo.desc %]</option>[% END %][% END %]
535                                                       </select></li>
536                     <li><label for="accepteddate_from"> Accepted on:</label>[% accepteddate %]
537                         <table class="invis">
538                         <tr>
539                         <td>from :</td><td><input type="text" id="accepteddate_from" name="accepteddate_from" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="accepteddate_from_button" alt="Show calendar" />
540                         <script language="JavaScript" type="text/javascript">
541                             Calendar.setup(
542                             {
543                                 inputField : "accepteddate_from",
544                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
545                                 //ifFormat : "%Y-%m-%d", 
546                                 button : "accepteddate_from_button"
547                             });
548                         </script></td>
549                         </tr>
550                         <tr>
551                         <td>to :</td><td><input type="text" id="accepteddate_to" name="accepteddate_to" style="width:80px;" /><img src="[% themelang %]/lib/calendar/cal.gif" id="accepteddate_to_button" alt="Show calendar" />
552                         <script language="JavaScript" type="text/javascript">
553                             Calendar.setup(
554                             {
555                                 inputField : "accepteddate_to",
556                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
557                                 //ifFormat : "%Y-%m-%d", 
558                                 button : "accepteddate_to_button"
559                             });
560                         </script></td>
561                         </tr>
562                         </table>
563                     </li>
564                     <li><input type="submit" value="Go" /></li></ol>
565                 </fieldset>
566
567                                 <fieldset class="brief"><h4 class="collapse"><a href="#">Acquisition information</a></h4>
568                     <ol><li><label for="budgetid"> Book fund:</label>
569                     <select name="budgetid" id="budgetid"><option value="">Any</option>[% FOREACH budgetid_loo IN budgetid_loop %]
570                         [% IF ( budgetid_loo.selected ) %] <option value="[% budgetid_loo.code %]" selected="selected">[% budgetid_loo.desc %]</option>[% ELSE %]<option value="[% budgetid_loo.code %]">[% budgetid_loo.desc %]</option>[% END %]
571                         [% END %]
572                     </select></li>
573                     <li><label for="branchcode"> For:</label>
574                     <select name="branchcode" id="branchcode">
575                         <option value="">Any</option>[% FOREACH branchloo IN branchloop %]
576                             [% IF ( branchloo.selected ) %] <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %] <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
577                             [% END %]
578                     </select></li><li><input type="submit" value="Go" /></li></ol>
579                 </fieldset>
580     </div>
581             </form>
582         </div>
583     [% END %]
584     [% END %]
585 </div>
586 [% END %]
587 [% INCLUDE 'intranet-bottom.inc' %]
588