Bug 8628 - Add digital signs to the OPAC
Summary: Add digital signs to the OPAC
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact:
URL:
Keywords:
Depends on: 8630
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-13 10:42 UTC by Magnus Enger
Modified: 2019-09-20 22:04 UTC (History)
10 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Large patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8628: Add digital signs to the OPAC, dbchanges (7.07 KB, patch)
2015-09-18 12:50 UTC, Martin Stenberg
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.43 KB, patch)
2015-09-18 12:51 UTC, Martin Stenberg
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.09 KB, patch)
2015-12-23 23:29 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.70 KB, patch)
2015-12-23 23:29 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (59.79 KB, patch)
2017-01-04 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.13 KB, patch)
2017-01-04 22:47 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.71 KB, patch)
2017-01-04 22:47 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (59.79 KB, patch)
2017-01-04 22:47 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (59.80 KB, patch)
2017-04-18 22:41 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] More fixes (21.65 KB, patch)
2017-06-13 04:20 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (59.77 KB, patch)
2017-08-20 21:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.13 KB, patch)
2017-08-20 22:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.71 KB, patch)
2017-08-20 22:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] More fixes (23.87 KB, patch)
2017-08-20 22:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (49.62 KB, patch)
2017-08-20 22:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.12 KB, patch)
2018-07-17 01:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.71 KB, patch)
2018-07-17 01:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] More fixes (24.12 KB, patch)
2018-07-17 01:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (49.62 KB, patch)
2018-07-17 01:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.12 KB, patch)
2018-07-20 01:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.71 KB, patch)
2018-07-20 01:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] More fixes (24.12 KB, patch)
2018-07-20 01:39 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (49.62 KB, patch)
2018-07-20 01:39 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Fixing internal server error and rebase issues (9.50 KB, patch)
2018-07-20 01:39 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Screenshot of the test. (64.80 KB, image/jpeg)
2018-09-14 19:03 UTC, Spencer
Details
Bug 8628: [FOLLOW-UP] More fixes (24.15 KB, patch)
2018-10-09 00:37 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC (49.62 KB, patch)
2018-10-09 00:37 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: [FOLLOW-UP] Fixing internal server error and rebase issues (9.50 KB, patch)
2018-10-09 00:37 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) Some template fixes (3.05 KB, patch)
2018-10-09 01:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC, dbchanges (7.20 KB, patch)
2018-12-05 22:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Add digital signs to the OPAC (70.71 KB, patch)
2018-12-05 22:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) More fixes (24.37 KB, patch)
2018-12-05 22:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) Add digital signs to the OPAC (49.62 KB, patch)
2018-12-05 22:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) Fixing internal server error and rebase issues (9.50 KB, patch)
2018-12-05 22:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) Some template fixes (3.05 KB, patch)
2018-12-05 22:19 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: (follow-up) Fixing CSS so titles don't overlap (1.17 KB, patch)
2018-12-17 20:57 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - db changes (13.09 KB, patch)
2019-04-26 01:47 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - schema updates (8.58 KB, patch)
2019-04-26 01:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - Koha objects (8.54 KB, patch)
2019-04-26 01:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - preferences and permissions (2.99 KB, patch)
2019-04-26 01:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - staff interface (38.15 KB, patch)
2019-04-26 01:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - opac interface (37.42 KB, patch)
2019-04-26 01:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 8628: Digital signs - db changes (13.08 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - schema updates (8.56 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - Koha objects (8.58 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - preferences and permissions (3.01 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - staff interface (38.20 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - opac interface (37.45 KB, patch)
2019-09-20 20:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8628: Digital signs - db changes (13.13 KB, patch)
2019-09-20 22:03 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8628: Digital signs - schema updates (8.62 KB, patch)
2019-09-20 22:03 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8628: Digital signs - Koha objects (8.63 KB, patch)
2019-09-20 22:03 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8628: Digital signs - preferences and permissions (3.06 KB, patch)
2019-09-20 22:04 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8628: Digital signs - staff interface (38.25 KB, patch)
2019-09-20 22:04 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8628: Digital signs - opac interface (37.50 KB, patch)
2019-09-20 22:04 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-08-13 10:42:22 UTC
See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.
Comment 1 Martin Stenberg 2015-09-18 12:50:32 UTC Comment hidden (obsolete)
Comment 2 Martin Stenberg 2015-09-18 12:51:10 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2015-12-23 23:29:02 UTC
Created attachment 45968 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 4 Chris Cormack 2015-12-23 23:29:24 UTC
Created attachment 45969 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 5 Jonathan Druart 2015-12-26 12:08:09 UTC
Martin,
Following the coding guidelines, new modules added to the Koha namespace should be object-oriented.
You should have a look at Koha::Object ( see Koha::Patron::Categories and Koha::Virtualshel* for examples).
Comment 6 Aleisha Amohia 2017-01-04 22:34:03 UTC
Created attachment 58602 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 7 Aleisha Amohia 2017-01-04 22:47:13 UTC
Created attachment 58603 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 8 Aleisha Amohia 2017-01-04 22:47:25 UTC
Created attachment 58604 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 9 Aleisha Amohia 2017-01-04 22:47:35 UTC
Created attachment 58605 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 10 Aleisha Amohia 2017-01-04 22:48:24 UTC
This patch should now apply cleanly and is ready for testing.
Comment 11 Aleisha Amohia 2017-04-18 22:41:36 UTC
Created attachment 62338 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 12 Katrin Fischer 2017-05-01 21:18:02 UTC
The QA scripts are pointing out some issues with these patches:

 FAIL	installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql
   OK	  git manipulation
   FAIL	  semicolon
		simicolon found instead of comma at line 1
		simicolon found instead of comma at line 3
		simicolon found instead of comma at line 2
   OK	  sysprefs_order

 FAIL	installer/data/mysql/kohastructure.sql
   FAIL	  charset_collate
		The table sign_streams does not have the current charset collate (see bug 11944)
		The table signs_to_streams does not have the current charset collate (see bug 11944)
		The table signs does not have the current charset collate (see bug 11944)
   OK	  git manipulation

 OK	installer/data/mysql/sysprefs.sql
   OK	  git manipulation
   OK	  semicolon
   OK	  sysprefs_order

 OK	koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt
   FAIL	  forbidden patterns
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 407)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 441)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 227)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 86)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 87)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 226)
		forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 442)
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt
   FAIL	  forbidden patterns
		forbidden pattern: simple-quote string (line 468)
		forbidden pattern: opac-tmpl should certainly replaced with [% interface %] (line 561)
		forbidden pattern: opac-tmpl should certainly replaced with [% interface %] (line 67)
		forbidden pattern: simple-quote string (line 464)
		forbidden pattern: simple-quote string (line 448)
		forbidden pattern: simple-quote string (line 450)
		forbidden pattern: simple-quote string (line 465)
		forbidden pattern: opac-tmpl should certainly replaced with [% interface %] (line 462)
		forbidden pattern: opac-tmpl should certainly replaced with [% interface %] (line 70)
		forbidden pattern: simple-quote string (line 478)
		forbidden pattern: opac-tmpl should certainly replaced with [% interface %] (line 69)
   OK	  git manipulation
   FAIL	  spelling
		 initilize  ==> initialize
   OK	  tt_valid
   OK	  valid_template

 FAIL	opac/opac-signs.pl
   OK	  critic
   FAIL	  forbidden patterns
		forbidden pattern: Koha is now under the GPLv3 license (line 9)
   OK	  git manipulation
   OK	  pod
   OK	  spelling
   OK	  valid

 FAIL	tools/signs.pl
   OK	  critic
   FAIL	  forbidden patterns
		forbidden pattern: Koha is now under the GPLv3 license (line 9)
   OK	  git manipulation
   OK	  pod
   OK	  spelling
   OK	  valid
Comment 13 Katrin Fischer 2017-05-01 21:37:57 UTC
Took a quick look at the code of the patches too:

1) There is an atomicupdate for adding a new permission edit_digital_signs, but no corresponding change to koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
2) Maybe a merge issue, but sysprefs.sql removes 2 existing system preferences and doesn't add the new ones?
3) There is a comment about YUI - maybe that can just be thrown out?
+    // prepare DOM for YUI Toolbar
4) the borrow permission is used in opac-signs.pl but has since been removed.
Comment 14 Aleisha Amohia 2017-06-13 04:20:46 UTC
Created attachment 64249 [details] [review]
Bug 8628: [FOLLOW-UP] More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 15 Katrin Fischer 2017-08-08 13:12:10 UTC
I tried to fix the conflicts in kohastructure.sql, but ended with:
 
Apply? [(y)es, (n)o, (i)nteractive] i
Applying: Bug 8628: [FOLLOW-UP] More fixes
fatal: sha1 information is lacking or useless (installer/data/mysql/kohastructure.sql).
error: could not build fake ancestor
Patch failed at 0001 Bug 8628: [FOLLOW-UP] More fixes
The copy of the patch that failed is found in: .git/rebase-apply/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 /tmp/Bug-8628-FOLLOW-UP-More-fixes-banEXL.patch

Can you please take a look?
Comment 16 Aleisha Amohia 2017-08-20 21:52:15 UTC
Created attachment 66246 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 17 Aleisha Amohia 2017-08-20 22:06:07 UTC
Created attachment 66247 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 18 Aleisha Amohia 2017-08-20 22:06:13 UTC
Created attachment 66248 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 19 Aleisha Amohia 2017-08-20 22:06:20 UTC
Created attachment 66249 [details] [review]
Bug 8628: [FOLLOW-UP] More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 20 Aleisha Amohia 2017-08-20 22:06:25 UTC
Created attachment 66250 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 21 Aleisha Amohia 2017-08-20 22:07:20 UTC
Sorry about all that - looks like the patches apply without conflicts now. Ready to test.
Comment 22 Owen Leonard 2017-09-07 16:08:09 UTC
Is it correct that this bug depends on Bug 8630?
Comment 23 Katrin Fischer 2017-10-07 20:04:40 UTC
Trying to test :)

- Nothing found in code review.
- Database update works nicely.

Not OK:

- QA test tools give some bad results:

 FAIL	Koha/Schema/Result/Sign.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	Koha/Schema/Result/SignStream.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	Koha/Schema/Result/SignsToStream.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	Koha/Sign.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	Koha/SignStream.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	Koha/SignsToStream.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   FAIL	  pod coverage
   OK	  spelling
   OK	  valid

 FAIL	installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql
   OK	  git manipulation
   FAIL	  semicolon
   OK	  sysprefs_order

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt
   FAIL	  forbidden patterns
   OK	  git manipulation
   FAIL	  spelling
   OK	  tt_valid
   OK	  valid_template

- On the /cgi-bin/koha/tools/signs.pl the datatable is broken (next page, etc.)
- I think it would be nicer to use "SIGN" instead of "SIG" for the report group and include it in the sample values.
- On point 16) of the test plan I receive an internal server error, so can't test the last steps:
Can't use string ("1") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/C4/Biblio.pm line 1182.
Comment 24 Magnus Enger 2018-02-06 09:20:54 UTC
I wonder if this would be better as a plugin...
Comment 25 Katrin Fischer 2018-02-08 07:24:58 UTC
It might be an option. But I really wish we could fix the translation problem of plugins so that we can really have fun with them.
Comment 26 Aleisha Amohia 2018-07-17 01:24:16 UTC
Created attachment 77025 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 27 Aleisha Amohia 2018-07-17 01:24:23 UTC
Created attachment 77026 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 28 Aleisha Amohia 2018-07-17 01:24:29 UTC
Created attachment 77027 [details] [review]
Bug 8628: [FOLLOW-UP] More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 29 Aleisha Amohia 2018-07-17 01:24:35 UTC
Created attachment 77028 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 30 Aleisha Amohia 2018-07-20 01:38:47 UTC
Created attachment 77141 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 31 Aleisha Amohia 2018-07-20 01:38:54 UTC
Created attachment 77142 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 32 Aleisha Amohia 2018-07-20 01:39:00 UTC
Created attachment 77143 [details] [review]
Bug 8628: [FOLLOW-UP] More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 33 Aleisha Amohia 2018-07-20 01:39:07 UTC
Created attachment 77144 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 34 Aleisha Amohia 2018-07-20 01:39:46 UTC
Created attachment 77145 [details] [review]
Bug 8628: [FOLLOW-UP] Fixing internal server error and rebase issues

This patch addresses the comments in Comment 23
Test that
1) all qa test tools pass
2) datatable on tools/signs.pl is not broken
3) features uses report group "SIGN" instead of "SIG"
4) you can complete the main test plan (no server errors)
Comment 35 Cab Vinton 2018-08-29 00:21:02 UTC
Tested in Biblibre Sandbox 1 --

Digital signs does not appear under Tools/Additional Tools.

cgi-bin/koha/opac-signs.pl not found on server.

OPACDigitalSigns system preference is added.
Comment 36 Spencer 2018-09-14 19:03:05 UTC
Created attachment 78709 [details]
Screenshot of the test.

When creating a stream, I was not forced to NAME the stream, meaning it was unavailable to select for the sign.  The test plan did not call for naming the stream.  I have also attached a screen shot showing the following results:

Images, local or otherwise, do now show.
The listed titles below seem to be both showing up at the same time.
Comment 37 Jonathan Druart 2018-09-14 19:20:17 UTC
(In reply to Spencer from comment #36)

Thanks for testing this Spencer! If the patches do not work as they should, you can change the status to "Failed QA" (and save some kittens)
Comment 38 Aleisha Amohia 2018-10-09 00:37:32 UTC
Created attachment 80248 [details] [review]
Bug 8628: [FOLLOW-UP] More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 39 Aleisha Amohia 2018-10-09 00:37:41 UTC
Created attachment 80249 [details] [review]
Bug 8628: [FOLLOW-UP] Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 40 Aleisha Amohia 2018-10-09 00:37:48 UTC
Created attachment 80250 [details] [review]
Bug 8628: [FOLLOW-UP] Fixing internal server error and rebase issues

This patch addresses the comments in Comment 23
Test that
1) all qa test tools pass
2) datatable on tools/signs.pl is not broken
3) features uses report group "SIGN" instead of "SIG"
4) you can complete the main test plan (no server errors)
Comment 41 Aleisha Amohia 2018-10-09 01:04:12 UTC
Created attachment 80252 [details] [review]
Bug 8628: (follow-up) Some template fixes

This patch:
- makes the stream name a required field
- fixes the link to the OPAC sign view
- fixes the toolbar in staff side

Still have not fixed the overlapping of titles.
Comment 42 Aleisha Amohia 2018-12-05 22:18:22 UTC
Created attachment 82896 [details] [review]
Bug 8628: Add digital signs to the OPAC, dbchanges

Database changes for bug 8628

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 43 Aleisha Amohia 2018-12-05 22:18:29 UTC
Created attachment 82897 [details] [review]
Bug 8628: Add digital signs to the OPAC

See http://wiki.koha-community.org/wiki/Digital_signs_RFC for details.

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIG, you should
   be warned that there are no reports in the group with code SIG and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIG. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit. Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

In theory this could/should be rewritten to use Koha::Schema instead
of direct sql, but this predates the switch, so would be unfair to
reject it on that basis (plus until we fix the speed straight sql is
way faster anyway)
Comment 44 Aleisha Amohia 2018-12-05 22:18:38 UTC
Created attachment 82898 [details] [review]
Bug 8628: (follow-up) More fixes

This patch fixes qa tool issues, problems in comment 13, merge
conflicts, other issues with patches

Same test plan applies
Comment 45 Aleisha Amohia 2018-12-05 22:18:45 UTC
Created attachment 82899 [details] [review]
Bug 8628: (follow-up) Add digital signs to the OPAC

This patch rewrites all modules from the original patch to be object
oriented.

Follows above test plan.

Sponsored-by: Region Halland
Comment 46 Aleisha Amohia 2018-12-05 22:18:52 UTC
Created attachment 82900 [details] [review]
Bug 8628: (follow-up) Fixing internal server error and rebase issues

This patch addresses the comments in Comment 23
Test that
1) all qa test tools pass
2) datatable on tools/signs.pl is not broken
3) features uses report group "SIGN" instead of "SIG"
4) you can complete the main test plan (no server errors)
Comment 47 Aleisha Amohia 2018-12-05 22:19:00 UTC
Created attachment 82901 [details] [review]
Bug 8628: (follow-up) Some template fixes

This patch:
- makes the stream name a required field
- fixes the link to the OPAC sign view
- fixes the toolbar in staff side

Still have not fixed the overlapping of titles.
Comment 48 Aleisha Amohia 2018-12-17 20:57:41 UTC
Created attachment 83312 [details] [review]
Bug 8628: (follow-up) Fixing CSS so titles don't overlap

I have amended the CSS so the titles sit side-by-side rather than on top
of each other.
Comment 49 Michal Denar 2019-04-14 18:28:36 UTC
Please rebase on master.
Comment 50 Aleisha Amohia 2019-04-26 01:47:54 UTC
Created attachment 88821 [details] [review]
Bug 8628: Digital signs - db changes

- Adding edit_digital_signs permission for managing digital signs
- Adding OPACDigitalSigns, OPACDigitalSignsCSS and
OPACDigitalSignsSwatches system preferences
- Adding signs, sign_streams and signs_to_streams tables
- Updating sysprefs.sql and kohastructure.sql
Comment 51 Aleisha Amohia 2019-04-26 01:48:03 UTC
Created attachment 88822 [details] [review]
Bug 8628: Digital signs - schema updates
Comment 52 Aleisha Amohia 2019-04-26 01:48:09 UTC
Created attachment 88823 [details] [review]
Bug 8628: Digital signs - Koha objects
Comment 53 Aleisha Amohia 2019-04-26 01:48:14 UTC
Created attachment 88824 [details] [review]
Bug 8628: Digital signs - preferences and permissions
Comment 54 Aleisha Amohia 2019-04-26 01:48:20 UTC
Created attachment 88825 [details] [review]
Bug 8628: Digital signs - staff interface

This patch adds the interface for creating and managing digital signs
and streams.
Comment 55 Aleisha Amohia 2019-04-26 01:48:25 UTC
Created attachment 88826 [details] [review]
Bug 8628: Digital signs - opac interface

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIGN, you should
   be warned that there are no reports in the group with code SIGN and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIGN. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)

    or if you are testing the parameters feature of the digital signs, an example report could be:

    SELECT * FROM biblio WHERE biblionumber < placeholder.
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit.
    If you have attached a report with a parameter placeholder, edit the parameters so that the placeholder gets substituted with a value. For example, in the edit parameters box, you can have:

    placeholder = 10000

    When you submit, you'll see the SQL replaces the placeholder with your value and completes the query.
    Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Comment 56 Nick Clemens 2019-09-20 20:36:04 UTC
Created attachment 93054 [details] [review]
Bug 8628: Digital signs - db changes

- Adding edit_digital_signs permission for managing digital signs
- Adding OPACDigitalSigns, OPACDigitalSignsCSS and
OPACDigitalSignsSwatches system preferences
- Adding signs, sign_streams and signs_to_streams tables
- Updating sysprefs.sql and kohastructure.sql
Comment 57 Nick Clemens 2019-09-20 20:36:14 UTC
Created attachment 93055 [details] [review]
Bug 8628: Digital signs - schema updates
Comment 58 Nick Clemens 2019-09-20 20:36:25 UTC
Created attachment 93056 [details] [review]
Bug 8628: Digital signs - Koha objects
Comment 59 Nick Clemens 2019-09-20 20:36:37 UTC
Created attachment 93057 [details] [review]
Bug 8628: Digital signs - preferences and permissions
Comment 60 Nick Clemens 2019-09-20 20:36:44 UTC
Created attachment 93058 [details] [review]
Bug 8628: Digital signs - staff interface

This patch adds the interface for creating and managing digital signs
and streams.
Comment 61 Nick Clemens 2019-09-20 20:36:58 UTC
Created attachment 93059 [details] [review]
Bug 8628: Digital signs - opac interface

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIGN, you should
   be warned that there are no reports in the group with code SIGN and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIGN. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)

    or if you are testing the parameters feature of the digital signs, an example report could be:

    SELECT * FROM biblio WHERE biblionumber < placeholder.
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit.
    If you have attached a report with a parameter placeholder, edit the parameters so that the placeholder gets substituted with a value. For example, in the edit parameters box, you can have:

    placeholder = 10000

    When you submit, you'll see the SQL replaces the placeholder with your value and completes the query.
    Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland
Comment 62 Nick Clemens 2019-09-20 20:38:37 UTC
Minor rebase on kohastructure
Comment 63 ByWater Sandboxes 2019-09-20 22:03:06 UTC
Created attachment 93066 [details] [review]
Bug 8628: Digital signs - db changes

- Adding edit_digital_signs permission for managing digital signs
- Adding OPACDigitalSigns, OPACDigitalSignsCSS and
OPACDigitalSignsSwatches system preferences
- Adding signs, sign_streams and signs_to_streams tables
- Updating sysprefs.sql and kohastructure.sql

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 64 ByWater Sandboxes 2019-09-20 22:03:30 UTC
Created attachment 93067 [details] [review]
Bug 8628: Digital signs - schema updates

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 65 ByWater Sandboxes 2019-09-20 22:03:48 UTC
Created attachment 93068 [details] [review]
Bug 8628: Digital signs - Koha objects

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 66 ByWater Sandboxes 2019-09-20 22:04:01 UTC
Created attachment 93069 [details] [review]
Bug 8628: Digital signs - preferences and permissions

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 67 ByWater Sandboxes 2019-09-20 22:04:15 UTC
Created attachment 93070 [details] [review]
Bug 8628: Digital signs - staff interface

This patch adds the interface for creating and managing digital signs
and streams.

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 68 ByWater Sandboxes 2019-09-20 22:04:22 UTC
Created attachment 93071 [details] [review]
Bug 8628: Digital signs - opac interface

To test:
1. Apply this patch and the database updates patch
2. Run updatedatabase.pl
3. In staff client, go to Tools/Additional Tools/Digital signs
4. You should be warned about OPACDigitalSigns not being enabled, you can ignore
   this for now.
5. Add a new sign by clicking the "+ New sign" button
6. Enter a name and optionally numbers for automatic page turing
7. Your new sign should appear in the Signs list
8. Add a new stream by clicking the "+ New stream" button
9. Unless you already have reports in the report group with code SIGN, you should
   be warned that there are no reports in the group with code SIGN and given a
   link for creating a new report. Follow the link and create a new report with
   report group code SIGN. En example SQL command for the report could be:

   SELECT * FROM biblio WHERE timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)

    or if you are testing the parameters feature of the digital signs, an example report could be:

    SELECT * FROM biblio WHERE biblionumber < placeholder.
10. Go back to the "new stream" page, and reload. You should no longer see a
    warning message, and your newly created report should appear in the list of
    reports.
11. Select the report and click Submit. Your newly created stream should now
    appear in the list of streams.
12. In the list of signs, press "edit streams" for the sign you previously
    created.
13. Choose a stream to attach and click Submit.
    If you have attached a report with a parameter placeholder, edit the parameters so that the placeholder gets substituted with a value. For example, in the edit parameters box, you can have:

    placeholder = 10000

    When you submit, you'll see the SQL replaces the placeholder with your value and completes the query.
    Your sign is now ready for OPAC.
14. In OPAC, visit /cgi-bin/koha/opac-signs.pl
15. You should be told that Digital signs are not enabled. Enable with new
    system preference OPACDigitalSigns and reload the page.
15. You should see a list of available signs, click on a sign that you wish to
    display.
16. You should now see a list of all books matching the SQL query in the report
    that you attached to your stream.
17. If you have OPACLocalCoverImages enabled, all books with local covers
    attached should be presented using this cover.
    If no local cover is available and the book has a ISBN with a cover in
    openlibrary.org, the cover image from openlibrary.org should be shown.
    If all of the above fails, a cover matching the theme of the page should be
    seen, showing the book title and author.
18. Clicking a book should bring you to a detailed view of the book where you
    can see the books availability. You should also see the two next books and
    the two previous books in the stream (unless you're at the beginning or end
    of the stream)
19. Swiping (if no touch screen, click and hold left mouse button and drag)
    left/right should bring you to next/previous book. Clicking on the
    next/previous books (right/left of the active one) should bring you to the
    detailed view of the clicked book.
20. Leaving the page idle (i.e no user interaction) for the amount of time
    specified in step 6. should result in the page automatically switching to
    the next book in the stream.

Sponsored-by: Regionbibliotek Halland / County library of Halland

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>