Bug 12334 - Make it easier to hide parts of material type and format information in OPAC
Summary: Make it easier to hide parts of material type and format information in OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-30 08:21 UTC by Katrin Fischer
Modified: 2015-06-04 23:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12334: Make it easy to hide parts of material type and format information in results (13.20 KB, patch)
2014-08-28 11:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12334: Make it easy to hide parts of material type and format information in results (13.39 KB, patch)
2014-10-28 19:44 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 12334: Make it easy to hide parts of material type and format information in results (13.44 KB, patch)
2014-10-30 16:48 UTC, Brendan Gallagher
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-05-30 08:21:24 UTC
On the result list Koha displays the material type, the format and the type of the material. We have a system preference to hide the line in total, but if you only want to hide part of it, the HTML structure does not make this easy:


<span class="results_summary type">
<span class="label">Material type: </span>
<img class="materialtype" title="serial" alt="serial" src="/opac-tmpl/lib/famfamfam/silk/newspaper.png">
Continuing Resource
<span class="label">; Format: </span>
print
<span class="label">; Type of continuing resource: </span>
series
</span>

This could be improved by wrapping the lable and the content into separate spans or someething similar.
Comment 1 Katrin Fischer 2014-08-28 11:40:45 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2014-10-28 19:44:49 UTC Comment hidden (obsolete)
Comment 3 Brendan Gallagher 2014-10-30 16:48:46 UTC
Created attachment 32989 [details] [review]
Bug 12334: Make it easy to hide parts of material type and format information in results

With the system preferences DisplayIconsXSLT and DisplayOPACiconsXSLT we control
the visibility of the material type, format and audience information in staff
and OPAC.

Sometimes a library might only want to hide a part of that information - for
example, hide audience but keep the material type icon.

This patch adds CSS classes to make it easier to style this section of the page
and hide parts of the information.

To test:
- Verify that OPAC and staff result lists for various types of materials
  still display nicely.
- Take a look at the HTML and verify, that label and text are now
  wrapped into a new span with a results_* class.
- Try hiding a part of the information, for example in OpacUserCSS:

.results_material_type {
  display none;
}

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described... but for a missing colon on example CSS

.results_material_type {
  display: none;
}

No koha-qa errors

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2014-11-07 18:23:24 UTC
Patch pushed to master.

Thanks Katrina!