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' %]
27 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
28 .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; } div.note { background: transparent none; border-style: dotted; border-width: 1px 0 0 0; font-size : 90%; padding: 2px 0 0 0; } div.note i { color: #CCC; }
33 <body id="acq_suggestion" class="acq">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'cat-search.inc' %]
36 <div id="breadcrumbs">
37 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
39 [% IF ( suggestionid ) %]
40 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
44 [% ELSIF ( op == 'show' ) %]
45 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
47 Suggestions management
51 [% IF ( op == 'show' ) %]
52 <div class="main container-fluid">
54 <div class="col-md-8 col-md-offset-2">
56 <div id="toolbar" class="btn-toolbar">
57 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
58 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
61 <fieldset class="rows">
62 <legend>Bibliographic information</legend>
66 <span class="label">Title:</span>
72 <span class="label">Author:</span>
76 [% IF ( copyrightdate ) %]
78 <span class="label">Copyright date:</span>
79 [% copyrightdate | html %]
84 <span class="label">ISBN or ISSN or other standard number:</span>
88 [% IF ( publishercode ) %]
90 <span class="label">Publisher:</span>
91 [% publishercode | html %]
96 <span class="label">Publication place:</span>
100 [% IF ( collectiontitle ) %]
102 <span class="label">Collection title:</span>
103 [% collectiontitle | html %]
106 [% IF ( itemtype ) %]
108 <span class="label">Document type:</span>
109 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
112 [% IF ( patron_reason_loop ) %]
113 <li><span class="label">Reason for suggestion: </span>
114 [% FOREACH patron_reason_loo IN patron_reason_loop %]
115 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
121 <span class="label">Notes:</span>
127 <fieldset class="rows"> <legend>Suggestion management</legend>
130 <span class="label">Status:</span>
131 [% SET status_found = 0 %]
132 [% IF ( STATUS == 'ASKED' ) %]
134 [% SET status_found = 1 %]
135 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
137 [% SET status_found = 1 %]
138 [% ELSIF ( STATUS == 'CHECKED' ) %]
140 [% SET status_found = 1 %]
141 [% ELSIF ( STATUS == 'REJECTED' ) %]
143 [% SET status_found = 1 %]
144 [% ELSIF ( STATUS == 'ORDERED' ) %]
146 [% SET status_found = 1 %]
147 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
149 [% SET status_found = 1 %]
151 [% FOREACH s IN SuggestionStatuses %]
152 [% IF STATUS == s.authorised_value %]
154 [% SET status_found = 1 %]
162 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
166 <td>[% suggesteddate | $KohaDates %]</td>
168 [% IF ( suggestedby_borrowernumber ) %]
169 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
170 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
176 <td>[% manageddate | $KohaDates %]</td>
178 [% IF ( managedby_borrowernumber ) %]
179 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
180 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
185 <th>Accepted on:</th>
186 <td>[% accepteddate | $KohaDates %]</td>
188 [% IF ( acceptedby_borrowernumber ) %]
189 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
190 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
197 <fieldset class="rows"> <legend>Acquisition information</legend>
200 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
203 <span class="label">Fund:</span> [% budgetname | html %]
206 <span class="label">Copies:</span>[% quantity | html %]
209 <span class="label">Currency:</span>[% currency | html %]
212 <span class="label">Price:</span>[% price | $Price %]
215 <span class="label">Total</span>[% total | $Price %]
220 <fieldset class="action">
221 <a href="suggestion.pl"><< Back to suggestions</a>
230 <div class="main container-fluid">
232 <div class="col-md-8 col-md-offset-2">
234 <div class="main container-fluid">
236 <div class="col-sm-10 col-sm-push-2">
242 [% FOR m IN messages %]
243 <div class="dialog [% m.type %]">
245 [% CASE 'biblio_exists' %]
246 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id %]">[% m.title %]</a>. Click on "Confirm your suggestion" to ignore this message.
252 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
253 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
254 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
255 [% IF ( suggestionid ) %]
256 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
257 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
259 <h1>Enter a new purchase suggestion</h1>
261 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
263 <label for="title" class="required">Title:</label>
264 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
265 <span class="required">Required</span>
267 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
268 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
269 <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>
270 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
271 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
272 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
273 <li><label for="itemtype">Document type:</label>
274 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
276 [% IF patron_reason_loop %]
278 <label for="patronreason">Reason for suggestion: </label>
279 <select name="patronreason" id="patronreason">
280 <option value=""> -- Choose -- </option>
281 [% FOREACH patron_reason_loo IN patron_reason_loop %]
282 [% IF patron_reason_loo.authorised_value == patronreason %]
283 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
285 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
291 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
294 <fieldset class="rows"> <legend>Suggestion management</legend>
296 [% IF ( suggestionid ) %]
298 <label for="STATUS">Status:</label>
299 <select id="STATUS" name="STATUS">
300 <option value="">No status</option>
302 [% IF (statusselected_ASKED ) %]
303 <option value="ASKED" selected="selected">Pending</option>
305 <option value="ASKED">Pending</option>
308 [% IF (statusselected_ACCEPTED ) %]
309 <option value="ACCEPTED" selected="selected">Accepted</option>
311 <option value="ACCEPTED">Accepted</option>
314 [% IF (statusselected_CHECKED ) %]
315 <option value="CHECKED" selected="selected">Checked</option>
317 <option value="CHECKED">Checked</option>
320 [% IF ( statusselected_REJECTED ) %]
321 <option value="REJECTED" selected="selected">Rejected</option>
323 <option value="REJECTED">Rejected</option>
326 [% FOREACH s IN SuggestionStatuses %]
327 [% IF s.authorised_value == suggestion.STATUS %]
328 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
330 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
336 <label for="reason">Reason</label>
337 <select class="select-reason" id="reason" name="reason">
338 <option value=""> -- Choose a reason -- </option>
339 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
340 [% IF (reasonsloo.lib == suggestion.reason) %]
341 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
343 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
346 <option value="other">Others...</option>
349 <span id="other_reason" name="other_reason">
350 [% IF other_reason %]
351 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
353 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
355 <a href="#back">Cancel</a>
360 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
363 <th><label for="suggesteddate">Created by:</label> </th>
364 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
365 <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 %]
369 <th><label for="managedon">Managed by:</label> </th>
370 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
371 <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>
374 <th><label for="accepteddate">Accepted on:</label> </th>
375 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
376 <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>
381 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
382 <li><label for="branchcode">Library:</label>
383 <select name="branchcode" id="branchcode">
384 <option value="">Any</option>
385 [% IF branchfilter %]
386 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
388 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
392 <li><label for="budgetid">Fund:</label>
393 <select name="budgetid" id="budgetid">
394 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
395 [% 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 %]
397 </li><li><label for="quantity">Copies:</label>
398 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
401 <label for="currency">Currency:</label>
402 [% FOREACH c IN currencies %]
403 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
404 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
407 <select name="currency" id="currency">
408 [% FOREACH c IN currencies %]
409 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
410 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
411 [% ELSIF not c.archived %]
412 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
417 <li><label for="price">Price:</label>
418 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
419 </li><li><label for="total">Total: </label>
420 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
422 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
423 <fieldset class="action">
424 <input type="hidden" name="op" value="[% op | html %]" />
425 [% IF ( suggestionid ) %]
426 [% IF ( need_confirm ) %]
427 <input type="hidden" name="save_confirmed" value="1" />
428 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
430 <input type="submit" value="Save" />
432 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
434 [% IF ( need_confirm ) %]
435 <input type="hidden" name="save_confirmed" value="1" />
436 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
438 <input type="submit" value="Submit your suggestion" />
440 <a class="cancel" href="suggestion.pl">Cancel</a>
447 <div id="toolbar" class="btn-toolbar">
448 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
451 <h1>Suggestions management</h1>
454 [% FOR m IN messages %]
455 <div class="dialog [% m.type | html %]">
457 [% CASE 'already_exists' %]
458 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>)
459 [% CASE 'biblio_exists' %]
460 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id %]">[% m.title %]</a>. Click on "Confirm your suggestion" to ignore this message.
467 [% UNLESS ( notabs ) %]
468 <div id="suggestiontabs" class="toptabs">
469 <ul class="ui-tabs-nav">
470 [% FOREACH suggestion IN suggestions %]
472 <a href="#[% suggestion.suggestiontype | uri %]">
473 [% IF ( suggestion.suggestiontypelabel ) %]
474 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
475 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
476 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
477 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
478 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
479 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
480 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
481 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
483 [% IF ( suggestion.suggestiontype ) %]
484 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
489 ([% suggestion.suggestions_loop.size | html %])</a></li>
495 [% FOREACH suggestion IN suggestions %]
496 <div id="[% suggestion.suggestiontype | html %]">
497 <form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
499 [% IF ( suggestion.suggestions_loop ) %]
500 <p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
501 <table id="[% suggestion.suggestiontype | html %]t" class="sorted">
504 <th class="NoSort"> </th>
505 <th class="anti-the">Suggestion</th>
506 <th>Suggested by - on</th>
507 <th>Managed by - on</th>
511 <th class="NoSort"> </th>
515 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
518 <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid | html %]" />
521 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
522 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
524 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
525 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
526 [% 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 ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %]
529 <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>
530 [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
533 <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>
534 [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
537 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
540 [% suggestions_loo.budget_name | html %]
543 [% IF ( suggestions_loo.ASKED ) %]
545 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
547 [% ELSIF ( suggestions_loo.ORDERED ) %]
549 [% ELSIF ( suggestions_loo.REJECTED ) %]
551 [% ELSIF ( suggestions_loo.CHECKED ) %]
553 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
555 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
556 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
561 [% IF ( suggestions_loo.reason ) %]
562 <br />([% suggestions_loo.reason | html %])
566 <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>
567 <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>
572 <div id="select-reason[% suggestion.suggestiontype | html %]">
573 <div id="status[% suggestion.suggestiontype | html %]">
574 <label for="STATUS[% suggestion.suggestiontype | html %]">Mark selected as: </label>
575 <select name="STATUS" id="STATUS[% suggestion.suggestiontype | html %]">
576 <option value=""> -- Choose a status --</option>
578 [% IF (statusselected_ASKED ) %]
579 <option value="ASKED" selected="selected">Pending</option>
581 <option value="ASKED">Pending</option>
584 [% IF (statusselected_ACCEPTED ) %]
585 <option value="ACCEPTED" selected="selected">Accepted</option>
587 <option value="ACCEPTED">Accepted</option>
590 [% IF (statusselected_CHECKED ) %]
591 <option value="CHECKED" selected="selected">Checked</option>
593 <option value="CHECKED">Checked</option>
596 [% IF ( statusselected_REJECTED ) %]
597 <option value="REJECTED" selected="selected">Rejected</option>
599 <option value="REJECTED">Rejected</option>
602 [% FOREACH s IN SuggestionStatuses %]
603 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
607 <label for="reason[% suggestion.suggestiontype | html %]">with this reason:</label>
608 <select id="reason[% suggestion.suggestiontype | html %]" name="reason[% suggestion.suggestiontype | html %]">
609 <option value=""> -- Choose a reason -- </option>
610 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
611 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
613 <option value="other">Others...</option>
616 <span id="other_reason[% suggestion.suggestiontype | html %]">
617 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype | html %]" name="other_reason[% suggestion.suggestiontype | html %]" placeholder="please note your reason here..." />
618 <a href="#back[% suggestion.suggestiontype | uri %]">Cancel</a>
621 <strong style="padding: 0 1em;">OR:</strong>
623 <label for="[% suggestion.suggestiontype | html %]delete">Delete selected</label>
624 <input type="checkbox" name="op" id="[% suggestion.suggestiontype | html %]delete" />
628 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
629 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype | html %]" />
630 <input type="hidden" name="op" value="change" />
632 <fieldset class="action">
633 <input type="submit" value="Submit" /></fieldset>
643 [% UNLESS ( op_save ) %]
644 [% UNLESS ( op == 'show' ) %]
647 </div> <!-- /.col-sm-10.col-sm-push-2 -->
649 <div class="col-sm-2 col-sm-pull-10">
652 <form name="suggestionfilter" action="suggestion.pl" method="get">
653 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
654 <select name="displayby" id="displayby" style="width:auto;">
655 [% IF ( displayby == "STATUS" ) %]
656 <option value="STATUS" selected="selected">Status</option>
658 <option value="STATUS">Status</option>
660 [% IF ( displayby == "branchcode" ) %]
661 <option value="branchcode" selected="selected">Library</option>
663 <option value="branchcode">Library</option>
665 [% IF ( displayby == "itemtype" ) %]
666 <option value="itemtype" selected="selected">Item type</option>
668 <option value="itemtype">Item type</option>
670 [% IF ( displayby == "managedby" ) %]
671 <option value="managedby" selected="selected">Managed by</option>
673 <option value="managedby">Managed by</option>
675 [% IF ( displayby == "acceptedby" ) %]
676 <option value="acceptedby" selected="selected">Accepted by</option>
678 <option value="acceptedby">Accepted by</option>
680 </select> <input type="submit" value="Go" /></li></ol></fieldset>
681 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
682 <div style="display:block;" id="limits">
684 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
685 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
686 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
687 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
688 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
689 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
690 <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>
692 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
695 <label for="STATUS"> Status:</label>
696 <select name="STATUS" id="STATUS">
697 <option value="">Any</option>
699 [% IF (statusselected_ASKED ) %]
700 <option value="ASKED" selected="selected">Pending</option>
702 <option value="ASKED">Pending</option>
705 [% IF (statusselected_ACCEPTED ) %]
706 <option value="ACCEPTED" selected="selected">Accepted</option>
708 <option value="ACCEPTED">Accepted</option>
711 [% IF (statusselected_CHECKED ) %]
712 <option value="CHECKED" selected="selected">Checked</option>
714 <option value="CHECKED">Checked</option>
717 [% IF ( statusselected_REJECTED ) %]
718 <option value="REJECTED" selected="selected">Rejected</option>
720 <option value="REJECTED">Rejected</option>
723 [% FOREACH s IN SuggestionStatuses %]
724 [% IF s.authorised_value == selected_status %]
725 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
727 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
733 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
734 [% 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 %]
737 <label for="suggesteddate_from">Suggested date from:</label>
738 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
741 <label for="suggesteddate_to">To:</label>
742 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
744 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
745 [% 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 %]
748 <label for="manageddate_from">Management date from:</label>
749 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
752 <label for="manageddate_to">To:</label>
753 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
755 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
756 [% 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 %]
759 <label for="accepteddate_from">Accepted date from:</label>
760 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
763 <label for="accepteddate_to">To:</label>
764 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
766 <li><input type="submit" value="Go" /></li></ol>
769 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
770 <ol><li><label for="budgetid"> Book fund:</label>
771 <select name="budgetid" id="budgetid">
772 <option value="__ANY__">Any</option>
773 [% IF budgetid == '__NONE__' %]
774 <option value="__NONE__" selected="selected">None</option>
776 <option value="__NONE__">None</option>
778 [% FOREACH budgetsloo IN budgetsloop %]
779 [% 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 %]
782 <li><label for="branchcode">Library:</label>
783 <select name="branchcode" id="branchcode">
784 <option value="__ANY__">Any</option>
785 [% IF branchfilter %]
786 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
788 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
790 </select></li><li><input type="submit" value="Go" /></li></ol>
793 [% INCLUDE 'acquisitions-menu.inc' %]
796 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
797 </div> <!-- /.row -->
804 [% MACRO jsinclude BLOCK %]
805 [% INCLUDE 'calendar.inc' %]
806 [% IF ( op == 'show' || op_else ) %]
807 <script type="text/javascript">
808 $(document).ready(function(){
809 $(".deletesuggestion").on("click",function(){
810 return confirm(_("Are you sure you want to delete this suggestion?"));
816 [% INCLUDE 'datatables.inc' %]
817 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
818 <script type="text/javascript">
821 * This function display the select or an textaera to write a reason.
823 function displayOther(id,show,hide){
824 $("#"+hide+id).hide();
825 $("#"+show+id).show();
827 $(document).ready(function() {
828 $('#suggestiontabs').tabs({
829 // Correct table sizing for tables hidden in tabs
830 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
831 "activate": function(event, ui) {
832 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
835 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
837 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
838 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
840 "sPaginationType": "full"
842 [% FOREACH suggestion IN suggestions %]
843 // functions for [% suggestion.suggestiontype | html %] interactions
844 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
845 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
848 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
849 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
852 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
853 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
854 if($(this).val() == "other"){
856 $("#other_reason[% suggestion.suggestiontype | html %]").show();
859 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
861 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
863 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
868 $("a[href*=back]").click(function(){
869 var sid = $(this).attr("href").replace(/#back/,"");
870 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
871 $("#other_reason"+sid).hide();
873 $("h4.local_collapse a").click(function(){
874 $(this).parent().parent().find("ol").toggle();
877 // http://jqueryui.com/demos/datepicker/#date-range
878 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
881 onSelect: function( selectedDate ) {
882 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
883 instance = $( this ).data( "datepicker" );
884 date = $.datepicker.parseDate(
885 instance.settings.dateFormat ||
886 $.datepicker._defaults.dateFormat,
887 selectedDate, instance.settings );
888 dates.not( this ).datepicker( "option", option, date );
891 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
894 onSelect: function( selectedDate ) {
895 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
896 instance = $( this ).data( "datepicker" );
897 date = $.datepicker.parseDate(
898 instance.settings.dateFormat ||
899 $.datepicker._defaults.dateFormat,
900 selectedDate, instance.settings );
901 datesMD.not( this ).datepicker( "option", option, date );
904 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
907 onSelect: function( selectedDate ) {
908 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
909 instance = $( this ).data( "datepicker" );
910 date = $.datepicker.parseDate(
911 instance.settings.dateFormat ||
912 $.datepicker._defaults.dateFormat,
913 selectedDate, instance.settings );
914 datesAD.not( this ).datepicker( "option", option, date );
918 $("form.update_suggestions").on("submit", function(e){
920 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
921 if ( action_delete_selected ) {
922 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
923 if ( suggestions_to_delete.length == 0 ) {
924 alert(_("Please select at least one suggestion to delete"));
927 } else if ( suggestions_to_delete.length == 1 ) {
928 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
932 } else if ( suggestions_to_delete.length > 1 ) {
933 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
945 <script type="text/javascript">
946 $(document).ready(function(){
948 $("#quantity,#price,#currency").on("change",function(){
952 [% IF other_reason %]
953 $(".select-reason").hide();
954 $(".select-reason").find("option[value='other']").attr("selected","selected");
955 $("#other_reason").show();
957 $("#other_reason").hide();
959 $(".select-reason").change(function(){
960 if($(this).val() == "other"){
962 $("#other_reason").show();
965 $("a[href*=back]").click(function(){
966 $(".select-reason").show().find("option[value='']").attr("selected","selected");
967 $("#other_reason").hide();
972 [% Asset.js("js/acq.js") | $raw %]
973 [% Asset.js("js/acquisitions-menu.js") | $raw %]
976 [% INCLUDE 'intranet-bottom.inc' %]