Bug 27023 - Add class names in the suggestions column in suggestions management
Summary: Add class names in the suggestions column in suggestions management
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-13 23:00 UTC by Lucas Gass
Modified: 2021-07-31 20:46 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This enhancement adds classes to the various information spans displayed in the suggestions table. This allows for simple targeting of CSS rules to highlight or hide information that is important/irrelevant for your library's use.
Version(s) released in:
21.05.00,20.11.03


Attachments
Bug 27023: Add class names in acq suggestion table (suggestions column) (3.97 KB, patch)
2020-11-13 23:05 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27023: Add class names in acq suggestion table (suggestions column) (4.01 KB, patch)
2020-11-14 08:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 27023: Add class names in acq suggestion table (suggestions column) (4.01 KB, patch)
2021-01-10 21:21 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27023: (QA follow-up) Fix span tags (3.86 KB, patch)
2021-01-10 21:21 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27023: Add class names in acq suggestion table (suggestions column) (4.01 KB, patch)
2021-01-15 15:50 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27023: Add class names in acq suggestion table (suggestions column) (4.01 KB, patch)
2021-01-15 21:17 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27023: (QA follow-up) Fix span tags (3.87 KB, patch)
2021-01-15 21:17 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27023: Add class names in acq suggestion table (suggestions column) (4.07 KB, patch)
2021-01-17 15:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27023: (QA follow-up) Fix span tags (4.28 KB, patch)
2021-01-17 15:44 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2020-11-13 23:00:20 UTC
There is a lot of info. that goes into the Suggestions column in '/cgi-bin/koha/suggestion/suggestion.pl'. It's currently hard to parse that different information out if you wanted to do something like change the color of the text for each item type. 

It would be trivial to add class names.
Comment 1 Lucas Gass 2020-11-13 23:05:12 UTC
Created attachment 113635 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype
Comment 2 David Nind 2020-11-14 08:14:32 UTC
Created attachment 113640 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-01-10 21:21:30 UTC
Created attachment 114994 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2021-01-10 21:21:33 UTC
Created attachment 114995 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)
Comment 5 Jonathan Druart 2021-01-12 15:33:11 UTC
Typo suggestion_coprightdate
Comment 6 Lucas Gass 2021-01-15 15:50:58 UTC
Created attachment 115209 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2021-01-15 16:26:41 UTC
Hi Lucas, did you see my follow-up patch? Sequence of attachements is wrong now, but not sure if you tested with or without.
Comment 8 Lucas Gass 2021-01-15 21:17:19 UTC
Created attachment 115213 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Lucas Gass 2021-01-15 21:17:24 UTC
Created attachment 115214 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)
Comment 10 Lucas Gass 2021-01-15 21:18:29 UTC
(In reply to Katrin Fischer from comment #7)
> Hi Lucas, did you see my follow-up patch? Sequence of attachements is wrong
> now, but not sure if you tested with or without.

Sorry about that. I have tested with your QA follow-up. I the reattached them in the correct order. I am still keeping David's SO line.
Comment 11 Katrin Fischer 2021-01-17 15:44:03 UTC
Created attachment 115220 [details] [review]
Bug 27023: Add class names in acq suggestion table (suggestions column)

Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-01-17 15:44:06 UTC
Created attachment 115221 [details] [review]
Bug 27023: (QA follow-up) Fix span tags

One of the opening tags was missing the > and another was in the
wrong spot (started after the IF, but ending outside ouf it)

Move spaces around a bit so the strings don't start with spaces.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2021-01-20 12:51:14 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 14 Fridolin Somers 2021-01-25 14:49:39 UTC
Small enhancement, I choose to backport.

Pushed to 20.11.x for 20.11.03
Comment 15 Andrew Fuerste-Henry 2021-02-01 20:25:41 UTC
Enhancement, not backporting to 20.05. Please ask if needed.