Bugzilla – Attachment 148647 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), 7.00 KB, created by
Kyle M Hall (khall)
on 2023-03-24 10:52:52 UTC
(
hide
)
Description:
Bug 30418: Template and JavaScript changes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-03-24 10:52:52 UTC
Size:
7.00 KB
patch
obsolete
>From b236afb50b81795d797e28bc3c0d37961d4297cd 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 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../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 e4c4cbe2a64..620d0ce27c6 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) > </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 12a4b826d29..bffd2231a8e 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 627e9373b0d..354ba34c360 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 %] > >@@ -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(); > } > } > </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