Kyle M Hall
a8942c2884
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commite140603a59
. Revert "Bug 13618: Specific for branches.opac_info" This reverts commit06e4a50f00
. Revert "Bug 13618: (follow-up) Specific for other prefs" This reverts commitd6475a111f
. Revert "Bug 13618: Fix for debarredcomment and patron messages" This reverts commitdd98c9df92
. Revert "Bug 13618: Do not display html tags in patron's notices" This reverts commita065b243fe
. Revert "Bug 13618: Do not display and html tags in item fields content" This reverts commitbaeeaffbf8
. Revert "Bug 13618: Fix for system preference description" This reverts commita967a09261
. Revert "Bug 13618: Remove html filters for newly pushed code" This reverts commit0e98662b10
. Revert "Bug 13618: (follow-up) add missing lines for opac-shelves" This reverts commitfc2fb605e5
. Revert "Bug 13618: (follow-up) Specific for ColumnsSettings" This reverts commitbc308fdd9c
. Revert "Bug 13618: Fix for edit biblios and items" This reverts commit811c4e8402
. Revert "Bug 13618: followup to remove tabs" This reverts commitca8e8c397c
. Revert "Bug 13618: Fix last occurrences recently introduced to master" This reverts commitbb417b256b
. Revert "Bug 13618: Fix for news" This reverts commitae5b98020a
. Revert "Bug 13618: Fix escape on sending baskets or shelves by email" This reverts commita7731ffe25
. Revert "Bug 13618: Specific for XSLTBloc" This reverts commit11fa38dc29
. Revert "Bug 13618: Specific for Salutation on editing a patron" This reverts commit36c07ad6d3
. Revert "Bug 13618: Specific for other prefs" This reverts commite6ea281a3b
. Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference" This reverts commit7824874557
. Revert "Bug 13618: Specific for ColumnsSettings" This reverts commit1834da3da3
. Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs" This reverts commit21ae62b253
. Revert "Bug 13618: Fix error 'Not a GLOB reference'" This reverts commit602bdbab4c
. Revert "Bug 13618: Specific for the ISBD view" This reverts commitd254362435
. Revert "Bug 13618: Specific for pagination_bar" This reverts commit8837a8ae68
. Revert "Bug 13618: Specific places where we don't need to escape variables - intra" This reverts commit00eff140b3
. Revert "Bug 13618: Remove html filters at the intranet" This reverts commit7db851ff03
. Revert "Bug 13618: Specific places where we don't need to escape variables" This reverts commit49a3738b8d
. Revert "Bug 13618: Remove html filters at the OPAC" This reverts commitcedaa0e23e
. Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter" This reverts commit01b38d3b13
. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
340 lines
22 KiB
Text
340 lines
22 KiB
Text
[% USE Koha %]
|
|
[% USE AuthorisedValues %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
|
|
[% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
|
|
[% IF ( op_else ) %]Purchase Suggestions[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
[% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usersuggestions' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-suggestions' bodyclass='scrollto' %][% END %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<ul class="breadcrumb">
|
|
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
|
|
<li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">›</span></li>
|
|
<li><a href="#">Your purchase suggestions</a></li>
|
|
</ul>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
|
|
</div>
|
|
</div>
|
|
<div class="span10">
|
|
<div id="usersuggestions" class="maincontent">
|
|
[% IF ( op_add ) %]
|
|
<h1>Enter a new purchase suggestion</h1>
|
|
|
|
<p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p>
|
|
<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>
|
|
|
|
<form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
|
|
<li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
|
|
<li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li>
|
|
<li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
|
|
<li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
|
|
<li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" class="span6" maxlength="80" /></li>
|
|
<li><label for="place">Publication place:</label><input type="text" id="place" name="place" maxlength="80" /></li>
|
|
<li><label for="itemtype">Item type:</label>
|
|
[% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %]
|
|
</li>
|
|
[% IF ( branchloop ) %]
|
|
<li><label for="branch">Library:</label>
|
|
<select name="branchcode" id="branch">
|
|
[% FOREACH branchloo IN branchloop %]
|
|
[% IF ( branchloo.selected ) %]
|
|
<option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% END %]
|
|
[% IF ( patron_reason_loop ) %]
|
|
<li>
|
|
<label for="patronreason">Reason for suggestion: </label>
|
|
<select name="patronreason" id="patronreason">
|
|
<option value="">-- Choose --</option>
|
|
[% FOREACH patron_reason_loo IN patron_reason_loop %]
|
|
<option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="note">Notes:</label>
|
|
<textarea name="note" id="note" rows="5" cols="40"></textarea>
|
|
</li>
|
|
|
|
<!-- Add a hidden 'negcap' field -->
|
|
<li id="negcap" style="position: absolute; left: -2000px;">
|
|
negcap <input type="text" name="negcap"/>
|
|
</li>
|
|
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="hidden" name="suggested_by_anyone" value="[% suggested_by_anyone %]" />
|
|
<input type="hidden" name="op" value="add_confirm" />
|
|
<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>
|
|
</fieldset>
|
|
</form>
|
|
[% END # IF op_add %]
|
|
|
|
[% IF ( op_else ) %]
|
|
<h1>
|
|
[% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
|
|
Purchase suggestions
|
|
[% ELSE %]
|
|
[% IF ( loggedinusername ) %]
|
|
Your purchase suggestions
|
|
[% ELSE %]
|
|
Purchase suggestions
|
|
[% END %]
|
|
[% END %]
|
|
</h1>
|
|
[% FOR m IN messages %]
|
|
<div class="alert alert-[% m.type %]">
|
|
[% SWITCH m.code %]
|
|
[% CASE 'already_exists' %]
|
|
The suggestion has not been added. A suggestion with this title already exists.
|
|
[% CASE 'success_on_inserted' %]
|
|
Your suggestion has been submitted.
|
|
[% CASE %]
|
|
[% m.code %]
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %]
|
|
|
|
[% IF ( suggestions_loop ) %]
|
|
<form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get">
|
|
<fieldset>
|
|
<label for="title">Search for:</label>
|
|
<input type="text" name="title" id="title" value="[% title |html %]" />
|
|
[% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
|
|
[% IF loggedinusername %]
|
|
<label for="suggested_by_anyone">Suggested by:</label>
|
|
<div class="input-append">
|
|
<select name="suggested_by_anyone" id="suggested_by_anyone">
|
|
[% IF suggested_by_anyone %]
|
|
<option value="0">Me</option>
|
|
<option value="1" selected="selected">Anyone</option>
|
|
[% ELSE %]
|
|
<option value="0" selected="selected">Me</option>
|
|
<option value="1">Anyone</option>
|
|
[% END %]
|
|
</select>
|
|
<button type="submit" class="btn">Go</button>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
</fieldset>
|
|
</form>
|
|
<form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform">
|
|
<input type="hidden" name="op" value="delete_confirm" />
|
|
[% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
|
|
<div id="toolbar" class="toolbar clearfix">
|
|
<a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( loggedinusername ) %]
|
|
<div id="selections-toolbar" class="toolbar">
|
|
<span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
|
|
<span class="links"><span id="selections">Select suggestions to: </span>
|
|
<span id="removeitems"></span>
|
|
</div>
|
|
[% END %]
|
|
|
|
<table id="suggestt" class="checkboxed table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
[% IF ( loggedinusername ) %]<th> </th>[% END %]
|
|
<th>Summary</th>
|
|
<th>Note</th>
|
|
[% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
|
|
[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH suggestions_loo IN suggestions_loop %]
|
|
<tr>
|
|
[% IF ( loggedinusername ) %]
|
|
<td>
|
|
[% IF ( suggestions_loo.showcheckbox ) %]
|
|
<input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" />
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
<p><strong>[% suggestions_loo.title |html %]</strong></p>
|
|
<p>[% IF ( suggestions_loo.author ) %][% suggestions_loo.author |html %],[% END %]
|
|
[% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate |html %],[% END %]
|
|
[% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
|
|
[% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
|
|
[% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
|
|
[% IF ( suggestions_loo.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 1 ) %][% END %]
|
|
</p>
|
|
</td>
|
|
<td>
|
|
[% IF ( suggestions_loo.note ) %]
|
|
<span class="tdlabel">Note: </span>
|
|
[% suggestions_loo.note |html %]
|
|
[% END %]
|
|
</td>
|
|
[% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
|
|
<td>
|
|
[% IF ( suggestions_loo.branchcodesuggestedby ) %]
|
|
<span class="tdlabel">Suggested for:</span>
|
|
[% suggestions_loo.branchcodesuggestedby %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
|
|
<td>
|
|
[% IF ( suggestions_loo.surnamemanagedby ) %]
|
|
<span class="tdlabel">Managed by:</span>
|
|
[% suggestions_loo.surnamemanagedby %]
|
|
[% IF ( suggestions_loo.firstnamemanagedby ) %] , [% suggestions_loo.firstnamemanagedby %]
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
<span class="tdlabel">Status:</span>
|
|
[% IF ( suggestions_loo.ASKED ) %]Requested
|
|
[% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
|
|
[% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
|
|
[% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
|
|
[% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
|
|
[% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
|
|
[% ELSE %] [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
|
|
[% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason |html %])[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END # / FOREACH suggestions_loo %]
|
|
</tbody>
|
|
</table>
|
|
|
|
[% IF ( loggedinusername ) %]
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-danger" value="Delete selected" />
|
|
</fieldset>
|
|
[% END %]
|
|
</form>
|
|
[% ELSE %]
|
|
[% UNLESS Koha.Preference( 'OPACViewOthersSuggestions' ) or loggedinusername %]
|
|
<p>You are not authorized to see pending purchase suggestions.</p>
|
|
[% ELSE %]
|
|
<p>There are no pending purchase suggestions.</p>
|
|
[% END %]
|
|
[% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
|
|
<p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p>
|
|
[% END %]
|
|
[% END # / IF suggestions_loop %]
|
|
|
|
[% END # IF op_else %]
|
|
</div> <!-- / #usersuggestions -->
|
|
</div> <!-- / .span10 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
[% IF ( loggedinusername ) %]
|
|
function enableCheckboxActions(){
|
|
// Enable/disable controls if checkboxes are checked
|
|
var checkedBoxes = $(".checkboxed input:checkbox:checked");
|
|
if ($(checkedBoxes).size()) {
|
|
$("#selections").html(_("With selected suggestions: "));
|
|
$("#selections-toolbar .links a").removeClass("disabled");
|
|
} else {
|
|
$("#selections").html(_("Select suggestions to: "));
|
|
$("#selections-toolbar .links a").addClass("disabled");
|
|
}
|
|
}
|
|
[% END %]
|
|
|
|
$(function() {
|
|
$("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aaSorting": [[ 1, "asc" ]],
|
|
"aoColumnDefs": [
|
|
[% IF ( loggedinusername ) %]{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }[% END %]
|
|
],
|
|
"aoColumns": [
|
|
[% IF ( loggedinusername ) %]null,[% END %]
|
|
{ "sType": "anti-the" },
|
|
null,
|
|
[% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]null,[% END %]
|
|
[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
|
|
null
|
|
]
|
|
}));
|
|
[% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
|
|
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
|
|
$("#CheckAll").click(function(){
|
|
$(".checkboxed").checkCheckboxes();
|
|
enableCheckboxActions();
|
|
return false;
|
|
});
|
|
$("#CheckNone").click(function(){
|
|
$(".checkboxed").unCheckCheckboxes();
|
|
enableCheckboxActions();
|
|
return false;
|
|
});
|
|
$(".cb").click(function(){
|
|
enableCheckboxActions();
|
|
});
|
|
$("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>")
|
|
.click(function(e){
|
|
e.preventDefault();
|
|
$("#myform").submit();
|
|
return false;
|
|
});
|
|
enableCheckboxActions();
|
|
$("#myform").on('submit', function() {
|
|
if ( $("input:checked").size() < 1 ) {
|
|
alert(MSG_NO_SUGGESTION_SELECTED);
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
[% END %]
|
|
});
|
|
|
|
function Check(f) {
|
|
var _alertString="";
|
|
var alertString2;
|
|
|
|
if(f.title.value.length ==0){
|
|
_alertString += _("- You must enter a Title") + "\n";
|
|
}
|
|
|
|
if (_alertString.length==0) {
|
|
f.submit();
|
|
} else {
|
|
alertString2 = _("Form not submitted because of the following problem(s)");
|
|
alertString2 += "\n------------------------------------------------------------------------------------\n\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
[% END %]
|