Bug 18426: Address QA issues
- Replaced with the "action" links we already have on the biblio detail page and the items lost report. - Display all the editable values in the table - Add a 'Cancel' link Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
f839259357
commit
b366d8d4de
|
|
@ -17,23 +17,31 @@
|
|||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Search results[% ELSE %]Serials [% END %] </div>
|
||||
|
||||
[% 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 %]
|
||||
<form method="post">
|
||||
|
||||
[% url_params = [] %]
|
||||
[% FOREACH param IN CGI.params.pairs %]
|
||||
[% escaped_value = BLOCK %][% param.value | uri %][% END %]
|
||||
[% url_params.push(param.key _ '=' _ escaped_value) %]
|
||||
[% IF closed %]
|
||||
[% SET tab = 'closed' %]
|
||||
[% ELSE %]
|
||||
[% SET tab = 'opened' %]
|
||||
[% END %]
|
||||
<input type="hidden" name="referrer" value="/cgi-bin/koha/serials/serials-search.pl?[% url_params.join('&') %]"/>
|
||||
|
||||
<div class="actions">
|
||||
<a class="select-all" href="#"><i class="fa fa-check"></i> Select all</a>
|
||||
<a class="select-all" href="#" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a>
|
||||
|
|
||||
<a class="clear-all" href="#"><i class="fa fa-remove"></i> Clear all</a>
|
||||
|
|
||||
<button class="btn btn-default btn-xs" type="submit" formaction="/cgi-bin/koha/serials/subscription-batchedit.pl"><i class="fa fa-pencil"></i> Edit</button>
|
||||
<a class="clear-all" href="#" data-tab="[% tab %]"><i class="fa fa-remove"></i> Clear all</a>
|
||||
<span class="itemselection_actions">
|
||||
| Actions:
|
||||
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected serials</a>
|
||||
</span>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
|
|
@ -392,6 +400,32 @@
|
|||
</script>
|
||||
[% Asset.js("js/serials-toolbar.js") %]
|
||||
<script type="text/javascript">
|
||||
|
||||
function itemSelectionBuildModifyLink(div) {
|
||||
var subscription_ids = new Array();
|
||||
$("input[name='subscriptionid'][type='checkbox']:checked", div).each(function() {
|
||||
subscription_ids.push($(this).val());
|
||||
});
|
||||
if (subscription_ids.length > 0) {
|
||||
var url = "[% edit_action_link %]";
|
||||
url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
|
||||
$('a.itemselection_action_modify').attr('href', url);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function itemSelectionBuildActionLinks(tab) {
|
||||
var div = $("#" + tab);
|
||||
var modify_link_ok = itemSelectionBuildModifyLink(div);
|
||||
if (modify_link_ok) {
|
||||
$('.itemselection_actions', div).show();
|
||||
} else {
|
||||
$('.itemselection_actions', div).hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
"sPaginationType": "four_button",
|
||||
|
|
@ -423,7 +457,17 @@
|
|||
e.preventDefault();
|
||||
var checkboxes = $(this).parents('form').find('input[type="checkbox"]');
|
||||
checkboxes.prop('checked', $(this).hasClass('select-all'));
|
||||
var tab = $(this).data("tab");
|
||||
itemSelectionBuildActionLinks(tab);
|
||||
});
|
||||
|
||||
itemSelectionBuildActionLinks("opened");
|
||||
itemSelectionBuildActionLinks("closed");
|
||||
$("input[name='subscriptionid'][type='checkbox']").change(function() {
|
||||
var div = $(this).parents('form').parent().attr("id");
|
||||
itemSelectionBuildActionLinks(div);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -32,10 +32,14 @@
|
|||
<tr>
|
||||
<th>ISSN</th>
|
||||
<th>Title</th>
|
||||
<th>Notes</th>
|
||||
<th>Library</th>
|
||||
<th>Vendor</th>
|
||||
<th>Location</th>
|
||||
<th>Library</th>
|
||||
<th>Item type</th>
|
||||
<th>Public notes</th>
|
||||
<th>Nonpublic notes</th>
|
||||
<th>Call number</th>
|
||||
<th>Create item when receiving</th>
|
||||
<th>Expiration date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -44,10 +48,20 @@
|
|||
<tr>
|
||||
<td>[% subscription.biblio.biblioitem.issn %]</td>
|
||||
<td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">[% subscription.biblio.title %] (#[% subscription.subscriptionid %])</a></td>
|
||||
<td>[% subscription.notes %] [% IF subscription.internalnotes %]([% subscription.internalnotes %])[% END %]</td>
|
||||
<td>[% Branches.GetName(subscription.branchcode) %]</td>
|
||||
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% subscription.vendor.id %]">[% subscription.vendor.name |html %]</a></td>
|
||||
<td>[% AuthorisedValues.GetByCode('LOC', subscription.location) %]</td>
|
||||
<td>[% Branches.GetName(subscription.branchcode) %]</td>
|
||||
<td>[% ItemTypes.GetDescription( subscription.itemtype ) %]</td>
|
||||
<td>[% subscription.notes %]</td>
|
||||
<td>[% subscription.internalnotes %]</td>
|
||||
<td>[% subscription.callnumber %]</td>
|
||||
<td>
|
||||
[% IF subscription.serialsadditems %]
|
||||
<span>Yes</span>
|
||||
[% ELSE %]
|
||||
<span>No</span>
|
||||
[% END %]
|
||||
</td>
|
||||
<td>[% subscription.enddate | $KohaDates %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
|
@ -140,7 +154,8 @@
|
|||
</fieldset>
|
||||
|
||||
<fieldset class="action">
|
||||
<button type="submit" name="batchedit" value="1">Start batch edit</button>
|
||||
<button type="submit" name="batchedit" value="1">Save</button>
|
||||
<a class="cancel" href="[% referrer %]">Cancel</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue