https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39538

Lisette Scheer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff
   Patch complexity|---                         |Large patch

--- Comment #3 from Lisette Scheer <[email protected]> ---
There are 4 fewer system preferences (IntranetUserCSS, OPACUserCSS,
SelfCheckInCSS, SelfCheckOutCSS) which are ported to the new snippets, as well
as removing the branch specific CSS from libraries as it can now be set at the
branch level in additional contents.

  Adding the diff for the log for ACTN1 coding guideline added the diff for all
the additional contents. 

I did allow for localaization because I could see an instance in which you
might want different css for different languages (or JS when I get to that in
another bug). 

There's a new user permission to edit_css_snippets 

Test plan:

---BEFORE APPLYING PATCH---
1. Go to administration and search for usercss
    For each setting put some code, I provide examples:
    - SelfCheckInUserCSS
        body {
            background-color: oklch(0.6009 0.1184 31.76);
        }
    - SCOUserCSS
        body {
            background-color: oklch(0.7 0.1 233);
        }
    - OPACUserCSS
        body {
            background-color: oklch(0.7 0.1357 350.47);
        }
    - IntranetUserCSS
        body {
            background-color: oklch(0.4199 0.1505 292.24);
        }
2. Set  WebBasedSelfCheck  to 'Enable' and SCOAllowCheckin to 'Allow' and
'AdditionalContentsLog' to on
3. Go to opac url/cgi-bin/koha/sco/sco-main.pl
- Observe a blue background
4. Go to opac url/cgi-bin/koha/sci/sci-main.pl
- Observe a reddish-orange background
5. go to the opac
- Observe a pink background
6. Reload the staff interface
- Observe a purple background
7. Go to Administration->Libraries, edit the library you're logged in as and
add css:
        body {
            background-color: oklch(0.82 0.1184 139.76);
        }
8. Go back to the opac, log in as koha/koha
- Observe a green background
9. Apply the patch
Rebuild the database, yarn build, restart all

10. Search the system preferences for usercss, there should be no results.
11. Go to administration->libraries->edit the library you edited before, there
should be no CSS field.
12. Go to Tools->CSS Snippets. There should be 5 snippets, 

| Location       | Library      | Number | Publication date | Title           |
| -------------- | ------------ | ------ | ---------------- | --------------- |
| StaffCSS       | All          | 1      | Today's date     | IntranetUserCSS |
| OPACCSS        | All          | 1      | Today's date     | OPACUserCSS     |
| SelfCheckInCSS | All          | 1      | Today's date     | SelfCheckInCSS  |
| SelfCheckOutCSS| All          | 1      | Today's date     | SelfCheckOutCSS |
| OPACCSS        | Your library | 2      | Today's date     | ??              |


13. Repeat steps 3-6 and step 9, the colors should all be the same as before.

14. Open the preview of the snippet, you should see that there is a
non-editable version of the editor, including highlighting and linting. 

15. Delete a snippet
16. Change a snippet
17. Go to the logs and filter on the Additional Contents. Observe the
difference between the first ones (old info column) vs the new json format.
18. In column settings, show the diff column. Observe the before and after
comparison
19. In the top right of the interface, click the bug and turn off CSS, it
should work on all staff CSS

Permissions testing:
1. Set up a patron (I used 23529000035676) with permission to log into the
catalog and to edit css snippets. Change their username and password so you can
log in as them.

2. In another browser or private window, log in as the second user
3. Confirm you can add, edit, and delete the snippets and do nothing else in
Tools.
4. As the superuser, change it so they can edit news, but not snippets.
5. As the secondary user, go to edit news and confirm you can't edit snippets
anymore.

 Current status: ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to