Owen Leonard
41fbb64fab
When you search for serials in the Serials module the results table is often too wide for the screen (depending on your browser window size). This is partly due to the fixed width of the search fields in the table footer. This patch applies a flexible width to those <input>s and reduces the font size of their text. This patch also moves the "action" links for each table row into an "action" menu (similar to the change made by Bug 10615 in Reports) to further conserve screen space. This patch also revises the page's DataTables configuration to use table header classes for sorting configuration. To test you should be able to perform a search which returns multiple open and closed subscriptions. - Test that table sorting works correctly, including for titles with articles and for dates. - Test that the Action menu items work correctly and that they correctly reflect the permissions of the logged-in user with regard to receive_serials and routing. - Perform these tests on both the "Open" and "Closed" tabs. Signed-off-by: Chris <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works nicely and improves the display significantly. Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
91 lines
4.5 KiB
HTML
91 lines
4.5 KiB
HTML
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
function confirm_close() {
|
|
var is_confirmed = confirm(_("Are you sure you want to close this subscription?"));
|
|
if (is_confirmed) {
|
|
window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=close";
|
|
}
|
|
}
|
|
function confirm_reopen() {
|
|
var is_confirmed = confirm(_("Are you sure you want to reopen this subscription?"));
|
|
if (is_confirmed) {
|
|
window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=reopen";
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$("#deletesub").click(function(){
|
|
confirm_deletion();
|
|
return false;
|
|
});
|
|
$("#reopen").click(function(){
|
|
confirm_reopen();
|
|
return false;
|
|
});
|
|
$("#close").click(function(){
|
|
confirm_close();
|
|
return false;
|
|
});
|
|
$("#renew").click(function(){
|
|
popup([% subscriptionid %]);
|
|
return false;
|
|
})
|
|
});
|
|
//]]>
|
|
</script>
|
|
<div id="toolbar" class="btn-toolbar">
|
|
|
|
[% IF ( CAN_user_serials_create_subscription ) %]
|
|
[% IF ( biblionumber_for_new_subscription ) %]
|
|
<div class="btn-group"><a id="newsubscription" class="btn btn-small" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription %]"><i class="icon-plus"></i> New subscription</a></div>
|
|
[% ELSE %]
|
|
<div class="btn-group"><a id="newsubscription" class="btn btn-small" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="icon-plus"></i> New subscription</a></div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
|
|
[% IF ( subscriptionid ) %]
|
|
|
|
[% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
|
|
[% UNLESS ( cannotedit ) %]
|
|
<div class="btn-group">
|
|
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button>
|
|
<ul class="dropdown-menu">
|
|
[% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %]
|
|
<li> [% END %]
|
|
<a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=[% subscriptionid %]">Edit subscription</a></li>
|
|
[% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %]
|
|
<li> [% END %]
|
|
<a href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=[% subscriptionid %]">Edit as new (duplicate)</a></li>
|
|
[% IF ( CAN_user_serials_delete_subscription ) %]
|
|
[% IF ( cannotedit ) %] <li class="disabled"> [% ELSE %]
|
|
<li> [% END %]
|
|
<a href="#" id="deletesub">Delete subscription</a></li>[% END %]
|
|
</ul>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% UNLESS ( cannotedit ) %]
|
|
[% UNLESS closed %]
|
|
[% IF ( CAN_user_serials_renew_subscription ) %]
|
|
<div class="btn-group"><a id="renew" class="btn btn-small" href="#" onclick="popup([% subscriptionid %])"><i class="icon-refresh"></i> Renew</a></div>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( CAN_user_serials_receive_serials ) %]
|
|
[% UNLESS closed %]
|
|
<div class="btn-group"><a id="receive" class="btn btn-small" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid %]&serstatus=1,3"><i class="icon-inbox"></i> Receive</a></div>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF CAN_user_serials_edit_subscription %]
|
|
[% IF closed %]
|
|
<div class="btn-group"><a id="reopen" class="btn btn-small" href="#"><i class="icon-repeat"></i> Reopen</a></div>
|
|
[% ELSE %]
|
|
<div class="btn-group"><a id="close" class="btn btn-small" href="#"><i class="icon-remove-circle"></i> Close</a></div>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|