Bugzilla – Attachment 139698 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.79 KB, created by
Alex Buckley
on 2022-08-24 01:07:07 UTC
(
hide
)
Description:
Bug 30418: Template and JavaScript changes
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2022-08-24 01:07:07 UTC
Size:
6.79 KB
patch
obsolete
>From 794c88634a4c847e26f76b4faec0101679d2db26 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 >--- > .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ > .../prog/en/modules/virtualshelves/shelves.tt | 12 ++++++++++++ > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 11 +++++++++++ > 3 files changed, 28 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index bb635165d19..b93ce40cb1d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -693,6 +693,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 6984b804df7..866dbce32e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -37,9 +37,12 @@ > > [% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% 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> >@@ -854,6 +857,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 >@@ -861,17 +865,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 37b1b226fda..39f06e14968 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 %] > >@@ -1082,6 +1084,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 >@@ -1089,17 +1092,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.20.1
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