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 | html %]">
245 [% CASE 'biblio_exists' %]
246 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</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 | uri %]">[% m.title | html %]</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</th>
507 <th>Suggested on</th>
513 <th class="NoSort"> </th>
517 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
520 <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid | html %]" />
523 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
524 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
526 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
527 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
528 [% 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 %]
531 <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>
533 <td data-order="[% suggestions_loo.suggesteddate | html %]">
534 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
537 <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>
539 <td data-order="[% suggestions_loo.manageddate | html %]">
540 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
543 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
546 [% suggestions_loo.budget_name | html %]
549 [% IF ( suggestions_loo.ASKED ) %]
551 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
553 [% ELSIF ( suggestions_loo.ORDERED ) %]
555 [% ELSIF ( suggestions_loo.REJECTED ) %]
557 [% ELSIF ( suggestions_loo.CHECKED ) %]
559 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
561 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
562 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
567 [% IF ( suggestions_loo.reason ) %]
568 <br />([% suggestions_loo.reason | html %])
572 <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>
573 <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>
578 <div id="select-reason[% suggestion.suggestiontype | html %]">
579 <div id="status[% suggestion.suggestiontype | html %]">
580 <label for="STATUS[% suggestion.suggestiontype | html %]">Mark selected as: </label>
581 <select name="STATUS" id="STATUS[% suggestion.suggestiontype | html %]">
582 <option value=""> -- Choose a status --</option>
584 [% IF (statusselected_ASKED ) %]
585 <option value="ASKED" selected="selected">Pending</option>
587 <option value="ASKED">Pending</option>
590 [% IF (statusselected_ACCEPTED ) %]
591 <option value="ACCEPTED" selected="selected">Accepted</option>
593 <option value="ACCEPTED">Accepted</option>
596 [% IF (statusselected_CHECKED ) %]
597 <option value="CHECKED" selected="selected">Checked</option>
599 <option value="CHECKED">Checked</option>
602 [% IF ( statusselected_REJECTED ) %]
603 <option value="REJECTED" selected="selected">Rejected</option>
605 <option value="REJECTED">Rejected</option>
608 [% FOREACH s IN SuggestionStatuses %]
609 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
613 <label for="reason[% suggestion.suggestiontype | html %]">with this reason:</label>
614 <select id="reason[% suggestion.suggestiontype | html %]" name="reason[% suggestion.suggestiontype | html %]">
615 <option value=""> -- Choose a reason -- </option>
616 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
617 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
619 <option value="other">Others...</option>
622 <span id="other_reason[% suggestion.suggestiontype | html %]">
623 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype | html %]" name="other_reason[% suggestion.suggestiontype | html %]" placeholder="please note your reason here..." />
624 <a href="#back[% suggestion.suggestiontype | uri %]">Cancel</a>
627 <strong style="padding: 0 1em;">OR:</strong>
629 <label for="[% suggestion.suggestiontype | html %]delete">Delete selected</label>
630 <input type="checkbox" name="op" id="[% suggestion.suggestiontype | html %]delete" />
634 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
635 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype | html %]" />
636 <input type="hidden" name="op" value="change" />
638 <fieldset class="action">
639 <input type="submit" value="Submit" /></fieldset>
649 [% UNLESS ( op_save ) %]
650 [% UNLESS ( op == 'show' ) %]
653 </div> <!-- /.col-sm-10.col-sm-push-2 -->
655 <div class="col-sm-2 col-sm-pull-10">
658 <form name="suggestionfilter" action="suggestion.pl" method="get">
659 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
660 <select name="displayby" id="displayby" style="width:auto;">
661 [% IF ( displayby == "STATUS" ) %]
662 <option value="STATUS" selected="selected">Status</option>
664 <option value="STATUS">Status</option>
666 [% IF ( displayby == "branchcode" ) %]
667 <option value="branchcode" selected="selected">Library</option>
669 <option value="branchcode">Library</option>
671 [% IF ( displayby == "itemtype" ) %]
672 <option value="itemtype" selected="selected">Item type</option>
674 <option value="itemtype">Item type</option>
676 [% IF ( displayby == "managedby" ) %]
677 <option value="managedby" selected="selected">Managed by</option>
679 <option value="managedby">Managed by</option>
681 [% IF ( displayby == "acceptedby" ) %]
682 <option value="acceptedby" selected="selected">Accepted by</option>
684 <option value="acceptedby">Accepted by</option>
686 </select> <input type="submit" value="Go" /></li></ol></fieldset>
687 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
688 <div style="display:block;" id="limits">
690 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
691 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
692 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
693 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
694 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
695 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
696 <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>
698 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
701 <label for="STATUS"> Status:</label>
702 <select name="STATUS" id="STATUS">
703 <option value="">Any</option>
705 [% IF (statusselected_ASKED ) %]
706 <option value="ASKED" selected="selected">Pending</option>
708 <option value="ASKED">Pending</option>
711 [% IF (statusselected_ACCEPTED ) %]
712 <option value="ACCEPTED" selected="selected">Accepted</option>
714 <option value="ACCEPTED">Accepted</option>
717 [% IF (statusselected_CHECKED ) %]
718 <option value="CHECKED" selected="selected">Checked</option>
720 <option value="CHECKED">Checked</option>
723 [% IF ( statusselected_REJECTED ) %]
724 <option value="REJECTED" selected="selected">Rejected</option>
726 <option value="REJECTED">Rejected</option>
729 [% FOREACH s IN SuggestionStatuses %]
730 [% IF s.authorised_value == selected_status %]
731 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
733 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
739 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
740 [% 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 %]
743 <label for="suggesteddate_from">Suggested date from:</label>
744 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
747 <label for="suggesteddate_to">To:</label>
748 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
750 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
751 [% 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 %]
754 <label for="manageddate_from">Management date from:</label>
755 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
758 <label for="manageddate_to">To:</label>
759 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
761 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
762 [% 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 %]
765 <label for="accepteddate_from">Accepted date from:</label>
766 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
769 <label for="accepteddate_to">To:</label>
770 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
772 <li><input type="submit" value="Go" /></li></ol>
775 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
776 <ol><li><label for="budgetid"> Book fund:</label>
777 <select name="budgetid" id="budgetid">
778 <option value="__ANY__">Any</option>
779 [% IF budgetid == '__NONE__' %]
780 <option value="__NONE__" selected="selected">None</option>
782 <option value="__NONE__">None</option>
784 [% FOREACH budgetsloo IN budgetsloop %]
785 [% 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 %]
788 <li><label for="branchcode">Library:</label>
789 <select name="branchcode" id="branchcode">
790 <option value="__ANY__">Any</option>
791 [% IF branchfilter %]
792 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
794 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
796 </select></li><li><input type="submit" value="Go" /></li></ol>
799 [% INCLUDE 'acquisitions-menu.inc' %]
802 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
803 </div> <!-- /.row -->
810 [% MACRO jsinclude BLOCK %]
811 [% INCLUDE 'calendar.inc' %]
812 [% IF ( op == 'show' || op_else ) %]
813 <script type="text/javascript">
814 $(document).ready(function(){
815 $(".deletesuggestion").on("click",function(){
816 return confirm(_("Are you sure you want to delete this suggestion?"));
822 [% INCLUDE 'datatables.inc' %]
823 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
824 <script type="text/javascript">
827 * This function display the select or an textaera to write a reason.
829 function displayOther(id,show,hide){
830 $("#"+hide+id).hide();
831 $("#"+show+id).show();
833 $(document).ready(function() {
834 $('#suggestiontabs').tabs({
835 // Correct table sizing for tables hidden in tabs
836 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
837 "activate": function(event, ui) {
838 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
841 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
843 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
844 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
846 "sPaginationType": "full"
848 [% FOREACH suggestion IN suggestions %]
849 // functions for [% suggestion.suggestiontype | html %] interactions
850 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
851 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
854 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
855 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
858 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
859 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
860 if($(this).val() == "other"){
862 $("#other_reason[% suggestion.suggestiontype | html %]").show();
865 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
867 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
869 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
874 $("a[href*=back]").click(function(){
875 var sid = $(this).attr("href").replace(/#back/,"");
876 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
877 $("#other_reason"+sid).hide();
879 $("h4.local_collapse a").click(function(){
880 $(this).parent().parent().find("ol").toggle();
883 // http://jqueryui.com/demos/datepicker/#date-range
884 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
887 onSelect: function( selectedDate ) {
888 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
889 instance = $( this ).data( "datepicker" );
890 date = $.datepicker.parseDate(
891 instance.settings.dateFormat ||
892 $.datepicker._defaults.dateFormat,
893 selectedDate, instance.settings );
894 dates.not( this ).datepicker( "option", option, date );
897 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
900 onSelect: function( selectedDate ) {
901 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
902 instance = $( this ).data( "datepicker" );
903 date = $.datepicker.parseDate(
904 instance.settings.dateFormat ||
905 $.datepicker._defaults.dateFormat,
906 selectedDate, instance.settings );
907 datesMD.not( this ).datepicker( "option", option, date );
910 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
913 onSelect: function( selectedDate ) {
914 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
915 instance = $( this ).data( "datepicker" );
916 date = $.datepicker.parseDate(
917 instance.settings.dateFormat ||
918 $.datepicker._defaults.dateFormat,
919 selectedDate, instance.settings );
920 datesAD.not( this ).datepicker( "option", option, date );
924 $("form.update_suggestions").on("submit", function(e){
926 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
927 if ( action_delete_selected ) {
928 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
929 if ( suggestions_to_delete.length == 0 ) {
930 alert(_("Please select at least one suggestion to delete"));
933 } else if ( suggestions_to_delete.length == 1 ) {
934 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
938 } else if ( suggestions_to_delete.length > 1 ) {
939 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
951 <script type="text/javascript">
952 $(document).ready(function(){
954 $("#quantity,#price,#currency").on("change",function(){
958 [% IF other_reason %]
959 $(".select-reason").hide();
960 $(".select-reason").find("option[value='other']").attr("selected","selected");
961 $("#other_reason").show();
963 $("#other_reason").hide();
965 $(".select-reason").change(function(){
966 if($(this).val() == "other"){
968 $("#other_reason").show();
971 $("a[href*=back]").click(function(){
972 $(".select-reason").show().find("option[value='']").attr("selected","selected");
973 $("#other_reason").hide();
978 [% Asset.js("js/acq.js") | $raw %]
979 [% Asset.js("js/acquisitions-menu.js") | $raw %]
982 [% INCLUDE 'intranet-bottom.inc' %]