Bugzilla – Attachment 103880 Details for
Bug 25294
Don't show deletion button if user can't delete suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25294: Don't show deletion button if user can't delete suggestions
Bug-25294-Dont-show-deletion-button-if-user-cant-d.patch (text/plain), 3.54 KB, created by
Katrin Fischer
on 2020-04-28 19:00:50 UTC
(
hide
)
Description:
Bug 25294: Don't show deletion button if user can't delete suggestions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-28 19:00:50 UTC
Size:
3.54 KB
patch
obsolete
>From bf964b0cc0c287c39fbe644f452238b0bf2fa057 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 27 Apr 2020 15:21:30 +0000 >Subject: [PATCH] Bug 25294: Don't show deletion button if user can't delete > suggestions > >This patch adds logic to the OPAC suggestions template so that when the >OPACViewOthersSuggestions system preference is enabled and the logged-in >user is viewing other users' suggestions, the "Delete selected" button >is only displayed when there are suggestions the user can delete. > >To test you should have suggestions in your system from at least two >users. > >- Set the OPACViewOthersSuggestions preference to "Show" >- Log in to the OPAC as a user who hasn't submitted any suggestions >- Go to the suggestions page (with "?suggested_by_anyone=1" appended to > the URL if necessary, see Bug 22515). >- In the table of suggetions, there should be no titles with a checkbox > in the first column. >- At the bottom of the table there should be no "Delete selected" > button. > >- Log in to the OPAC as a user with suggestions. >- Return to the suggestions page and view all suggestions. >- There should be titles with corresponding checkboxes and the "Delete > selected" button should appear at the bottom. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index b1cf132113..9d0ec39c08 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -256,6 +256,7 @@ > [% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %] > > [% IF ( suggestions_loop ) %] >+ [% SET can_delete_suggestion = 0 %] > <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get"> > <fieldset> > <label for="title">Search for:</label> >@@ -321,6 +322,7 @@ > [% IF ( loggedinusername ) %] > <td> > [% IF ( suggestions_loo.showcheckbox ) %] >+ [% SET can_delete_suggestion = 1 %] > <input type="checkbox" class="cb" id="id[% suggestions_loo.suggestionid | html %]" name="delete_field" data-title="[% suggestions_loo.title | html %]" value="[% suggestions_loo.suggestionid | html %]" /> > [% END %] > </td> >@@ -386,7 +388,7 @@ > </tbody> > </table> > >- [% IF ( loggedinusername ) %] >+ [% IF ( loggedinusername && can_delete_suggestion ) %] > <fieldset class="action"> > <input type="submit" class="btn btn-danger removeitems" value="Delete selected" /> > </fieldset> >-- >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 25294
:
103798
|
103800
| 103880