Bugzilla – Attachment 120663 Details for
Bug 26346
Add option to make a public list editable by library staff only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26346: Updated Edit list hint message
Bug-26346-Updated-Edit-list-hint-message.patch (text/plain), 4.89 KB, created by
Alex Buckley
on 2021-05-07 09:22:59 UTC
(
hide
)
Description:
Bug 26346: Updated Edit list hint message
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2021-05-07 09:22:59 UTC
Size:
4.89 KB
patch
obsolete
>From 199c1a7cc494a13f7fb61514a2368f6e970b28e9 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 30 Apr 2021 03:36:08 +0000 >Subject: [PATCH] Bug 26346: Updated Edit list hint message > >When a user creates a list with category = 'private' and Allow changes >to contents from = 'Staff only' they will see hint message referring to >the staff permission option. > >Test plan: > >1. Follow the test plan in the previous commit >2. Create a new list in the staff client, select 'Category'='Private', > 'Allow changes to contents from'='Staff only' >3. Notice 'The Staff only permission has no actual effect while this >list is strictly private' message hint is displayed >4. Change 'Category'='Public' and notice the hint is removed >5. Switch back to 'Category'='Private' and 'Allow changes to contents >from'='Anyone' >6. Notice the 'The Anyone permission has no actual effect while this >list is strictly private.' >7. Repeat steps 2-6 in the OPAC > >Sponsored-by: Horowhenua Library Trust, New Zealand >--- > .../prog/en/modules/virtualshelves/shelves.tt | 16 ++++++++++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 15 +++++++++++++-- > 2 files changed, 27 insertions(+), 4 deletions(-) > >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 7790d2fda6..1e393292a3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -39,6 +39,7 @@ > > </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> > </li> > [% END %] > </head> >@@ -811,16 +812,27 @@ > > if( perms < 2 ) { > $("#anyone_remark").hide(); >+ $("#staff_remark").hide(); > } else if( category==1 ) { >- // If we move to Private (without shares), show Anyone remark >+ // If we move to Private (without shares), show either: >+ // Anyone remark if Anyone can change the list >+ // Or Staff remark is Staff only can change the list > // Note: the number of shares is not tested real-time > [% IF !shelf.is_shared %] >- $("#anyone_remark").show(); >+ if( perms== 2) { >+ $("#anyone_remark").show(); >+ $("#staff_remark").hide(); >+ } else if ( perms==3 ) { >+ $("#anyone_remark").hide(); >+ $("#staff_remark").show(); >+ } > [% ELSE %] > $("#anyone_remark").hide(); >+ $("#staff_remark").hide(); > [% END %] > } else { // category==2 > $("#anyone_remark").hide(); >+ $("#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 3bdb18b641..adfe9598ee 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -53,6 +53,7 @@ > > </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> > </li> > [% END %] > >@@ -1102,16 +1103,26 @@ function AdjustRemark() { > > if( perms < 2 ) { > $("#anyone_remark").hide(); >+ $("#staff_remark".hide(); > } else if( category==1 ) { >- // If we move to Private (without shares), show Anyone remark >+ // If we move to Private (without shares), show one of the following: >+ // Anyone remark, if anyone can change the list >+ // Staff remark, if only Staff can change the list > // Note: the number of shares is not tested real-time > [% IF !shelf.is_shared %] >- $("#anyone_remark").show(); >+ if ( perms==2 ) { >+ $("#anyone_remark").show(); >+ $("#staff_remark").hide(); >+ } else if ( perms==3 ) { >+ $("#anyone_remark").hide(); >+ $("#staff_remark").show(); > [% ELSE %] > $("#anyone_remark").hide(); >+ $("#staff_remark").hide(); > [% END %] > } else { // category==2 > $("#anyone_remark").hide(); >+ $("#staff_remark").hide(); > } > } > </script> >-- >2.11.0
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 26346
:
119686
|
120663
|
120664
|
120665
|
120909
|
120910
|
120953
|
120954
|
121511
|
121512
|
122033
|
122034
|
122533
|
122535
|
122536
|
122537
|
122538
|
122539
|
122540
|
122685
|
122686
|
122687
|
122688
|
122689
|
122691
|
124010
|
124011
|
125436
|
125472
|
125914
|
125915
|
125916
|
125917
|
127556
|
127557
|
127558
|
127559
|
127560
|
128017
|
128018
|
128019
|
128020
|
128021
|
128022
|
128023
|
128383
|
128384
|
128385
|
131699
|
131700
|
131757
|
131764
|
132373
|
132475
|
132476
|
132477
|
132478
|
132479
|
132751
|
132752
|
132753
|
132754
|
132755