From fe1f6464cce0fb13cc681d4468fb537bbfbc8f29 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 17 Aug 2022 20:20:12 +0000 Subject: [PATCH] Bug 30418: Template and JavaScript changes Sponsored-by: Catalyst IT, New Zealand Signed-off-by: Kyle M Hall Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/permissions.inc | 5 +++++ .../prog/en/modules/virtualshelves/shelves.tt | 19 ++++++++++++++++++- .../bootstrap/en/modules/opac-shelves.tt | 11 +++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 4925541539..cfa6c1afa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -729,6 +729,11 @@ Edit public lists (Name, settings, and permissions, but not explicitly contents) ([% name | html %]) + [%- CASE 'edit_public_list_contents' -%] + + Edit public lists contents + + ([% name | html %]) [%- CASE 'upload_general_files' -%] Upload any file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 09ec20c821..d9fa631724 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -47,10 +47,18 @@ [% ELSE %] - [% END %] + [% END %] + + [% IF shelf.allow_change_from_permitted_staff %] + + [% ELSE %] + + [% END %] +   +   [% END %] @@ -917,6 +925,7 @@ if( perms < 2 ) { $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } else if( public==0 ) { // If we move to Private (without shares), show Anyone remark // Note: the number of shares is not tested real-time @@ -924,17 +933,25 @@ if( perms== 2) { $("#anyone_remark").show(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } else if ( perms==3 ) { $("#anyone_remark").hide(); $("#staff_remark").show(); + $("#permitted_staff_remark").hide(); + } else if ( perms==4 ) { + $("#anyone_remark").hide(); + $("#staff_remark").hide(); + $("#permitted_staff_remark").show(); } [% ELSE %] $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); [% END %] } else { // public==1 $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } } [% IF op == 'view' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index 542683f615..d94ee29d4f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -51,10 +51,12 @@ [% IF shelf.allow_change_from_others %][% ELSE %][% END %] [% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %][% ELSE %][% END %][% END %] + [% IF permitteduser == 1 %][% shelf.allow_change_from_permitted_staff %][% ELSE %][% END %'[% END %]   +   [% END %] @@ -1107,6 +1109,7 @@ function AdjustRemark() { if( perms < 2 ) { $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } else if( public==0 ) { // If we move to Private (without shares), show Anyone remark // Note: the number of shares is not tested real-time @@ -1114,17 +1117,25 @@ function AdjustRemark() { if ( perms==2 ) { $("#anyone_remark").show(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } else if ( perms==3 ) { $("#anyone_remark").hide(); $("#staff_remark").show(); + $("#permitted_staff_remark").hide(); + } else if ( perms==4 ) { + $("#anyone_remark").hide(); + $("#staff_remark").hide(); + $("#permitted_staff_remark").show(); } [% ELSE %] $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); [% END %] } else { // public==1 $("#anyone_remark").hide(); $("#staff_remark").hide(); + $("#permitted_staff_remark").hide(); } } -- 2.39.5