Bug 12093 - Add CSS classes to item statuses in detail view
Summary: Add CSS classes to item statuses in detail view
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Roberts
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks: 25804
  Show dependency treegraph
 
Reported: 2014-04-16 08:16 UTC by paxed
Modified: 2022-09-27 20:22 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.02
Circulation function:


Attachments
Add css classes to item statuses in detail view (5.58 KB, patch)
2014-04-16 08:16 UTC, paxed
Details | Diff | Splinter Review
Bug 12093: Add css classes to item statuses in detail view (6.84 KB, patch)
2020-05-09 22:16 UTC, David Roberts
Details | Diff | Splinter Review
Bug 12093: Add CSS classes to item statuses in detail view (6.90 KB, patch)
2020-05-23 11:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12093: Add CSS classes to item statuses in detail view (6.90 KB, patch)
2020-06-14 12:04 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12093: (QA follow-up) Fix typo 'noteforloan' (1.25 KB, patch)
2020-06-14 12:04 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 paxed 2014-04-16 08:16:32 UTC
Created attachment 27157 [details] [review]
Add css classes to item statuses in detail view

Some of the item statuses in detail view have no css classes, and are impossible to style effectively.

This patch wraps those statuses into spans with appropriate classes, and adds spans allowing styling dates and other information separately from the stock text.
Comment 1 Katrin Fischer 2020-01-05 13:46:29 UTC
Assignee is not set and bug number is missing from commit message.
Comment 2 David Roberts 2020-02-15 22:39:18 UTC
This wasn't my patch, but will pick this up to try to resolve it as it is currently unassigned. Looks like most of the work has already been done.
Comment 3 David Roberts 2020-04-04 21:09:58 UTC
Looks like the code in detail.tt has changed so completely this bug might not even still be relevant. Will check.
Comment 4 David Roberts 2020-05-09 22:16:23 UTC
Created attachment 104629 [details] [review]
Bug 12093: Add css classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.
Comment 5 David Roberts 2020-05-09 22:17:58 UTC
A great deal of the original patch is now obsolete. I've worked through the file and added classes where I think they are necessary - hopefully I haven't missed too many. I can't think of a nice way to test this, other than to view the page source so I hope that is OK.
Comment 6 Katrin Fischer 2020-05-23 11:13:06 UTC
Created attachment 105299 [details] [review]
Bug 12093: Add CSS classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2020-06-14 12:04:23 UTC
Created attachment 105859 [details] [review]
Bug 12093: Add CSS classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2020-06-14 12:04:27 UTC
Created attachment 105860 [details] [review]
Bug 12093: (QA follow-up) Fix typo 'noteforloan'

Just changes one character in the noteforloan class to notforloan.
Comment 9 Katrin Fischer 2020-06-14 12:05:31 UTC
I realized a little late that I was also the one to sign this off. Since it has already been sitting for almost a month and I actually tested it twice, risking to leave it as PQA.
Comment 10 Jonathan Druart 2020-06-15 09:59:01 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 11 Didier Gautheron 2020-06-15 16:05:56 UTC
Hi,

In my understanding <TITLE> is plain text
https://html.spec.whatwg.org/#the-title-element


An after this commit we get stuff like
<html lang="en">
<head>

<title>Koha &rsaquo; Catalog &rsaquo;
  
    <span class="titledetails">Details for The Korean Go Association's learn to play go /</span>
  
</title>

Regards
Didier
Comment 12 Katrin Fischer 2020-06-15 17:35:55 UTC
Argh. You are right, I missed the change to the title tag that can't contain other HTML tags. I will try to provide a follow up if David doesn't beat me to it.
Comment 13 Lucas Gass (lukeg) 2020-06-17 23:47:43 UTC
backported to 20.05.x for 20.05.01
Comment 14 Katrin Fischer 2020-06-18 07:38:39 UTC
Hi Lucas please revert, this will cause issues in display. We need a follow-up first.
Comment 15 Owen Leonard 2020-06-18 12:09:59 UTC
See Bug 25804
Comment 16 Lucas Gass (lukeg) 2020-06-18 13:04:46 UTC
Thanks Cait,

This patchset has been reverted from 20.05.x
Comment 17 Aleisha Amohia 2020-06-22 04:43:07 UTC
enhancement, not backported to 19.11.x
Comment 18 Tomás Cohen Arazi (tcohen) 2020-07-01 19:25:59 UTC
(In reply to Aleisha Amohia from comment #17)
> enhancement, not backported to 19.11.x

One could argue that this makes some strings translatable as well, so a mix of an enhancement and a bugfix.
Comment 19 Katrin Fischer 2020-07-01 19:56:20 UTC
(In reply to Tomás Cohen Arazi from comment #18)
> (In reply to Aleisha Amohia from comment #17)
> > enhancement, not backported to 19.11.x
> 
> One could argue that this makes some strings translatable as well, so a mix
> of an enhancement and a bugfix.

Hm, I don't think that's the case here - strings will change from the different formatting, but all should have translated ok before.
Comment 20 Lucas Gass (lukeg) 2020-07-10 15:35:03 UTC
backported to 20.05.x for 20.05.02 along with bz25804
Comment 21 Aleisha Amohia 2020-07-12 22:25:33 UTC
enhancement, not backported to 19.11.x.
Comment 22 Fridolin Somers 2022-09-27 20:22:08 UTC
This is great :D could we have the same for OPAC ?