Bugzilla – Attachment 84880 Details for
Bug 8387
Hide headings in tools when user has no permissions for any listed below
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8387: Hide headings in tools when user has no permissions for any listed below
Bug-8387-Hide-headings-in-tools-when-user-has-no-p.patch (text/plain), 7.61 KB, created by
Martin Renvoize (ashimema)
on 2019-02-08 16:34:38 UTC
(
hide
)
Description:
Bug 8387: Hide headings in tools when user has no permissions for any listed below
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-02-08 16:34:38 UTC
Size:
7.61 KB
patch
obsolete
>From a9ae7aaa04d9d1ce3e6abcafa38d0aac421b9e64 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Mon, 4 Feb 2019 06:30:51 +0000 >Subject: [PATCH] Bug 8387: Hide headings in tools when user has no permissions > for any listed below > >The headings for each column on the tools page will show, even if the >user has no permission for any tool below it. This patch tries to >correct this. > >To test: >- Try various combinations of tool permissions >- On the tools module start page and for the tools sidebar > visible on the left on a tool's page: > - Make sure headings don't show when you have no permissions > for any of the tools listed below > - Make sure headings show correctly if you have one or > many of the tools permissions needed > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >The qa tool gives some warnings but I think they can be considered false >positives. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/includes/tools-menu.inc | 18 +++++++++++- > .../prog/en/modules/tools/tools-home.tt | 29 ++++++++++++++----- > 2 files changed, 39 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >index 64f2a535ce..67ccf5507e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >@@ -5,6 +5,9 @@ > <ul> > <li><a href="/cgi-bin/koha/tools/tools-home.pl">Tools home</a></li> > </ul> >+[% IF ( CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons >+ || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons >+ || CAN_user_tools_edit_patrons || CAN_user_tools_moderate_tags || CAN_user_tools_batch_upload_patron_images ) %] > <h5>Patrons and circulation</h5> > <ul> > [% IF ( CAN_user_tools_manage_patron_lists ) %] >@@ -41,6 +44,13 @@ > <li><a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a></li> > [% END %] > </ul> >+[% END %] >+[% IF ( CAN_user_tools_items_batchdel || CAN_user_tools_items_batchmod || CAN_user_tools_records_batchdel >+ || CAN_user_tools_records_batchmod || CAN_user_tools_export_catalog || CAN_user_tools_inventory >+ || CAN_user_tools_label_creator || CAN_user_tools_rotating_collections >+ || ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) >+ || CAN_user_tools_marc_modification_templates || CAN_user_tools_stage_marc_import >+ || CAN_user_tools_manage_staged_marc || CAN_user_tools_upload_local_cover_images ) %] > <h5>Catalog</h5> > <ul> > [% IF ( CAN_user_tools_items_batchdel ) %] >@@ -87,6 +97,10 @@ > <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload local cover image</a></li> > [% END %] > </ul> >+[% END %] >+[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_news >+ || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( UseKohaPlugins && CAN_user_plugins_tool ) >+ || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] > <h5>Additional tools</h5> > <ul> > [% IF ( CAN_user_tools_edit_calendar ) %] >@@ -116,4 +130,6 @@ > [% IF ( CAN_user_tools_access_files ) %] > <li><a href="/cgi-bin/koha/tools/access_files.pl">Access files</a></li> > [% END %] >-</ul></div></div> >+</ul> >+[% END %] >+</div></div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >index d47b320171..df906c3567 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >@@ -13,7 +13,11 @@ > <div class="container-fluid"> > <div class="row"> > <div class="col-sm-4"> >+[% IF ( CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons >+ || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons >+ || CAN_user_tools_edit_patrons || CAN_user_tools_moderate_tags || CAN_user_tools_batch_upload_patron_images ) %] > <h3>Patrons and circulation</h3> >+[% END %] > <dl> > [% IF (CAN_user_tools_manage_patron_lists) %] > <dt><a href="/cgi-bin/koha/patron_lists/lists.pl">Patron lists</a> >@@ -27,7 +31,7 @@ > > [% IF ( CAN_user_tools_moderate_comments ) %] > <dt><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> [% IF ( pendingcomments ) %]<span class="number_box"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments | html %]</a></span>[% END %]</dt> >- <dd>Moderate patron comments. </dd> >+ <dd>Moderate patron comments. </dd> > [% END %] > > [% IF ( CAN_user_tools_import_patrons ) %] >@@ -62,19 +66,23 @@ > > [% IF ( CAN_user_tools_moderate_tags ) %] > <dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a> [% IF ( pendingtags ) %]<span class="number_box"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags | html %]</a></span>[% END %]</dt> >- <dd>Moderate patron tags</dd> >+ <dd>Moderate patron tags</dd> > [% END %] > > [% IF ( CAN_user_tools_batch_upload_patron_images ) %] > <dt><a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a></dt> >- <dd>Upload patron images in a batch or one at a time</dd> >+ <dd>Upload patron images in a batch or one at a time</dd> > [% END %] >- </dl> >+ </dl> > </div> > > > <div class="col-sm-4 col-sm-push-4"> >+[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_news >+ || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( UseKohaPlugins && CAN_user_plugins_tool ) >+ || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] > <h3>Additional tools</h3> >+[% END %] > <dl> > [% IF ( CAN_user_tools_edit_calendar ) %] > <dt><a href="/cgi-bin/koha/tools/holidays.pl">Calendar</a></dt> >@@ -83,11 +91,11 @@ > > [% IF ( CAN_user_tools_manage_csv_profiles ) %] > <dt><a href="/cgi-bin/koha/tools/csv-profiles.pl">CSV profiles</a></dt> >- <dd>Manage CSV export profiles</dd> >+ <dd>Manage CSV export profiles</dd> > [% END %] > > [% IF ( CAN_user_tools_view_system_logs ) %] >- <dt><a href="/cgi-bin/koha/tools/viewlog.pl">Log viewer</a></dt> >+ <dt><a href="/cgi-bin/koha/tools/viewlog.pl">Log viewer</a></dt> > <dd>Browse the system logs</dd> > [% END %] > >@@ -100,7 +108,7 @@ > <dt><a href="/cgi-bin/koha/tools/scheduler.pl">Task scheduler</a></dt> > <dd>Schedule tasks to run</dd> > [% END %] >- >+ > [% IF ( CAN_user_tools_edit_quotes ) %] > <dt><a href="/cgi-bin/koha/tools/quotes.pl">Edit quotes for QOTD feature</a></dt> > <dd>Quote editor for Quote-of-the-day feature in OPAC</dd> >@@ -125,7 +133,14 @@ > </div> > > <div class="col-sm-4 col-sm-pull-4"> >+[% IF ( CAN_user_tools_items_batchdel || CAN_user_tools_items_batchmod || CAN_user_tools_records_batchdel >+ || CAN_user_tools_records_batchmod || CAN_user_tools_export_catalog || CAN_user_tools_inventory >+ || CAN_user_tools_label_creator || CAN_user_tools_rotating_collections >+ || ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) >+ || CAN_user_tools_marc_modification_templates || CAN_user_tools_stage_marc_import >+ || CAN_user_tools_manage_staged_marc || CAN_user_tools_upload_local_cover_images ) %] > <h3>Catalog</h3> >+[% END %] > <dl> > [% IF ( CAN_user_tools_items_batchdel ) %] > <dt><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Batch item deletion</a></dt> >-- >2.20.1
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 8387
:
10710
|
84757
|
84767
| 84880