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 %]
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 class="main container-fluid">
55 <div class="col-md-8 col-md-offset-2">
57 <div id="toolbar" class="btn-toolbar">
58 <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>
59 <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>
62 <fieldset class="rows">
63 <legend>Bibliographic information</legend>
67 <span class="label">Title:</span>
73 <span class="label">Author:</span>
77 [% IF ( copyrightdate ) %]
79 <span class="label">Copyright date:</span>
80 [% copyrightdate | html %]
85 <span class="label">ISBN or ISSN or other standard number:</span>
89 [% IF ( publishercode ) %]
91 <span class="label">Publisher:</span>
92 [% publishercode | html %]
97 <span class="label">Publication place:</span>
101 [% IF ( collectiontitle ) %]
103 <span class="label">Collection title:</span>
104 [% collectiontitle | html %]
107 [% IF ( itemtype ) %]
109 <span class="label">Document type:</span>
110 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
113 [% IF ( patron_reason_loop ) %]
114 <li><span class="label">Reason for suggestion: </span>
115 [% FOREACH patron_reason_loo IN patron_reason_loop %]
116 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
122 <span class="label">Notes:</span>
128 <fieldset class="rows"> <legend>Suggestion management</legend>
131 <span class="label">Status:</span>
132 [% SET status_found = 0 %]
133 [% IF ( STATUS == 'ASKED' ) %]
135 [% SET status_found = 1 %]
136 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
138 [% SET status_found = 1 %]
139 [% ELSIF ( STATUS == 'CHECKED' ) %]
141 [% SET status_found = 1 %]
142 [% ELSIF ( STATUS == 'REJECTED' ) %]
144 [% SET status_found = 1 %]
146 [% FOREACH s IN SuggestionStatuses %]
147 [% IF STATUS == s.authorised_value %]
149 [% SET status_found = 1 %]
157 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
161 <td>[% suggesteddate | $KohaDates %]</td>
163 [% IF ( suggestedby_borrowernumber ) %]
164 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
165 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
171 <td>[% manageddate | $KohaDates %]</td>
173 [% IF ( managedby_borrowernumber ) %]
174 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
175 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
180 <th>Accepted on:</th>
181 <td>[% accepteddate | $KohaDates %]</td>
183 [% IF ( acceptedby_borrowernumber ) %]
184 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
185 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
192 <fieldset class="rows"> <legend>Acquisition information</legend>
195 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
198 <span class="label">Fund:</span> [% budgetname | html %]
201 <span class="label">Copies:</span>[% quantity | html %]
204 <span class="label">Currency:</span>[% currency | html %]
207 <span class="label">Price:</span>[% price | $Price %]
210 <span class="label">Total</span>[% total | $Price %]
215 <fieldset class="action">
216 <a href="suggestion.pl"><< Back to suggestions</a>
225 <div class="main container-fluid">
227 <div class="col-md-8 col-md-offset-2">
229 <div class="main container-fluid">
231 <div class="col-sm-10 col-sm-push-2">
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 | uri %]">[% 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 | uri %]">[% 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 | uri %]">[% 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 | uri %]">
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 | uri %]&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 | uri %]">[% 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 | uri %]">[% 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 | uri %]">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>
606 [% UNLESS ( op_save ) %]
607 [% UNLESS ( op == 'show' ) %]
610 </div> <!-- /.col-sm-10.col-sm-push-2 -->
612 <div class="col-sm-2 col-sm-pull-10">
615 <form name="suggestionfilter" action="suggestion.pl" method="get">
616 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
617 <select name="displayby" id="displayby" style="width:auto;">
618 [% IF ( displayby == "STATUS" ) %]
619 <option value="STATUS" selected="selected">Status</option>
621 <option value="STATUS">Status</option>
623 [% IF ( displayby == "branchcode" ) %]
624 <option value="branchcode" selected="selected">Library</option>
626 <option value="branchcode">Library</option>
628 [% IF ( displayby == "itemtype" ) %]
629 <option value="itemtype" selected="selected">Item type</option>
631 <option value="itemtype">Item type</option>
633 [% IF ( displayby == "managedby" ) %]
634 <option value="managedby" selected="selected">Managed by</option>
636 <option value="managedby">Managed by</option>
638 [% IF ( displayby == "acceptedby" ) %]
639 <option value="acceptedby" selected="selected">Accepted by</option>
641 <option value="acceptedby">Accepted by</option>
643 </select> <input type="submit" value="Go" /></li></ol></fieldset>
644 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
645 <div style="display:block;" id="limits">
647 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
648 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
649 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
650 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
651 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
652 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
653 <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>
655 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
658 <label for="STATUS"> Status:</label>
659 <select name="STATUS" id="STATUS">
660 <option value="">Any</option>
662 [% IF (statusselected_ASKED ) %]
663 <option value="ASKED" selected="selected">Pending</option>
665 <option value="ASKED">Pending</option>
668 [% IF (statusselected_ACCEPTED ) %]
669 <option value="ACCEPTED" selected="selected">Accepted</option>
671 <option value="ACCEPTED">Accepted</option>
674 [% IF (statusselected_CHECKED ) %]
675 <option value="CHECKED" selected="selected">Checked</option>
677 <option value="CHECKED">Checked</option>
680 [% IF ( statusselected_REJECTED ) %]
681 <option value="REJECTED" selected="selected">Rejected</option>
683 <option value="REJECTED">Rejected</option>
686 [% FOREACH s IN SuggestionStatuses %]
687 [% IF s.authorised_value == selected_status %]
688 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
690 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
696 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
697 [% 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 %]
700 <label for="suggesteddate_from">Suggested date from:</label>
701 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
704 <label for="suggesteddate_to">To:</label>
705 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
707 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
708 [% 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 %]
711 <label for="manageddate_from">Management date from:</label>
712 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
715 <label for="manageddate_to">To:</label>
716 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
718 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
719 [% 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 %]
722 <label for="accepteddate_from">Accepted date from:</label>
723 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
726 <label for="accepteddate_to">To:</label>
727 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
729 <li><input type="submit" value="Go" /></li></ol>
732 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
733 <ol><li><label for="budgetid"> Book fund:</label>
734 <select name="budgetid" id="budgetid">
735 <option value="__ANY__">Any</option>
736 [% IF budgetid == '__NONE__' %]
737 <option value="__NONE__" selected="selected">None</option>
739 <option value="__NONE__">None</option>
741 [% FOREACH budgetid_loo IN budgetid_loop %]
742 [% 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 %]
745 <li><label for="branchcode">Library:</label>
746 <select name="branchcode" id="branchcode">
747 <option value="__ANY__">Any</option>
748 [% IF branchfilter %]
749 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
751 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
753 </select></li><li><input type="submit" value="Go" /></li></ol>
756 [% INCLUDE 'acquisitions-menu.inc' %]
759 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
760 </div> <!-- /.row -->
767 [% MACRO jsinclude BLOCK %]
768 [% INCLUDE 'calendar.inc' %]
769 [% IF ( op == 'show' || op_else ) %]
770 <script type="text/javascript">
771 $(document).ready(function(){
772 $(".deletesuggestion").on("click",function(){
773 return confirm(_("Are you sure you want to delete this suggestion?"));
779 [% INCLUDE 'datatables.inc' %]
780 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
781 <script type="text/javascript">
784 * This function display the select or an textaera to write a reason.
786 function displayOther(id,show,hide){
787 $("#"+hide+id).hide();
788 $("#"+show+id).show();
790 $(document).ready(function() {
791 $('#suggestiontabs').tabs({
792 // Correct table sizing for tables hidden in tabs
793 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
794 "activate": function(event, ui) {
795 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
798 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
800 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
801 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
803 "sPaginationType": "four_button"
805 [% FOREACH suggestion IN suggestions %]
806 // functions for [% suggestion.suggestiontype | html %] interactions
807 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
808 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
811 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
812 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
815 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
816 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
817 if($(this).val() == "other"){
819 $("#other_reason[% suggestion.suggestiontype | html %]").show();
822 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
824 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
826 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
831 $("a[href*=back]").click(function(){
832 var sid = $(this).attr("href").replace(/#back/,"");
833 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
834 $("#other_reason"+sid).hide();
836 $("h4.local_collapse a").click(function(){
837 $(this).parent().parent().find("ol").toggle();
840 // http://jqueryui.com/demos/datepicker/#date-range
841 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
844 onSelect: function( selectedDate ) {
845 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
846 instance = $( this ).data( "datepicker" );
847 date = $.datepicker.parseDate(
848 instance.settings.dateFormat ||
849 $.datepicker._defaults.dateFormat,
850 selectedDate, instance.settings );
851 dates.not( this ).datepicker( "option", option, date );
854 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
857 onSelect: function( selectedDate ) {
858 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
859 instance = $( this ).data( "datepicker" );
860 date = $.datepicker.parseDate(
861 instance.settings.dateFormat ||
862 $.datepicker._defaults.dateFormat,
863 selectedDate, instance.settings );
864 datesMD.not( this ).datepicker( "option", option, date );
867 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
870 onSelect: function( selectedDate ) {
871 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
872 instance = $( this ).data( "datepicker" );
873 date = $.datepicker.parseDate(
874 instance.settings.dateFormat ||
875 $.datepicker._defaults.dateFormat,
876 selectedDate, instance.settings );
877 datesAD.not( this ).datepicker( "option", option, date );
881 $("form.update_suggestions").on("submit", function(e){
883 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
884 if ( action_delete_selected ) {
885 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
886 if ( suggestions_to_delete.length == 0 ) {
887 alert(_("Please select at least one suggestion to delete"));
890 } else if ( suggestions_to_delete.length == 1 ) {
891 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
895 } else if ( suggestions_to_delete.length > 1 ) {
896 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
908 <script type="text/javascript">
909 $(document).ready(function(){
911 $("#quantity,#price,#currency").on("change",function(){
915 [% IF other_reason %]
916 $(".select-reason").hide();
917 $(".select-reason").find("option[value='other']").attr("selected","selected");
918 $("#other_reason").show();
920 $("#other_reason").hide();
922 $(".select-reason").change(function(){
923 if($(this).val() == "other"){
925 $("#other_reason").show();
928 $("a[href*=back]").click(function(){
929 $(".select-reason").show().find("option[value='']").attr("selected","selected");
930 $("#other_reason").hide();
935 [% Asset.js("js/acq.js") | $raw %]
936 [% Asset.js("js/acquisitions-menu.js") | $raw %]
939 [% INCLUDE 'intranet-bottom.inc' %]