Bugzilla – Attachment 74458 Details for
Bug 18426
Subscriptions batch editing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18426: Address QA issues
Bug-18426-Address-QA-issues.patch (text/plain), 8.54 KB, created by
Jonathan Druart
on 2018-04-18 16:17:52 UTC
(
hide
)
Description:
Bug 18426: Address QA issues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-18 16:17:52 UTC
Size:
8.54 KB
patch
obsolete
>From cd6642680eda9792f03065f873bb6a0df8afe303 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Apr 2018 18:14:22 -0300 >Subject: [PATCH] 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 >--- > .../prog/en/modules/serials/serials-search.tt | 64 ++++++++++++++++++---- > .../en/modules/serials/subscription-batchedit.tt | 25 +++++++-- > 2 files changed, 74 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >index 7ee6e709a2..18364bc4f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >@@ -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="clear-all" href="#"><i class="fa fa-remove"></i> Clear all</a> >+ <a class="select-all" href="#" data-tab="[% tab %]"><i class="fa fa-check"></i> Select 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 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >index b53cb07c75..ccd899a141 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >@@ -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> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18426
:
62119
|
62120
|
64198
|
74393
|
74394
|
74395
|
74396
|
74458
|
74536
|
74537
|
74676
|
74677
|
74678
|
74679
|
74680
|
74681