Bug 8387

Summary: Hide headings in tools when user has no permissions for any listed below
Product: Koha Reporter: Hend <hend.eleraky>
Component: TemplatesAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: bgkriegel, fridolin.somers, hend.eleraky, indradg, josef.moravec, katrin.fischer, lucas, martin.renvoize, nick, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 9422    
Attachments: This shows how the tools menu looks when a user is allowed to access some links.
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 permissions for any listed below
Bug 8387: Hide headings in tools when user has no permissions for any listed below

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 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 2019-02-08 16:33:33 UTC
Thanks Katrin :)
Comment 6 Martin Renvoize 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 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 2019-02-15 18:51:49 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 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 2019-03-05 22:46:19 UTC
backported to 18.05.x for 18.05.11