The data in the Location-column in the search results table is impossible to style because there are no HTML classes. Sprinkle those around, so libraries can hide information they don't need.
Created attachment 73101 [details] [review] Bug 20452: Add HTML classes to search results availability data The data in the Location-column in the search results table is impossible to style because there are no HTML classes. Sprinkle those around, so libraries can hide information they don't need. Test plan: 1) Apply patch 2) Search for biblios 3) Check that the data in the Location-column looks correct. 4) Optionally, look through the page source that it looks correct.
While the patch is good, I'm thinking that such short generic names is probably a bad thing. For example, look at the staff-global.css or the opac.less file. There are branchgrid things or #item things. Perhaps just adding the word list would be a good idea?
(In reply to M. Tompsett from comment #2) > While the patch is good, I'm thinking that such short generic names is > probably a bad thing. For example, look at the staff-global.css or the > opac.less file. There are branchgrid things or #item things. Perhaps just > adding the word list would be a good idea? The patch doesn't add any branchgrid class, so I don't know why that would be a problem? Also, staff-global.css doesn't have any selectors for #item? (And the patch doesn't add any item class either - it has itemcn, which is not matched by anything in staff-global.css - and certainly shouldn't be! If there were any css selectors that match globally with a short, generic, simple word commonly used in Koha (say, for example. "item"), then those selectors should be written to be more specific - For example, a hypothetical: #item { background: pink; } should be written to match only at the place where we want that pink background, say in the search results: #searchresults #item { background: pink; } Otherwise, the too widely matching selector would have side effects, for example sometime later, people might add code that uses class item, but aren't expecting it to show up with pink bg.
You missed my point. I think the class name is bad. Add 'list' to it, because otherwise, someone else for something else will add 'item' and then wonder why it doesn't work the first time.
(In reply to paxed from comment #3) > The patch doesn't add any branchgrid class, so I don't know why that would > be a problem? Also, staff-global.css doesn't have any selectors for #item? > (And the patch doesn't add any item class either - it has itemcn, which is > not matched by anything in staff-global.css - and certainly shouldn't be! I was giving examples of how longer names were already used, rather than just "branch", "item", etc.
(In reply to M. Tompsett from comment #4) > You missed my point. I think the class name is bad. Add 'list' to it, > because otherwise, someone else for something else will add 'item' and then > wonder why it doesn't work the first time. Which class name? Prepend "list" to all of those new classes?
Maybe better to use 'results_'. Would this be ok for you?
(In reply to Katrin Fischer from comment #7) > Maybe better to use 'results_'. Would this be ok for you? Don't care what is prepended, appended... just not so bare as "branch", "item", etc. and as long as it makes sense.
(In reply to Katrin Fischer from comment #7) > Maybe better to use 'results_'. Would this be ok for you? I agree with this suggestion.