Bug 28879: Fix display of request metadata

This commit adjusts the CSS surrounding the display of request
metadata, it improves the display for metadata with long key names.

Test plan:

- Do not apply patch
- Create a FreeForm ILL request with a custom metadata field with a long
  name
- View the created request
- Observe that the long metadata name breaks the display of the metadata
- Apply the patch
- View the created request
  => TEST: Observe that the display is no longer broken

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Andrew Isherwood 2021-08-18 15:07:54 +01:00 committed by Jonathan Druart
parent 8605082a78
commit b286d9be41
2 changed files with 36 additions and 3 deletions

View File

@ -2486,6 +2486,39 @@ nav {
display: block;
}
div.rows span.label {
float: inherit;
width: inherit;
text-align: inherit;
margin-right: 0;
}
#ill-supplier-metadata {
display: flex;
flex-flow: column nowrap;
flex: 1 1 auto;
}
div[class^='requestattr-'] {
width: 100%;
display: flex;
flex-flow: row nowrap;
padding: 5px;
&:nth-of-type(even) {
background-color: #f2f2f2;
}
&:nth-of-type(odd) {
background-color: #ffffff;
}
}
#ill-supplier-metadata > div > span {
display: flex;
flex-flow: row nowrap;
flex-grow: 1;
flex-basis: 0;
}
}
.ill_availability_sourcename {

View File

@ -220,12 +220,12 @@
</li>
</ol>
</fieldset>
<div class="rows">
<div id="ill-supplier-metadata" class="rows">
<legend id="backend_legend">Details from [% request.backend | html %]</legend>
[% FOREACH meta IN request.metadata %]
<div class="requestattr-[% meta.key | html %]">
<div class="requestattr-[% meta.key | replace(' ', '_') | html %]">
<span class="label">[% meta.key | html %]:</span>
[% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %]
<span class="value">[% IF meta.value %][% meta.value | html %][% ELSE %]N/A[% END %]</span>
</div>
[% END %]
</div>