4 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Acquisitions ›
11 [% IF ( suggestionid ) %]
12 Suggestions › Edit suggestion #[% suggestionid | html %]
14 Suggestions › Add suggestion
16 [% ELSIF ( op == 'show' ) %]
17 Suggestions › Show suggestion #[% suggestionid | html %]
19 Suggestions management
22 [% INCLUDE 'doc-head-close.inc' %]
24 [% Asset.css("css/datatables.css") | $raw %]
27 <style type="text/css">
28 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
29 .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("[% interface | html %]/[% theme | html %]/img/famfamfam/silk/comment.png") top left no-repeat; padding : 1px 3px 1px 18px; font-size : 90%; }
34 <body id="acq_suggestion" class="acq">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
37 <div id="breadcrumbs">
38 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
40 [% IF ( suggestionid ) %]
41 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
43 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
45 [% ELSIF ( op == 'show' ) %]
46 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
48 Suggestions management
52 [% IF ( op == 'show' ) %]
53 <div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2"> -->
58 <div id="toolbar" class="btn-toolbar">
59 <a class="btn btn-default btn-sm" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
60 <a class="btn btn-default btn-sm deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
63 <fieldset class="rows">
64 <legend>Bibliographic information</legend>
68 <span class="label">Title:</span>
74 <span class="label">Author:</span>
78 [% IF ( copyrightdate ) %]
80 <span class="label">Copyright date:</span>
81 [% copyrightdate | html %]
86 <span class="label">ISBN or ISSN or other standard number:</span>
90 [% IF ( publishercode ) %]
92 <span class="label">Publisher:</span>
93 [% publishercode | html %]
98 <span class="label">Publication place:</span>
102 [% IF ( collectiontitle ) %]
104 <span class="label">Collection title:</span>
105 [% collectiontitle | html %]
108 [% IF ( itemtype ) %]
110 <span class="label">Document type:</span>
111 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
114 [% IF ( patron_reason_loop ) %]
115 <li><span class="label">Reason for suggestion: </span>
116 [% FOREACH patron_reason_loo IN patron_reason_loop %]
117 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
123 <span class="label">Notes:</span>
129 <fieldset class="rows"> <legend>Suggestion management</legend>
132 <span class="label">Status:</span>
133 [% SET status_found = 0 %]
134 [% IF ( STATUS == 'ASKED' ) %]
136 [% SET status_found = 1 %]
137 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
139 [% SET status_found = 1 %]
140 [% ELSIF ( STATUS == 'CHECKED' ) %]
142 [% SET status_found = 1 %]
143 [% ELSIF ( STATUS == 'REJECTED' ) %]
145 [% SET status_found = 1 %]
147 [% FOREACH s IN SuggestionStatuses %]
148 [% IF STATUS == s.authorised_value %]
150 [% SET status_found = 1 %]
158 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
162 <td>[% suggesteddate | $KohaDates %]</td>
164 [% IF ( suggestedby_borrowernumber ) %]
165 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | html %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
166 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
172 <td>[% manageddate | $KohaDates %]</td>
174 [% IF ( managedby_borrowernumber ) %]
175 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | html %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
176 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
181 <th>Accepted on:</th>
182 <td>[% accepteddate | $KohaDates %]</td>
184 [% IF ( acceptedby_borrowernumber ) %]
185 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | html %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
186 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
193 <fieldset class="rows"> <legend>Acquisition information</legend>
196 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
199 <span class="label">Fund:</span> [% budgetname | html %]
202 <span class="label">Copies:</span>[% quantity | html %]
205 <span class="label">Currency:</span>[% currency | html %]
208 <span class="label">Price:</span>[% price | $Price %]
211 <span class="label">Total</span>[% total | $Price %]
216 <fieldset class="action">
217 <a href="suggestion.pl"><< Back to suggestions</a>
226 <div class="main container-fluid">
228 <div class="col-md-8 col-md-offset-2">
230 <div id="doc3" class="yui-t2">
237 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
238 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
239 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
240 [% IF ( suggestionid ) %]
241 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
242 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
244 <h1>Enter a new purchase suggestion</h1>
246 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
248 <label for="title" class="required">Title:</label>
249 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
250 <span class="required">Required</span>
252 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
253 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
254 <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 | html %]"/></li>
255 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
256 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
257 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
258 <li><label for="itemtype">Document type:</label>
259 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
261 [% IF patron_reason_loop %]
263 <label for="patronreason">Reason for suggestion: </label>
264 <select name="patronreason" id="patronreason">
265 <option value=""> -- Choose -- </option>
266 [% FOREACH patron_reason_loo IN patron_reason_loop %]
267 [% IF patron_reason_loo.authorised_value == patronreason %]
268 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
270 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
276 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
279 <fieldset class="rows"> <legend>Suggestion management</legend>
281 [% IF ( suggestionid ) %]
283 <label for="STATUS">Status:</label>
284 <select id="STATUS" name="STATUS">
285 <option value="">No Status</option>
287 [% IF (statusselected_ASKED ) %]
288 <option value="ASKED" selected="selected">Pending</option>
290 <option value="ASKED">Pending</option>
293 [% IF (statusselected_ACCEPTED ) %]
294 <option value="ACCEPTED" selected="selected">Accepted</option>
296 <option value="ACCEPTED">Accepted</option>
299 [% IF (statusselected_CHECKED ) %]
300 <option value="CHECKED" selected="selected">Checked</option>
302 <option value="CHECKED">Checked</option>
305 [% IF ( statusselected_REJECTED ) %]
306 <option value="REJECTED" selected="selected">Rejected</option>
308 <option value="REJECTED">Rejected</option>
311 [% FOREACH s IN SuggestionStatuses %]
312 [% IF s.authorised_value == suggestion.STATUS %]
313 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
315 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
321 <label for="reason">Reason</label>
322 <select class="select-reason" id="reason" name="reason">
323 <option value=""> -- Choose a reason -- </option>
324 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
325 [% IF (reasonsloo.lib == suggestion.reason) %]
326 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
328 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
331 <option value="other">Others...</option>
334 <span id="other_reason" name="other_reason">
335 [% IF other_reason %]
336 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
338 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
340 <a href="#back">Cancel</a>
345 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
348 <th><label for="suggesteddate">Created by:</label> </th>
349 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
350 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | html %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])[% END %]
354 <th><label for="managedon">Managed by:</label> </th>
355 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
356 <td><input type="hidden" id="managedby" name="managedby" value="[% managedby | html %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | html %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])[% END %]</td>
359 <th><label for="accepteddate">Accepted on:</label> </th>
360 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
361 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | html %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])[% END %]</td>
366 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
367 <li><label for="branchcode">Library:</label>
368 <select name="branchcode" id="branchcode">
369 <option value="">Any</option>
370 [% IF branchfilter %]
371 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
373 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
377 <li><label for="budgetid">Fund:</label>
378 <select name="budgetid" id="budgetid">
379 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
380 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %][% END %]
382 </li><li><label for="quantity">Copies:</label>
383 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
386 <label for="currency">Currency:</label>
387 [% FOREACH c IN currencies %]
388 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
389 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
392 <select name="currency" id="currency">
393 [% FOREACH c IN currencies %]
394 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
395 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
396 [% ELSIF not c.archived %]
397 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
402 <li><label for="price">Price:</label>
403 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
404 </li><li><label for="total">Total: </label>
405 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
407 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
408 <fieldset class="action"><input type="hidden" name="op" value="[% op | html %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | html %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit your suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %]
414 <div id="toolbar" class="btn-toolbar">
415 <a class="btn btn-default btn-sm" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
418 <h1>Suggestions management</h1>
421 [% FOR m IN messages %]
422 <div class="dialog [% m.type | html %]">
424 [% CASE 'already_exists' %]
425 The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id | html %]&op=show'>suggestion #[% m.id | html %]</a>)
432 [% UNLESS ( notabs ) %]
433 <div id="suggestiontabs" class="toptabs">
434 <ul class="ui-tabs-nav">
435 [% FOREACH suggestion IN suggestions %]
437 <a href="#[% suggestion.suggestiontype | html %]">
438 [% IF ( suggestion.suggestiontypelabel ) %]
439 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
440 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
441 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
442 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
443 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
444 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
445 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
446 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
448 [% IF ( suggestion.suggestiontype ) %]
449 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
454 ([% suggestion.suggestions_loop.size | html %])</a></li>
460 [% FOREACH suggestion IN suggestions %]
461 <div id="[% suggestion.suggestiontype | html %]">
462 <form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
464 [% IF ( suggestion.suggestions_loop ) %]
465 <p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
466 <table id="[% suggestion.suggestiontype | html %]t" class="sorted">
469 <th class="NoSort"> </th>
470 <th class="anti-the">Suggestion</th>
471 <th>Suggested by - on</th>
472 <th>Managed by - on</th>
476 <th class="NoSort"> </th>
480 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
483 <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid | html %]" />
486 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&op=show" title="suggestion" >
487 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
489 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
490 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
491 [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn | html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle | html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note | html %]</span>[% END %]
494 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | html %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a>
495 [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
498 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | html %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
499 [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
502 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
505 [% suggestions_loo.budget_name | html %]
508 [% IF ( suggestions_loo.ASKED ) %]
510 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
512 [% ELSIF ( suggestions_loo.ORDERED ) %]
514 [% ELSIF ( suggestions_loo.REJECTED ) %]
516 [% ELSIF ( suggestions_loo.CHECKED ) %]
518 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
519 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
524 [% IF ( suggestions_loo.reason ) %]
525 <br />([% suggestions_loo.reason | html %])
529 <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a>
530 <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
535 <div id="select-reason[% suggestion.suggestiontype | html %]">
536 <div id="status[% suggestion.suggestiontype | html %]">
537 <label for="STATUS[% suggestion.suggestiontype | html %]">Mark selected as: </label>
538 <select name="STATUS" id="STATUS[% suggestion.suggestiontype | html %]">
539 <option value=""> -- Choose a status --</option>
541 [% IF (statusselected_ASKED ) %]
542 <option value="ASKED" selected="selected">Pending</option>
544 <option value="ASKED">Pending</option>
547 [% IF (statusselected_ACCEPTED ) %]
548 <option value="ACCEPTED" selected="selected">Accepted</option>
550 <option value="ACCEPTED">Accepted</option>
553 [% IF (statusselected_CHECKED ) %]
554 <option value="CHECKED" selected="selected">Checked</option>
556 <option value="CHECKED">Checked</option>
559 [% IF ( statusselected_REJECTED ) %]
560 <option value="REJECTED" selected="selected">Rejected</option>
562 <option value="REJECTED">Rejected</option>
565 [% FOREACH s IN SuggestionStatuses %]
566 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
570 <label for="reason[% suggestion.suggestiontype | html %]">with this reason:</label>
571 <select id="reason[% suggestion.suggestiontype | html %]" name="reason[% suggestion.suggestiontype | html %]">
572 <option value=""> -- Choose a reason -- </option>
573 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
574 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
576 <option value="other">Others...</option>
579 <span id="other_reason[% suggestion.suggestiontype | html %]">
580 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype | html %]" name="other_reason[% suggestion.suggestiontype | html %]" placeholder="please note your reason here..." />
581 <a href="#back[% suggestion.suggestiontype | html %]">Cancel</a>
584 <strong style="padding: 0 1em;">OR:</strong>
586 <label for="[% suggestion.suggestiontype | html %]delete">Delete selected</label>
587 <input type="checkbox" name="op" id="[% suggestion.suggestiontype | html %]delete" />
591 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
592 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype | html %]" />
593 <input type="hidden" name="op" value="change" />
595 <fieldset class="action">
596 <input type="submit" value="Submit" /></fieldset>
608 [% UNLESS ( op_save ) %] [% UNLESS ( op == 'show' ) %]<div class="yui-b">
609 <form name="suggestionfilter" action="suggestion.pl" method="get">
610 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
611 <select name="displayby" id="displayby" style="width:auto;">
612 [% IF ( displayby == "STATUS" ) %]
613 <option value="STATUS" selected="selected">Status</option>
615 <option value="STATUS">Status</option>
617 [% IF ( displayby == "branchcode" ) %]
618 <option value="branchcode" selected="selected">Library</option>
620 <option value="branchcode">Library</option>
622 [% IF ( displayby == "itemtype" ) %]
623 <option value="itemtype" selected="selected">Item type</option>
625 <option value="itemtype">Item type</option>
627 [% IF ( displayby == "managedby" ) %]
628 <option value="managedby" selected="selected">Managed by</option>
630 <option value="managedby">Managed by</option>
632 [% IF ( displayby == "acceptedby" ) %]
633 <option value="acceptedby" selected="selected">Accepted by</option>
635 <option value="acceptedby">Accepted by</option>
637 </select> <input type="submit" value="Go" /></li></ol></fieldset>
638 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
639 <div style="display:block;" id="limits">
641 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
642 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
643 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
644 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
645 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
646 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
647 <li><label for="collectiontitle"> Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" /></li></ol>
649 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
652 <label for="STATUS"> Status:</label>
653 <select name="STATUS" id="STATUS">
654 <option value="">Any</option>
656 [% IF (statusselected_ASKED ) %]
657 <option value="ASKED" selected="selected">Pending</option>
659 <option value="ASKED">Pending</option>
662 [% IF (statusselected_ACCEPTED ) %]
663 <option value="ACCEPTED" selected="selected">Accepted</option>
665 <option value="ACCEPTED">Accepted</option>
668 [% IF (statusselected_CHECKED ) %]
669 <option value="CHECKED" selected="selected">Checked</option>
671 <option value="CHECKED">Checked</option>
674 [% IF ( statusselected_REJECTED ) %]
675 <option value="REJECTED" selected="selected">Rejected</option>
677 <option value="REJECTED">Rejected</option>
680 [% FOREACH s IN SuggestionStatuses %]
681 [% IF s.authorised_value == selected_status %]
682 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
684 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
690 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
691 [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>[% ELSE %]<option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>[% END %][% END %]
694 <label for="suggesteddate_from">Suggested date from:</label>
695 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
698 <label for="suggesteddate_to">To:</label>
699 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
701 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
702 [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>[% ELSE %]<option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>[% END %][% END %]
705 <label for="manageddate_from">Management date from:</label>
706 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
709 <label for="manageddate_to">To:</label>
710 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
712 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
713 [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>[% ELSE %]<option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>[% END %][% END %]
716 <label for="accepteddate_from">Accepted date from:</label>
717 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
720 <label for="accepteddate_to">To:</label>
721 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
723 <li><input type="submit" value="Go" /></li></ol>
726 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
727 <ol><li><label for="budgetid"> Book fund:</label>
728 <select name="budgetid" id="budgetid">
729 <option value="__ANY__">Any</option>
730 [% IF budgetid == '__NONE__' %]
731 <option value="__NONE__" selected="selected">None</option>
733 <option value="__NONE__">None</option>
735 [% FOREACH budgetid_loo IN budgetid_loop %]
736 [% IF ( budgetid_loo.selected ) %] <option value="[% budgetid_loo.code | html %]" selected="selected">[% budgetid_loo.desc | html %]</option>[% ELSE %]<option value="[% budgetid_loo.code | html %]">[% budgetid_loo.desc | html %]</option>[% END %]
739 <li><label for="branchcode">Library:</label>
740 <select name="branchcode" id="branchcode">
741 <option value="__ANY__">Any</option>
742 [% IF branchfilter %]
743 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
745 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
747 </select></li><li><input type="submit" value="Go" /></li></ol>
751 [% INCLUDE 'acquisitions-menu.inc' %]
758 [% MACRO jsinclude BLOCK %]
759 [% INCLUDE 'calendar.inc' %]
760 [% IF ( op == 'show' || op_else ) %]
761 <script type="text/javascript">
762 $(document).ready(function(){
763 $(".deletesuggestion").on("click",function(){
764 return confirm(_("Are you sure you want to delete this suggestion?"));
770 [% INCLUDE 'datatables.inc' %]
771 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
772 <script type="text/javascript">
775 * This function display the select or an textaera to write a reason.
777 function displayOther(id,show,hide){
778 $("#"+hide+id).hide();
779 $("#"+show+id).show();
781 $(document).ready(function() {
782 $('#suggestiontabs').tabs({
783 // Correct table sizing for tables hidden in tabs
784 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
785 "activate": function(event, ui) {
786 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
789 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
791 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
792 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
794 "sPaginationType": "four_button"
796 [% FOREACH suggestion IN suggestions %]
797 // functions for [% suggestion.suggestiontype | html %] interactions
798 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
799 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
802 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
803 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
806 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
807 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
808 if($(this).val() == "other"){
810 $("#other_reason[% suggestion.suggestiontype | html %]").show();
813 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
815 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
817 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
822 $("a[href*=back]").click(function(){
823 var sid = $(this).attr("href").replace(/#back/,"");
824 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
825 $("#other_reason"+sid).hide();
827 $("h4.local_collapse a").click(function(){
828 $(this).parent().parent().find("ol").toggle();
831 // http://jqueryui.com/demos/datepicker/#date-range
832 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
835 onSelect: function( selectedDate ) {
836 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
837 instance = $( this ).data( "datepicker" );
838 date = $.datepicker.parseDate(
839 instance.settings.dateFormat ||
840 $.datepicker._defaults.dateFormat,
841 selectedDate, instance.settings );
842 dates.not( this ).datepicker( "option", option, date );
845 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
848 onSelect: function( selectedDate ) {
849 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
850 instance = $( this ).data( "datepicker" );
851 date = $.datepicker.parseDate(
852 instance.settings.dateFormat ||
853 $.datepicker._defaults.dateFormat,
854 selectedDate, instance.settings );
855 datesMD.not( this ).datepicker( "option", option, date );
858 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
861 onSelect: function( selectedDate ) {
862 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
863 instance = $( this ).data( "datepicker" );
864 date = $.datepicker.parseDate(
865 instance.settings.dateFormat ||
866 $.datepicker._defaults.dateFormat,
867 selectedDate, instance.settings );
868 datesAD.not( this ).datepicker( "option", option, date );
872 $("form.update_suggestions").on("submit", function(e){
874 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
875 if ( action_delete_selected ) {
876 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
877 if ( suggestions_to_delete.length == 0 ) {
878 alert(_("Please select at least one suggestion to delete"));
881 } else if ( suggestions_to_delete.length == 1 ) {
882 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
886 } else if ( suggestions_to_delete.length > 1 ) {
887 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
899 <script type="text/javascript">
900 $(document).ready(function(){
902 $("#quantity,#price,#currency").on("change",function(){
906 [% IF other_reason %]
907 $(".select-reason").hide();
908 $(".select-reason").find("option[value='other']").attr("selected","selected");
909 $("#other_reason").show();
911 $("#other_reason").hide();
913 $(".select-reason").change(function(){
914 if($(this).val() == "other"){
916 $("#other_reason").show();
919 $("a[href*=back]").click(function(){
920 $(".select-reason").show().find("option[value='']").attr("selected","selected");
921 $("#other_reason").hide();
926 [% Asset.js("js/acq.js") | $raw %]
927 [% Asset.js("js/acquisitions-menu.js") | $raw %]
930 [% INCLUDE 'intranet-bottom.inc' %]