This patch updates serials templates so that title tags can be more easily translated. Some templates have been updated for consistency as well: Harmonizing page title, breaddrumb navigation, and page headers; Adding "page-section" <div> where it was lacking. To test, apply the patch and confirm that the following pages have the correct title tags: - Serials home - Serials search results - Subscription details - Subscription edit - Search for vendor - Search for bibliographic record - Subscription renew - Serial collection - Create and modify routing list - Preview routing list - View routing slip - Claims - Check expiration - With a subscription which has manual history enabled, click the "Edit history" link under the "Planning" tab. - Select multiple serial search results and batch edit - New subscription - Manage frequencies: Create and edit - Manage numbering patterns: Create and edit Signed-off-by: Loïc Vassaux-Artur <loic.vassaux-artur@outlook.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
415 lines
23 KiB
Text
415 lines
23 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% USE CGI %]
|
|
[% USE KohaDates %]
|
|
[% USE Koha %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% FILTER collapse %]
|
|
[% t("Search results") | html %] ›
|
|
[% t("Serials") | html %] ›
|
|
[% t("Koha") | html %]
|
|
[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style>input.dt-filter { width : 100%; font-size : 85%; }</style>
|
|
</head>
|
|
|
|
<body id="ser_serials-search" class="ser">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'serials-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
[% WRAPPER breadcrumbs %]
|
|
[% IF ( done_searched ) %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Search results</span>
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Serials</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
[% END #/ WRAPPER sub-header.inc %]
|
|
|
|
[% url_params = [] %]
|
|
[% FOREACH param IN CGI.params.pairs %]
|
|
[% escaped_value = BLOCK %][% param.value | uri %][% END %]
|
|
[% url_params.push(param.key _ '=' _ escaped_value) %]
|
|
[% END %]
|
|
|
|
[% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %]
|
|
[% referrer = BLOCK %][% referrer | url %][% url_params.join("&") |uri %][% END %]
|
|
[% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %]
|
|
|
|
[% BLOCK subscriptions_table %]
|
|
<div>
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
[% IF closed %]
|
|
[% SET tab = 'closed' %]
|
|
[% ELSE %]
|
|
[% SET tab = 'opened' %]
|
|
[% END %]
|
|
[% IF CAN_user_serials_edit_subscription %]
|
|
<div class="actions">
|
|
<a class="select-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
|
|
|
|
|
<a class="clear-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</a>
|
|
<span class="itemselection_actions [% tab | html %]">
|
|
| Actions:
|
|
<a href="#" data-tab="[% tab | html %]" class="itemselection_action_modify"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit selected serials</a>
|
|
</span>
|
|
</div>
|
|
[% END %]
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="NoSort noExport"></th>
|
|
<th>ISSN</th>
|
|
<th class="anti-the">Title</th>
|
|
<th>Notes</th>
|
|
<th>Library</th>
|
|
<th>Location</th>
|
|
<th>Call number</th>
|
|
[% UNLESS closed %]
|
|
<th>Expiration date</th>
|
|
[% END %]
|
|
[% FOR field IN additional_fields_for_subscription %]
|
|
<th>[% field.name | html %]</th>
|
|
[% END %]
|
|
<th class="NoSort noExport">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH subscription IN subscriptions %]
|
|
[% UNLESS subscription.cannotdisplay %]
|
|
<tr>
|
|
<td>
|
|
[% UNLESS subscription.cannotedit %]
|
|
<input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" class="[% tab | html %]" />
|
|
[% ELSE %]
|
|
<input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" disabled="disabled" title="You cannot edit this subscription" />
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( subscription.issn ) %]
|
|
[% subscription.issn | html %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]" class="button" title="subscription detail">[% subscription.title | html %] [% subscription.subtitle | html %] [% subscription.part_number | html %] [%subscription.part_name | html %]</a>
|
|
</td>
|
|
<td>
|
|
[% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %]
|
|
[% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( subscription.location ) %]
|
|
[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %]
|
|
</td>
|
|
[% UNLESS closed %]
|
|
<td data-order="[% subscription.enddate | html %]">
|
|
[% subscription.enddate | $KohaDates %]
|
|
</td>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'additional-fields-display.inc' available=additional_fields_for_subscription values=subscription.additional_field_values value_only=1 is_table_cell=1 %]
|
|
|
|
<td>
|
|
<div class="btn-group dropup">
|
|
[% IF closed %]
|
|
<a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid | html %]" role="button" data-bs-toggle="dropdown" href="#">
|
|
Actions
|
|
</a>
|
|
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid | html %]">
|
|
|
|
[% IF ( routing && CAN_user_serials_routing ) %]
|
|
[% UNLESS ( subscription.cannotedit ) %]
|
|
<li>
|
|
<a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid | uri %]&op=reopen&routing=[% subscription.routing | uri %]&searched=1&title_filter=[% title_filter | uri %]&ISSN_filter=[% ISSN_filter | uri %]&EAN_filter=[% EAN_filter | uri %]&published_filter=[% publisher_filter | uri %]&bookseller_filter=[% bookseller_filter | uri %]&branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa-solid fa-arrow-rotate-right"></i> Reopen</a>
|
|
</li>
|
|
[% END %]
|
|
[% END # IF ( routing && CAN_user_serials_routing ) %]
|
|
|
|
<li>
|
|
<a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-rectangle-list"></i> Issue history</a>
|
|
</li>
|
|
|
|
</ul>
|
|
[% ELSE %]
|
|
<div class="btn-group dropup">
|
|
[% IF ( CAN_user_serials_receive_serials ) %]
|
|
[%# There should be no space between these two buttons, it would render badly %]
|
|
<a class="btn btn-default btn-xs" role="button"
|
|
href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid | html %]&serstatus=1,3,7"><i
|
|
class="fa fa-inbox"></i> Serial receive</a><a
|
|
class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button"
|
|
data-bs-toggle="dropdown" href="#"></a>
|
|
[% ELSE %]
|
|
<a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button" data-bs-toggle="dropdown" href="#">Actions </a>
|
|
[% END %]
|
|
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid | html %]">
|
|
|
|
[% IF ( routing && CAN_user_serials_routing ) %]
|
|
[% IF ( subscription.cannotedit ) %]
|
|
[% ELSE %]
|
|
[% IF ( subscription.routingedit ) %]
|
|
<li>
|
|
<a class="dropdown-item" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit routing list ([% subscription.routingedit | html %])</a>
|
|
</li>
|
|
[% ELSE %]
|
|
<li>
|
|
<a class="dropdown-item" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]&op=new"> <i class="fa fa-plus"></i> New routing list</a>
|
|
</li>
|
|
[% END %]
|
|
[% END %]
|
|
[% END # IF ( routing && CAN_user_serials_routing ) %]
|
|
|
|
<li>
|
|
<a class="dropdown-item" href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-rectangle-list"></i> Issue history</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
[% END # IF closed %]
|
|
</div> <!-- /.btn-group -->
|
|
</td>
|
|
|
|
</tr>
|
|
[% END # /UNLESS subscription.cannotdisplay %]
|
|
[% END # /FOREACH subscription %]
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search ISSN" /></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search title" /></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search notes" /></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search library" /></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search location" /></td>
|
|
<td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search callnumber" /></td>
|
|
[% SET column_num = 6 %]
|
|
[% UNLESS closed %]
|
|
<td><input type="text" class="dt-filter" data-column_num="7" placeholder="Search expiration date" /></td>
|
|
[% SET column_num = column_num + 1 %]
|
|
[% END %]
|
|
[% FOR field IN additional_fields_for_subscription %]
|
|
<td><input type="text" class="dt-filter" data-column_num="[% loop.count + column_num | html %]" placeholder="Search [% field.name | html %]" /></td>
|
|
[% END %]
|
|
<td></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
[% END # /BLOCK subscriptions_table %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-10 order-md-2 order-sm-1">
|
|
<main>
|
|
[% INCLUDE 'messages.inc' %]
|
|
|
|
[% INCLUDE 'serials-toolbar.inc' %]
|
|
|
|
[% IF ( mana ) %]
|
|
[% IF ( done_searched ) %]
|
|
<h1>Mana subscriptions ([% total | html %] found)</h1>
|
|
[% ELSE %]
|
|
<h1>Mana subscriptions search</h1>
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% IF ( done_searched ) %]
|
|
[% IF orig_total > total %]
|
|
<div class="alert alert-warning">
|
|
<p>The search originally produced [% orig_total | html %] results and was limited to [% total | html %].</p>
|
|
</div>
|
|
[% END %]
|
|
<h1>Serials subscriptions ([% total | html %] found)</h1>
|
|
[% ELSE %]
|
|
<h1>Serials subscriptions search</h1>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% UNLESS ( done_searched ) %]
|
|
[% INCLUDE 'serials-advsearch.inc' %]
|
|
[% END # /UNLESS ( done_searched )%]
|
|
|
|
[% IF ( done_searched ) %]
|
|
[% IF ( total ) %]
|
|
|
|
[% WRAPPER tabs id= "serialstabs" %]
|
|
[% WRAPPER tabs_nav %]
|
|
[% IF mana %]
|
|
[% WRAPPER tab_item tabname= "mana" bt_active= 1 %] <span>Mana</span> ([% total || 0 | html %]) [% END %]
|
|
[% ELSE %]
|
|
[% WRAPPER tab_item tabname= "opened" bt_active= 1 %] <span>Open</span> ([% openedsubscriptions.size || 0 | html %]) [% END %]
|
|
[% WRAPPER tab_item tabname= "closed" %] <span>Closed</span> ([% closedsubscriptions.size || 0 | html %]) [% END %]
|
|
[% END %]
|
|
[% END # /WRAPPER tabs_nav %]
|
|
[% WRAPPER tab_panels %]
|
|
[% IF mana %]
|
|
[% WRAPPER tab_panel tabname="mana" bt_active= 1 %]
|
|
[% INCLUDE 'mana/mana-subscription-search-result.inc' %]
|
|
[% END # /WRAPPER tab_panel#mana %]
|
|
[% ELSE %]
|
|
[% WRAPPER tab_panel tabname="opened" bt_active= 1 %]
|
|
[% IF openedsubscriptions %]
|
|
[% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
|
|
[% ELSE %]
|
|
<div class="alert alert-info">
|
|
<p>Your search returned no open subscriptions.</p>
|
|
</div>
|
|
[% END %]
|
|
[% END # /WRAPPER tab_panel#opened %]
|
|
[% WRAPPER tab_panel tabname="closed" %]
|
|
[% IF closedsubscriptions %]
|
|
[% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
|
|
[% ELSE %]
|
|
<div class="alert alert-info">
|
|
<p>Your search returned no closed subscriptions.</p>
|
|
</div>
|
|
[% END %]
|
|
[% END # /WRAPPER tab_panel#closed %]
|
|
[% END # /IF mana %]
|
|
[% END # /WRAPPER tab_panels %]
|
|
[% END # /WRAPPER tabs#serialstabs %]
|
|
|
|
[% ELSE %]
|
|
<div class="alert alert-info">
|
|
<p>Your search returned no results.</p>
|
|
</div>
|
|
[% END # IF ( total ) %]
|
|
[% END # /IF done_searched %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-md-10.order-md-2 -->
|
|
|
|
<div class="col-md-2 order-sm-2 order-md-1">
|
|
<aside>
|
|
|
|
[% IF ( done_searched ) %]
|
|
[% UNLESS ( mana ) %]
|
|
[% INCLUDE 'serials-advsearch.inc' brief=1 %]
|
|
[% END # / UNLESS ( mana ) %]
|
|
[% END # / IF ( done_searched ) %]
|
|
[% INCLUDE 'serials-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-md-2.order-md-1 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script>
|
|
var subscriptionid = "[% subscriptionid | html %]";
|
|
</script>
|
|
[% Asset.js("js/serials-toolbar.js") | $raw %]
|
|
<script>
|
|
|
|
function itemSelectionBuildEditLink( tab ) {
|
|
var subscription_ids = new Array();
|
|
$( "input:checkbox." + tab + ":checked" ).each(function() {
|
|
subscription_ids.push( $(this).val() );
|
|
});
|
|
|
|
if (subscription_ids.length > 0) {
|
|
var url = "[% edit_action_link | html %]";
|
|
url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
|
|
location.href = url;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function enableCheckboxActions( tab ){
|
|
// Enable/disable controls if checkboxes are checked
|
|
var checked_count = $("input:checkbox." + tab + ":checked").length;
|
|
if( checked_count > 0 ){
|
|
$(".itemselection_actions." + tab ).show();
|
|
} else {
|
|
$(".itemselection_actions." + tab ).hide();
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
var osrlt = $("#opened_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"pagingType": "full",
|
|
"order": [[ 2, "asc" ]],
|
|
"columnDefs": [
|
|
{ "orderable": false, "searchable": false, "targets": [ 'NoSort' ] },
|
|
{ "type": "anti-the", "targets": [ 'anti-the'] }
|
|
]
|
|
}));
|
|
|
|
var csrlt = $("#closed_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
// FIXME sort function of additional_fields!
|
|
"order": [[ 2, "asc" ]],
|
|
"pagingType": "full",
|
|
"columnDefs": [
|
|
{ "orderable": false, "targets": [ 'NoSort' ] },
|
|
{ "type": "anti-the", "targets": [ 'anti-the'] }
|
|
]
|
|
}));
|
|
|
|
var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"pagingType": "full",
|
|
"columnDefs": [
|
|
{ "orderable": false, "searchable": false, "targets": [ 'NoSort' ] },
|
|
{ "type": "anti-the", "targets": [ 'anti-the'] }
|
|
]
|
|
}));
|
|
|
|
osrlt.fnAddFilters("dt-filter", 750);
|
|
csrlt.fnAddFilters("dt-filter", 750);
|
|
manarlt.fnAddFilters("dt-filter", 750);
|
|
|
|
$("#reopensub").click(function(){
|
|
return confirm(_("Are you sure you want to reopen this subscription?"));
|
|
});
|
|
|
|
$('.select-all, .clear-all').on('click', function(e) {
|
|
e.preventDefault();
|
|
var tab = $(this).data("tab");
|
|
var checkboxes = $("input:checkbox." + tab );
|
|
checkboxes.prop('checked', $(this).hasClass('select-all')).change();
|
|
enableCheckboxActions(tab);
|
|
});
|
|
|
|
enableCheckboxActions("opened");
|
|
enableCheckboxActions("closed");
|
|
|
|
$("input[name='subscriptionid'][type='checkbox']").change(function() {
|
|
var tab = $(this).attr("class");
|
|
enableCheckboxActions( tab );
|
|
});
|
|
|
|
$(".itemselection_action_modify").on("click", function(e){
|
|
e.preventDefault();
|
|
var tab = $(this).data("tab");
|
|
itemSelectionBuildEditLink( tab );
|
|
});
|
|
|
|
[% IF ( mana ) %]
|
|
$(".local").hide();
|
|
[% FOR field IN additional_fields_for_subscription %]
|
|
$("label[for=additional_field_[% field.id | $raw %]], input#additional_field_[% field.id | $raw %]").hide();
|
|
[% END %]
|
|
[% END %]
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|