Bug 8387 - Hide headings in tools when user has no permissions for any listed below
Summary: Hide headings in tools when user has no permissions for any listed below
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Katrin Fischer
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 9422
  Show dependency treegraph
 
Reported: 2012-07-09 07:46 UTC by Hend
Modified: 2020-01-06 20:15 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
This shows how the tools menu looks when a user is allowed to access some links. (11.67 KB, image/png)
2012-07-09 07:46 UTC, Hend
Details
Bug 8387: Hide headings in tools when user has no permissions for any listed below (7.43 KB, patch)
2019-02-04 21:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8387: Hide headings in tools when user has no permissions for any listed below (7.55 KB, patch)
2019-02-05 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8387: Hide headings in tools when user has no permissions for any listed below (7.61 KB, patch)
2019-02-08 16:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hend 2012-07-09 07:46:19 UTC
Created attachment 10710 [details]
This shows how the tools menu looks when a user is allowed to access some links.

When a user is only allowed to access the tools catalog part it's nice to hide "Patron & Circulation" and "Additional Tools" labels  as there are no links under them.
Attached a screenshot showing how the view looks.
Comment 1 Katrin Fischer 2019-02-04 21:50:32 UTC
Created attachment 84757 [details] [review]
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
Comment 2 Owen Leonard 2019-02-05 13:34:10 UTC
Created attachment 84767 [details] [review]
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.
Comment 3 Martin Renvoize (ashimema) 2019-02-08 16:28:40 UTC
Any translation guru's in the house?  Will the QA Script failure mentioned here cause a regression of the likes of bug 18675?

`forbidden pattern: Do not use line breaks inside template tags (bug 18675) (line 48)`
Comment 4 Katrin Fischer 2019-02-08 16:32:29 UTC
I only added "IF" statements, so I think that should not affect translations as those don't get translated, especially as they are not inside an translated HTML element.
Comment 5 Martin Renvoize (ashimema) 2019-02-08 16:33:33 UTC
Thanks Katrin :)
Comment 6 Martin Renvoize (ashimema) 2019-02-08 16:34:38 UTC
Created attachment 84880 [details] [review]
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>
Comment 7 Martin Renvoize (ashimema) 2019-02-08 16:35:07 UTC
Just done a quick test to check and it looks good to my untrained eye.. Passing QA
Comment 8 Nick Clemens (kidclamp) 2019-02-15 18:51:49 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize (ashimema) 2019-02-25 15:24:50 UTC
Pushed to 18.11.x for 18.11.04.. it's great seeing these old bugs getting some love!
Comment 10 Lucas Gass (lukeg) 2019-03-05 22:46:19 UTC
backported to 18.05.x for 18.05.11