Bug 35048

Summary: Convert SCOMainUserBlock system preference to HTML customization
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Self checkoutAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, testopia, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/777
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 31383, 34894    
Bug Blocks: 26050, 35063    
Attachments: Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: (follow-up) Add entry to HTML customization help include
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: (follow-up) Add entry to HTML customization help include
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: (follow-up) Add entry to HTML customization help include
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
Bug 35048: (follow-up) Add entry to HTML customization help include
Bug 35048: (follow-up) Atomic update fixes

Description Owen Leonard 2023-10-13 12:32:42 UTC
Building on 22318, the SCOMainUserBlock system preference should be converted to an HTML customization option.
Comment 1 Owen Leonard 2023-10-13 14:12:22 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass (lukeg) 2023-10-13 14:23:34 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2023-10-20 17:26:16 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2023-10-20 21:19:05 UTC
Hi Owen, can you please also adjust this one for 31383?
Comment 5 Owen Leonard 2023-10-25 16:10:59 UTC
Created attachment 157831 [details] [review]
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization

This patch moves the SCOMainUserBlock system preference into HTML
customizations, making it possible to have language- and
library-specific content.

The patch also makes a minor fix to CSS in order to get the "Back to
top" link to show up correctly in self-checkout and self-checkin.

To test you should have some content in the SCOMainUserBlock
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from SCOMainUserBlock is now stored there.
- The HTML customization entry form should offer SCOMainUserBlock
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the SCOMainUserBlock HTML customization and add unique
  content to the "fr-FR" tab.

- Log into the self checkout system and confirm that the
  SCOMainUserBlock content is shown there.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "SCOMainUserBlock." It should return no results.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Owen Leonard 2023-10-25 16:11:01 UTC
Created attachment 157832 [details] [review]
Bug 35048: (follow-up) Add entry to HTML customization help include
Comment 7 Owen Leonard 2023-10-26 12:20:03 UTC
Created attachment 157918 [details] [review]
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization

This patch moves the SCOMainUserBlock system preference into HTML
customizations, making it possible to have language- and
library-specific content.

The patch also makes a minor fix to CSS in order to get the "Back to
top" link to show up correctly in self-checkout and self-checkin.

To test you should have some content in the SCOMainUserBlock
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from SCOMainUserBlock is now stored there.
- The HTML customization entry form should offer SCOMainUserBlock
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the SCOMainUserBlock HTML customization and add unique
  content to the "fr-FR" tab.

- Log into the self checkout system and confirm that the
  SCOMainUserBlock content is shown there.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "SCOMainUserBlock." It should return no results.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Owen Leonard 2023-10-26 12:20:05 UTC
Created attachment 157919 [details] [review]
Bug 35048: (follow-up) Add entry to HTML customization help include
Comment 9 Katrin Fischer 2023-11-05 11:17:05 UTC
Created attachment 158453 [details] [review]
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization

This patch moves the SCOMainUserBlock system preference into HTML
customizations, making it possible to have language- and
library-specific content.

The patch also makes a minor fix to CSS in order to get the "Back to
top" link to show up correctly in self-checkout and self-checkin.

To test you should have some content in the SCOMainUserBlock
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from SCOMainUserBlock is now stored there.
- The HTML customization entry form should offer SCOMainUserBlock
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the SCOMainUserBlock HTML customization and add unique
  content to the "fr-FR" tab.

- Log into the self checkout system and confirm that the
  SCOMainUserBlock content is shown there.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "SCOMainUserBlock." It should return no results.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2023-11-05 11:17:08 UTC
Created attachment 158454 [details] [review]
Bug 35048: (follow-up) Add entry to HTML customization help include

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2023-11-05 11:22:47 UTC
This doubled up "the" is fixed by the next patch in the series:

+<div id="SCOMainUserBlock_notes" class="hint customization_note">
+     Show this content on the the web-based self checkout screen.
+</div>
+
Comment 12 Tomás Cohen Arazi (tcohen) 2023-11-09 13:22:52 UTC
Applying: Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
error: sha1 information is lacking or useless (installer/data/mysql/mandatory/sysprefs.sql).
error: could not build fake ancestor
Patch failed at 0001 Bug 35048: Convert SCOMainUserBlock system preference to HTML customization
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /var/folders/c9/kzgdqlvn38q3v1gs59cjhzrw0000gn/T/Bug-35048-Convert-SCOMainUserBlock-system-preferen-8vmn73_f.patch
Comment 13 Owen Leonard 2023-11-09 14:40:17 UTC
Created attachment 158722 [details] [review]
Bug 35048: Convert SCOMainUserBlock system preference to HTML customization

This patch moves the SCOMainUserBlock system preference into HTML
customizations, making it possible to have language- and
library-specific content.

The patch also makes a minor fix to CSS in order to get the "Back to
top" link to show up correctly in self-checkout and self-checkin.

To test you should have some content in the SCOMainUserBlock
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from SCOMainUserBlock is now stored there.
- The HTML customization entry form should offer SCOMainUserBlock
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the SCOMainUserBlock HTML customization and add unique
  content to the "fr-FR" tab.

- Log into the self checkout system and confirm that the
  SCOMainUserBlock content is shown there.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "SCOMainUserBlock." It should return no results.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Owen Leonard 2023-11-09 14:40:19 UTC
Created attachment 158723 [details] [review]
Bug 35048: (follow-up) Add entry to HTML customization help include

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Owen Leonard 2023-11-09 14:40:21 UTC
Created attachment 158724 [details] [review]
Bug 35048: (follow-up) Atomic update fixes
Comment 16 Tomás Cohen Arazi (tcohen) 2023-11-09 17:44:05 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 17 Fridolin Somers 2023-11-11 07:21:45 UTC
Enhancement not pushed to 23.05.x