Bug 38942: Fix display issues with item-template-toolbar
This patch does the following: -Adds a 'btn' and 'btn-default' class to the buttons in the item-template-toolbar -Removes the btn-group parent containers -Changes the wording of the remember session checkbox to 'Remember for session', just like it is on the check out screen for due dates. -Adds a visual divider after the 'Remember for session' checkbox -Add CSS to addbiblio.css to make the checkbox/label appear a little nicer To test: -Add an item and 'Save as template' -Notice the toolbar buttons look different from other toolbars in Koha. -Apply patch -Look again, the buttons should look better, hopefully! Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
This commit is contained in:
parent
86c93b6ef8
commit
2e4c20a024
|
|
@ -334,6 +334,20 @@ tbody tr.active td {
|
|||
width: 15em;
|
||||
}
|
||||
|
||||
#item-template-toolbar div:has(label[for="use_template_for_session"]) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#item-template-toolbar div:has(label[for="use_template_for_session"])::after {
|
||||
content: "|";
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
#toolbar {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.toolbar-tabs-container {
|
||||
flex-basis: 100%;
|
||||
margin-top: .5em;
|
||||
|
|
|
|||
|
|
@ -244,58 +244,49 @@
|
|||
|
||||
[% IF item_templates.owned.count || item_templates.shared.count %]
|
||||
<div id="item-template-toolbar" class="btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<select name="template_id" id="template_id" class="select2" style="width: 20em">
|
||||
<option value="0" selected="selected">Do not use template</option>
|
||||
<optgroup label="My templates">
|
||||
[% FOREACH t IN item_templates.owned %]
|
||||
[% IF t.id == template_id %]
|
||||
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option>
|
||||
<select name="template_id" id="template_id" class="select2" style="width: 20em">
|
||||
<option value="0" selected="selected">Do not use template</option>
|
||||
<optgroup label="My templates">
|
||||
[% FOREACH t IN item_templates.owned %]
|
||||
[% IF t.id == template_id %]
|
||||
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option>
|
||||
[% ELSE %]
|
||||
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</optgroup>
|
||||
<optgroup label="Shared templates">
|
||||
[% FOREACH t IN item_templates.shared %]
|
||||
[% IF t.id == template_id %]
|
||||
[% IF CAN_user_editcatalogue_manage_item_editor_templates %]
|
||||
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
|
||||
[% ELSE %]
|
||||
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option>
|
||||
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% IF CAN_user_editcatalogue_manage_item_editor_templates %]
|
||||
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option>
|
||||
[% ELSE %]
|
||||
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</optgroup>
|
||||
<optgroup label="Shared templates">
|
||||
[% FOREACH t IN item_templates.shared %]
|
||||
[% IF t.id == template_id %]
|
||||
[% IF CAN_user_editcatalogue_manage_item_editor_templates %]
|
||||
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
|
||||
[% ELSE %]
|
||||
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% IF CAN_user_editcatalogue_manage_item_editor_templates %]
|
||||
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option>
|
||||
[% ELSE %]
|
||||
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa-solid fa-table-list"></i> Apply template</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
[% END %]
|
||||
</optgroup>
|
||||
</select>
|
||||
<button class="btn btn-default" type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa-solid fa-table-list"></i> Apply template</button>
|
||||
<div>
|
||||
<label for="use_template_for_session">
|
||||
[% IF use_template_for_session %]
|
||||
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked" />
|
||||
[% ELSE %]
|
||||
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" />
|
||||
[% END %]
|
||||
For session</label
|
||||
>
|
||||
Remember for session
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash-can"></i> Delete template</button>
|
||||
</div>
|
||||
<button class="btn btn-default" ype="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button>
|
||||
<button class="btn btn-default" type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash-can"></i> Delete template</button>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue