Bugzilla – Attachment 146376 Details for
Bug 30418
Add permission and setting for public lists to allow staff with permission to edit contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30418: Template and JavaScript changes
Bug-30418-Template-and-JavaScript-changes.patch (text/plain), 6.89 KB, created by
Lucas Gass (lukeg)
on 2023-02-08 00:24:12 UTC
(
hide
)
Description:
Bug 30418: Template and JavaScript changes
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-02-08 00:24:12 UTC
Size:
6.89 KB
patch
obsolete
>From 8a873d036bad33ab5007640ac805b53315617823 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 17 Aug 2022 20:20:12 +0000 >Subject: [PATCH] Bug 30418: Template and JavaScript changes > >Sponsored-by: Catalyst IT, New Zealand >--- > .../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 a8bfd89e02a..48b0cc5c4ee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -726,6 +726,11 @@ > Edit public lists (Name, settings, and permissions, but not explicitly contents) > </span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'edit_public_list_contents' -%] >+ <span class="sub_permission edit_public_list_contents_subpermission"> >+ Edit public lists contents >+ </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'upload_general_files' -%] > <span class="sub_permission upload_general_files_subpermission"> > 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 605a074f5e2..8dd3e486158 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 @@ > <option value="3" selected="selected">Staff only</option> > [% ELSE %] > <option value="3">Staff only</option> >- [% END %] >+ [% END %] >+ >+ [% IF shelf.allow_change_from_permitted_staff %] >+ <option value="4" selected="selected">Permitted staff only</option> >+ [% ELSE %] >+ <option value="4">Permitted staff only</option> >+ [% END %] >+ > </select> >   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span> >   <span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span> >+   <span id="permitted_staff_remark" style="display:none;color:red;">The Permitted staff only permission has no actual effect while this list is strictly private.</span> > </li> > [% END %] > </head> >@@ -912,6 +920,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 >@@ -919,17 +928,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 058ea4a180e..3b6f355cffb 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 %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %] > > [% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %][% END %] >+ [% IF permitteduser == 1 %][% shelf.allow_change_from_permitted_staff %]<option value="4" selected="selected">Permitted staff only</option>[% ELSE %]<option value="4">Permitted staff only</option>[% END %'[% END %] > > </select> >   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span> >   <span id="staff_remark" style="display:none;color:red;">The "Staff only" permission has no actual effect while this list is strictly private.</span> >+   <span id="permitted_staff_remark" style="display:none;color:red;">The "Permitted staff only" permission has no actual effect while this list is strictly private.</span> > </li> > [% END %] > >@@ -1097,6 +1099,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 >@@ -1104,17 +1107,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(); > } > } > </script> >-- >2.30.2
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 30418
:
139696
|
139697
|
139698
|
139699
|
139700
|
139701
|
146363
|
146364
|
146365
|
146366
|
146367
|
146368
|
146374
|
146375
|
146376
|
146377
|
146378
|
146379
|
146609
|
148645
|
148646
|
148647
|
148648
|
148649
|
148650
|
148651
|
148652
|
151249