2 [% USE AuthorisedValues %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
6 [% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
7 [% IF ( op_else ) %]Purchase Suggestions[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% BLOCK cssinclude %][% END %]
11 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usersuggestions' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-suggestions' bodyclass='scrollto' %][% END %]
12 [% INCLUDE 'masthead.inc' %]
15 <ul class="breadcrumb">
16 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
17 <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">›</span></li>
18 <li><a href="#">Your purchase suggestions</a></li>
21 <div class="container-fluid">
22 <div class="row-fluid">
25 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
29 <div id="usersuggestions" class="maincontent">
31 <h1>Enter a new purchase suggestion</h1>
33 <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p>
34 <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>
36 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
37 <fieldset class="rows">
39 <li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
40 <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
41 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li>
42 <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
43 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
44 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" class="span6" maxlength="80" /></li>
45 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" maxlength="80" /></li>
46 <li><label for="itemtype">Item type:</label>
47 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %]
49 [% IF ( branchloop ) %]
50 <li><label for="branch">Library:</label>
51 <select name="branchcode" id="branch">
52 [% FOREACH branchloo IN branchloop %]
53 [% IF ( branchloo.selected ) %]
54 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
56 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
62 [% IF ( patron_reason_loop ) %]
64 <label for="patronreason">Reason for suggestion: </label>
65 <select name="patronreason" id="patronreason">
66 <option value="">-- Choose --</option>
67 [% FOREACH patron_reason_loo IN patron_reason_loop %]
68 <option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
74 <label for="note">Notes:</label>
75 <textarea name="note" id="note" rows="5" cols="40"></textarea>
78 <!-- Add a hidden 'negcap' field -->
79 <li id="negcap" style="position: absolute; left: -2000px;">
80 negcap <input type="text" name="negcap"/>
85 <fieldset class="action">
86 <input type="hidden" name="suggested_by_anyone" value="[% suggested_by_anyone %]" />
87 <input type="hidden" name="op" value="add_confirm" />
88 <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>
95 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
98 [% IF ( loggedinusername ) %]
99 Your purchase suggestions
105 [% FOR m IN messages %]
106 <div class="alert alert-[% m.type %]">
108 [% CASE 'already_exists' %]
109 The suggestion has not been added. A suggestion with this title already exists.
110 [% CASE 'success_on_inserted' %]
111 Your suggestion has been submitted.
118 [% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %]
120 [% IF ( suggestions_loop ) %]
121 <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get">
123 <label for="title">Search for:</label>
124 <input type="text" name="title" id="title" value="[% title |html %]" />
125 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
126 [% IF loggedinusername %]
127 <label for="suggested_by_anyone">Suggested by:</label>
128 <div class="input-append">
129 <select name="suggested_by_anyone" id="suggested_by_anyone">
130 [% IF suggested_by_anyone %]
131 <option value="0">Me</option>
132 <option value="1" selected="selected">Anyone</option>
134 <option value="0" selected="selected">Me</option>
135 <option value="1">Anyone</option>
138 <button type="submit" class="btn">Go</button>
144 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform">
145 <input type="hidden" name="op" value="delete_confirm" />
146 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
147 <div id="toolbar" class="toolbar clearfix">
148 <a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>
152 [% IF ( loggedinusername ) %]
153 <div id="selections-toolbar" class="toolbar">
154 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
155 <span class="links"><span id="selections">Select suggestions to: </span>
156 <span id="removeitems"></span>
160 <table id="suggestt" class="checkboxed table table-bordered table-striped">
163 [% IF ( loggedinusername ) %]<th> </th>[% END %]
165 <th>Suggested on</th>
167 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
168 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
173 [% FOREACH suggestions_loo IN suggestions_loop %]
175 [% IF ( loggedinusername ) %]
177 [% IF ( suggestions_loo.showcheckbox ) %]
178 <input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" />
183 <p><strong>[% suggestions_loo.title |html %]</strong></p>
184 <p>[% IF ( suggestions_loo.author ) %][% suggestions_loo.author |html %],[% END %]
185 [% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate |html %],[% END %]
186 [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
187 [% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
188 [% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
189 [% IF ( suggestions_loo.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 1 ) %][% END %]
193 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate |$KohaDates %][% END %]
196 [% IF ( suggestions_loo.note ) %]
197 <span class="tdlabel">Note: </span>
198 [% suggestions_loo.note |html %]
201 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
203 [% IF ( suggestions_loo.branchcodesuggestedby ) %]
204 <span class="tdlabel">Suggested for:</span>
205 [% suggestions_loo.branchcodesuggestedby %]
209 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
211 [% IF ( suggestions_loo.surnamemanagedby ) %]
212 <span class="tdlabel">Managed by:</span>
213 [% suggestions_loo.surnamemanagedby %]
214 [% IF ( suggestions_loo.firstnamemanagedby ) %] , [% suggestions_loo.firstnamemanagedby %]
220 <span class="tdlabel">Status:</span>
221 [% IF ( suggestions_loo.ASKED ) %]Requested
222 [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
223 [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
224 [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
225 [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
226 [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
227 [% ELSE %] [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
228 [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason |html %])[% END %]
231 [% END # / FOREACH suggestions_loo %]
235 [% IF ( loggedinusername ) %]
236 <fieldset class="action">
237 <input type="submit" class="btn btn-danger" value="Delete selected" />
242 [% UNLESS Koha.Preference( 'OPACViewOthersSuggestions' ) or loggedinusername %]
243 <p>You are not authorized to see pending purchase suggestions.</p>
245 <p>There are no pending purchase suggestions.</p>
247 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
248 <p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p>
250 [% END # / IF suggestions_loop %]
252 [% END # IF op_else %]
253 </div> <!-- / #usersuggestions -->
254 </div> <!-- / .span10 -->
255 </div> <!-- / .row-fluid -->
256 </div> <!-- / .container-fluid -->
257 </div> <!-- / .main -->
259 [% INCLUDE 'opac-bottom.inc' %]
260 [% BLOCK jsinclude %]
261 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
262 [% INCLUDE 'datatables.inc' %]
263 <script type="text/javascript">
265 [% IF ( loggedinusername ) %]
266 function enableCheckboxActions(){
267 // Enable/disable controls if checkboxes are checked
268 var checkedBoxes = $(".checkboxed input:checkbox:checked");
269 if ($(checkedBoxes).size()) {
270 $("#selections").html(_("With selected suggestions: "));
271 $("#selections-toolbar .links a").removeClass("disabled");
273 $("#selections").html(_("Select suggestions to: "));
274 $("#selections-toolbar .links a").addClass("disabled");
280 $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
281 "aaSorting": [[ 1, "asc" ]],
283 [% IF ( loggedinusername ) %]{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }[% END %]
286 [% IF ( loggedinusername ) %]null,[% END %]
287 { "sType": "anti-the" },
290 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]null,[% END %]
291 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
295 [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
296 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
297 $("#CheckAll").click(function(){
298 $(".checkboxed").checkCheckboxes();
299 enableCheckboxActions();
302 $("#CheckNone").click(function(){
303 $(".checkboxed").unCheckCheckboxes();
304 enableCheckboxActions();
307 $(".cb").click(function(){
308 enableCheckboxActions();
310 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>")
313 $("#myform").submit();
316 enableCheckboxActions();
317 $("#myform").on('submit', function() {
318 if ( $("input:checked").size() < 1 ) {
319 alert(MSG_NO_SUGGESTION_SELECTED);
331 if(f.title.value.length ==0){
332 _alertString += _("- You must enter a Title") + "\n";
335 if (_alertString.length==0) {
338 alertString2 = _("Form not submitted because of the following problem(s)");
339 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
340 alertString2 += _alertString;