2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
5 [% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
6 [% IF ( op_else ) %]Purchase Suggestions[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
10 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usersuggestions' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-suggestions' bodyclass='scrollto' %][% END %]
11 [% INCLUDE 'masthead.inc' %]
14 <ul class="breadcrumb">
15 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
16 <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li>
17 <li><a href="#">Your purchase suggestions</a></li>
20 <div class="container-fluid">
21 <div class="row-fluid">
24 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
28 <div id="usersuggestions" class="maincontent">
30 <h1>Enter a new purchase suggestion</h1>
32 <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p>
33 <p>Only the title is required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p>
35 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
36 <fieldset class="rows">
38 <li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
39 <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
40 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li>
41 <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
42 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
43 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" class="span6" maxlength="80" /></li>
44 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" maxlength="80" /></li>
45 <li><label for="itemtype">Item type:</label>
46 <select name="itemtype" id="itemtype">
47 <option value="">Default</option>
48 [% FOREACH itemtypeloo IN itemtypeloop %]
49 [% IF ( itemtypeloo.selected ) %]
50 <option value="[% itemtypeloo.itemtype %]" selected="selected">
52 <option value="[% itemtypeloo.itemtype %]">
54 [% itemtypeloo.translated_description %]
59 [% IF ( branchloop ) %]
60 <li><label for="branch">Library:</label>
61 <select name="branchcode" id="branch">
62 [% FOREACH branchloo IN branchloop %]
63 [% IF ( branchloo.selected ) %]
64 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
66 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
72 [% IF ( patron_reason_loop ) %]
74 <label for="patronreason">Reason for suggestion: </label>
75 <select name="patronreason" id="patronreason">
76 <option value="">-- Choose --</option>
77 [% FOREACH patron_reason_loo IN patron_reason_loop %]
78 <option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
84 <label for="note">Notes:</label>
85 <textarea name="note" id="note" rows="5" cols="40"></textarea>
88 <!-- Add a hidden 'negcap' field -->
89 <li id="negcap" style="position: absolute; left: -2000px;">
90 negcap <input type="text" name="negcap"/>
95 <fieldset class="action">
96 <input type="hidden" name="suggested_by_anyone" value="[% suggested_by_anyone %]" />
97 <input type="hidden" name="op" value="add_confirm" />
98 <input type="submit" onclick="Check(this.form); return false;" class="btn" value="Submit your suggestion" /> <a class="action" href="/cgi-bin/koha/opac-suggestions.pl">Cancel</a>
101 [% END # IF op_add %]
105 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
108 [% IF ( loggedinusername ) %]
109 Your purchase suggestions
115 [% FOR m IN messages %]
116 <div class="alert alert-[% m.type %]">
118 [% CASE 'already_exists' %]
119 The suggestion has not been added. A suggestion with this title already exists.
120 [% CASE 'success_on_inserted' %]
121 Your suggestion has been submitted.
128 [% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %]
130 [% IF ( suggestions_loop ) %]
131 <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get">
133 <label for="title">Search for:</label>
134 <input type="text" name="title" id="title" value="[% title |html %]" />
135 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
136 [% IF loggedinusername %]
137 <label for="suggested_by_anyone">Suggested by:</label>
138 <div class="input-append">
139 <select name="suggested_by_anyone" id="suggested_by_anyone">
140 [% IF suggested_by_anyone %]
141 <option value="0">Me</option>
142 <option value="1" selected="selected">Anyone</option>
144 <option value="0" selected="selected">Me</option>
145 <option value="1">Anyone</option>
148 <button type="submit" class="btn">Go</button>
154 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform">
155 <input type="hidden" name="op" value="delete_confirm" />
156 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
157 <div id="toolbar" class="toolbar clearfix">
158 <a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>
162 [% IF ( loggedinusername ) %]
163 <div id="selections-toolbar" class="toolbar">
164 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
165 <span class="links"><span id="selections">Select suggestions to: </span>
166 <span id="removeitems"></span>
170 <table id="suggestt" class="checkboxed table table-bordered table-striped">
173 [% IF ( loggedinusername ) %]<th> </th>[% END %]
176 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
177 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
182 [% FOREACH suggestions_loo IN suggestions_loop %]
184 [% IF ( loggedinusername ) %]
186 [% IF ( suggestions_loo.showcheckbox ) %]
187 <input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" />
192 <p><strong>[% suggestions_loo.title |html %]</strong></p>
193 <p>[% IF ( suggestions_loo.author ) %][% suggestions_loo.author |html %],[% END %]
194 [% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate |html %],[% END %]
195 [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
196 [% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
197 [% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
198 [% IF ( suggestions_loo.itemtype ) %] - [% suggestions_loo.itemtype %][% END %]
202 [% IF ( suggestions_loo.note ) %]
203 <span class="tdlabel">Note: </span>
204 [% suggestions_loo.note |html %]
207 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
209 [% IF ( suggestions_loo.branchcodesuggestedby ) %]
210 <span class="tdlabel">Suggested for:</span>
211 [% suggestions_loo.branchcodesuggestedby %]
215 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
217 [% IF ( suggestions_loo.surnamemanagedby ) %]
218 <span class="tdlabel">Managed by:</span>
219 [% suggestions_loo.surnamemanagedby %]
220 [% IF ( suggestions_loo.firstnamemanagedby ) %] , [% suggestions_loo.firstnamemanagedby %]
226 <span class="tdlabel">Status:</span>
227 [% IF ( suggestions_loo.ASKED ) %]Requested
228 [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
229 [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
230 [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
231 [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
232 [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
233 [% ELSE %] [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
234 [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason |html %])[% END %]
237 [% END # / FOREACH suggestions_loo %]
241 [% IF ( loggedinusername ) %]
242 <fieldset class="action">
243 <input type="submit" class="btn btn-danger" value="Delete selected" />
248 [% UNLESS Koha.Preference( 'OPACViewOthersSuggestions' ) or $loggedinusername %]
249 <p>You are not authorized to see pending purchase suggestions.</p>
251 <p>There are no pending purchase suggestions.</p>
253 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
254 <p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p>
256 [% END # / IF suggestions_loop %]
258 [% END # IF op_else %]
259 </div> <!-- / #usersuggestions -->
260 </div> <!-- / .span10 -->
261 </div> <!-- / .row-fluid -->
262 </div> <!-- / .container-fluid -->
263 </div> <!-- / .main -->
265 [% INCLUDE 'opac-bottom.inc' %]
266 [% BLOCK jsinclude %]
267 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
268 [% INCLUDE 'datatables.inc' %]
269 <script type="text/javascript">
271 [% IF ( loggedinusername ) %]
272 function enableCheckboxActions(){
273 // Enable/disable controls if checkboxes are checked
274 var checkedBoxes = $(".checkboxed input:checkbox:checked");
275 if ($(checkedBoxes).size()) {
276 $("#selections").html(_("With selected suggestions: "));
277 $("#selections-toolbar .links a").removeClass("disabled");
279 $("#selections").html(_("Select suggestions to: "));
280 $("#selections-toolbar .links a").addClass("disabled");
286 $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
287 "aaSorting": [[ 1, "asc" ]],
289 [% IF ( loggedinusername ) %]{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }[% END %]
292 [% IF ( loggedinusername ) %]null,[% END %]
293 { "sType": "anti-the" },
295 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]null,[% END %]
296 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
300 [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
301 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
302 $("#CheckAll").click(function(){
303 $(".checkboxed").checkCheckboxes();
304 enableCheckboxActions();
307 $("#CheckNone").click(function(){
308 $(".checkboxed").unCheckCheckboxes();
309 enableCheckboxActions();
312 $(".cb").click(function(){
313 enableCheckboxActions();
315 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>")
318 $("#myform").submit();
321 enableCheckboxActions();
322 $("#myform").on('submit', function() {
323 if ( $("input:checked").size() < 1 ) {
324 alert(MSG_NO_SUGGESTION_SELECTED);
336 if(f.title.value.length ==0){
337 _alertString += _("- You must enter a Title") + "\n";
340 if (_alertString.length==0) {
343 alertString2 = _("Form not submitted because of the following problem(s)");
344 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
345 alertString2 += _alertString;