Bug 22336 - Better conversion from illrequestattributes to HTML attributes
Summary: Better conversion from illrequestattributes to HTML attributes
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal with 2 votes (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-14 12:31 UTC by Magnus Enger
Modified: 2019-02-14 12:31 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2019-02-14 12:31:56 UTC
The illrequestattributes table can hold any kind of attribute for an ILL request. Which attributes are displayed in the ILL detail view (both OPAC and Intranet) are determined by the per backend "metadata" sub, which can also assign labels to each attribute. So if you have an attribute called "lending_library" with a value of "LibraryX", you can call it "Lending library" and make it display as:

  Lending library: LibraryX

To make things stylable the label of the attribute is turned into an HTML ID or class. In the OPAC:

  <div class="requestattr-Lending library"><span class="label">Lending library:</span>LibraryX</div>

In the staff client:

  <li class="requestmeta-Lending_library"><span class="label">Lending library:</span>LibraryX</li>

We should be a bit more careful about how we use the labels in HTML attributes:
- Avoid spaces and other illegal characters (ISBN/ISSN is currently turned into "requestmeta-ISBN/ISSN")
- Maybe lowercase it? 
- Be consistent between OPAC and staff client

Perhaps it would be an alternative to just use the attribute name from the database? ("requestmeta-lending_library" in this example)