Bugzilla – Attachment 74536 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: Make sure the logged in user can edit the subscriptions
Bug-18426-Make-sure-the-logged-in-user-can-edit-th.patch (text/plain), 3.22 KB, created by
Jonathan Druart
on 2018-04-19 10:29:00 UTC
(
hide
)
Description:
Bug 18426: Make sure the logged in user can edit the subscriptions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-19 10:29:00 UTC
Size:
3.22 KB
patch
obsolete
>From f156a6531f525d6c0dfa3f5a7494766ff5f42e6a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 19 Apr 2018 07:25:29 -0300 >Subject: [PATCH] Bug 18426: Make sure the logged in user can edit the > subscriptions > >--- > .../prog/en/modules/serials/serials-search.tt | 28 ++++++++++++++-------- > serials/subscription-batchedit.pl | 1 + > 2 files changed, 19 insertions(+), 10 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 18364bc4f1..491b8404c3 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 >@@ -34,15 +34,17 @@ > [% ELSE %] > [% SET tab = 'opened' %] > [% END %] >- <div class="actions"> >- <a class="select-all" href="#" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a> >- | >- <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> >+ [% IF CAN_user_serials_edit_subscription %] >+ <div class="actions"> >+ <a class="select-all" href="#" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a> >+ | >+ <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> >+ [% END %] > <table> > <thead> > <tr> >@@ -84,7 +86,13 @@ > [% FOREACH subscription IN subscriptions %] > [% UNLESS subscription.cannotdisplay %] > <tr> >- <td><input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid %]"/></td> >+ <td> >+ [% UNLESS subscription.cannotedit %] >+ <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid %]" /> >+ [% ELSE %] >+ <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid %]" disabled="disabled" title="You cannot edit this subscription" /> >+ [% END %] >+ </td> > <td> > [% IF ( subscription.issn ) %][% subscription.issn %] > [% END %] >diff --git a/serials/subscription-batchedit.pl b/serials/subscription-batchedit.pl >index 865116ab51..9483ac6b60 100755 >--- a/serials/subscription-batchedit.pl >+++ b/serials/subscription-batchedit.pl >@@ -69,6 +69,7 @@ if ($batchedit) { > } > > foreach my $subscription (@subscriptions) { >+ next unless C4::Serials::can_edit_subscription( $subscription->unblessed ); # This should be moved to Koha::Subscription->can_edit > while (my ($key, $value) = each %params) { > if (defined $value and $value ne '') { > $subscription->$key($value); >-- >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