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">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</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 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %]
48 [% IF ( branchloop ) %]
49 <li><label for="branch">Library:</label>
50 <select name="branchcode" id="branch">
51 [% FOREACH branchloo IN branchloop %]
52 [% IF ( branchloo.selected ) %]
53 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
55 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
61 [% IF ( patron_reason_loop ) %]
63 <label for="patronreason">Reason for suggestion: </label>
64 <select name="patronreason" id="patronreason">
65 <option value="">-- Choose --</option>
66 [% FOREACH patron_reason_loo IN patron_reason_loop %]
67 <option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
73 <label for="note">Notes:</label>
74 <textarea name="note" id="note" rows="5" cols="40"></textarea>
77 <!-- Add a hidden 'negcap' field -->
78 <li id="negcap" style="position: absolute; left: -2000px;">
79 negcap <input type="text" name="negcap"/>
84 <fieldset class="action">
85 <input type="hidden" name="suggested_by_anyone" value="[% suggested_by_anyone %]" />
86 <input type="hidden" name="op" value="add_confirm" />
87 <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>
94 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
97 [% IF ( loggedinusername ) %]
98 Your purchase suggestions
104 [% FOR m IN messages %]
105 <div class="alert alert-[% m.type %]">
107 [% CASE 'already_exists' %]
108 The suggestion has not been added. A suggestion with this title already exists.
109 [% CASE 'success_on_inserted' %]
110 Your suggestion has been submitted.
117 [% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %]
119 [% IF ( suggestions_loop ) %]
120 <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get">
122 <label for="title">Search for:</label>
123 <input type="text" name="title" id="title" value="[% title |html %]" />
124 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
125 [% IF loggedinusername %]
126 <label for="suggested_by_anyone">Suggested by:</label>
127 <div class="input-append">
128 <select name="suggested_by_anyone" id="suggested_by_anyone">
129 [% IF suggested_by_anyone %]
130 <option value="0">Me</option>
131 <option value="1" selected="selected">Anyone</option>
133 <option value="0" selected="selected">Me</option>
134 <option value="1">Anyone</option>
137 <button type="submit" class="btn">Go</button>
143 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform">
144 <input type="hidden" name="op" value="delete_confirm" />
145 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
146 <div id="toolbar" class="toolbar clearfix">
147 <a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>
151 [% IF ( loggedinusername ) %]
152 <div id="selections-toolbar" class="toolbar">
153 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
154 <span class="links"><span id="selections">Select suggestions to: </span>
155 <span id="removeitems"></span>
159 <table id="suggestt" class="checkboxed table table-bordered table-striped">
162 [% IF ( loggedinusername ) %]<th> </th>[% END %]
165 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
166 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
171 [% FOREACH suggestions_loo IN suggestions_loop %]
173 [% IF ( loggedinusername ) %]
175 [% IF ( suggestions_loo.showcheckbox ) %]
176 <input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" />
181 <p><strong>[% suggestions_loo.title |html %]</strong></p>
182 <p>[% IF ( suggestions_loo.author ) %][% suggestions_loo.author |html %],[% END %]
183 [% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate |html %],[% END %]
184 [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
185 [% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
186 [% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
187 [% IF ( suggestions_loo.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 1 ) %][% END %]
191 [% IF ( suggestions_loo.note ) %]
192 <span class="tdlabel">Note: </span>
193 [% suggestions_loo.note |html %]
196 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
198 [% IF ( suggestions_loo.branchcodesuggestedby ) %]
199 <span class="tdlabel">Suggested for:</span>
200 [% suggestions_loo.branchcodesuggestedby %]
204 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
206 [% IF ( suggestions_loo.surnamemanagedby ) %]
207 <span class="tdlabel">Managed by:</span>
208 [% suggestions_loo.surnamemanagedby %]
209 [% IF ( suggestions_loo.firstnamemanagedby ) %] , [% suggestions_loo.firstnamemanagedby %]
215 <span class="tdlabel">Status:</span>
216 [% IF ( suggestions_loo.ASKED ) %]Requested
217 [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
218 [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
219 [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
220 [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
221 [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
222 [% ELSE %] [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
223 [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason |html %])[% END %]
226 [% END # / FOREACH suggestions_loo %]
230 [% IF ( loggedinusername ) %]
231 <fieldset class="action">
232 <input type="submit" class="btn btn-danger" value="Delete selected" />
237 [% UNLESS Koha.Preference( 'OPACViewOthersSuggestions' ) or loggedinusername %]
238 <p>You are not authorized to see pending purchase suggestions.</p>
240 <p>There are no pending purchase suggestions.</p>
242 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
243 <p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p>
245 [% END # / IF suggestions_loop %]
247 [% END # IF op_else %]
248 </div> <!-- / #usersuggestions -->
249 </div> <!-- / .span10 -->
250 </div> <!-- / .row-fluid -->
251 </div> <!-- / .container-fluid -->
252 </div> <!-- / .main -->
254 [% INCLUDE 'opac-bottom.inc' %]
255 [% BLOCK jsinclude %]
256 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
257 [% INCLUDE 'datatables.inc' %]
258 <script type="text/javascript">
260 [% IF ( loggedinusername ) %]
261 function enableCheckboxActions(){
262 // Enable/disable controls if checkboxes are checked
263 var checkedBoxes = $(".checkboxed input:checkbox:checked");
264 if ($(checkedBoxes).size()) {
265 $("#selections").html(_("With selected suggestions: "));
266 $("#selections-toolbar .links a").removeClass("disabled");
268 $("#selections").html(_("Select suggestions to: "));
269 $("#selections-toolbar .links a").addClass("disabled");
275 $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
276 "aaSorting": [[ 1, "asc" ]],
278 [% IF ( loggedinusername ) %]{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }[% END %]
281 [% IF ( loggedinusername ) %]null,[% END %]
282 { "sType": "anti-the" },
284 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]null,[% END %]
285 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
289 [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
290 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
291 $("#CheckAll").click(function(){
292 $(".checkboxed").checkCheckboxes();
293 enableCheckboxActions();
296 $("#CheckNone").click(function(){
297 $(".checkboxed").unCheckCheckboxes();
298 enableCheckboxActions();
301 $(".cb").click(function(){
302 enableCheckboxActions();
304 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>")
307 $("#myform").submit();
310 enableCheckboxActions();
311 $("#myform").on('submit', function() {
312 if ( $("input:checked").size() < 1 ) {
313 alert(MSG_NO_SUGGESTION_SELECTED);
325 if(f.title.value.length ==0){
326 _alertString += _("- You must enter a Title") + "\n";
329 if (_alertString.length==0) {
332 alertString2 = _("Form not submitted because of the following problem(s)");
333 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
334 alertString2 += _alertString;