Bug 42267: Update lists pages to use grid layout for forms
This patch updates lists templates with new markup for laying out forms
using CSS grids.
To test, apply the patch rebuild the staff interface CSS.
Check the following pages, confirming that the forms look
correct.
- Lists -> New list
- Lists -> Edit list
- Lists -> View list -> Add records
- Lists -> View list -> Send list
- Lists -> View list -> Download
- We don't directly access the template for downloading lists anymore,
but it's still there:
http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/downloadshelf.pl?shelfnumber=1
Sponsored-by: Athens County Public Libraries
Signed-off-by: Gretchen Maxeiner <maxeinergl@gcc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
cac0556c53
commit
cd73ef9f34
|
|
@ -51,11 +51,14 @@
|
|||
|
||||
[% UNLESS ( newshelf ) %]
|
||||
[% IF private_shelves.count OR public_shelves.count OR private_shelves_shared_with_me.count %]
|
||||
<fieldset class="rows">
|
||||
<fieldset class="fg">
|
||||
<legend>Select an existing list</legend>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label>Choose list</label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select name="shelfnumber" id="shelfnumber">
|
||||
[% IF private_shelves.count %]
|
||||
<optgroup label="Private lists">
|
||||
|
|
@ -79,8 +82,9 @@
|
|||
</optgroup>
|
||||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
[% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />[% END %]
|
||||
[% UNLESS ( biblionumbers ) %]
|
||||
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
|
||||
|
|
@ -93,11 +97,13 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<fieldset class="rows"
|
||||
><legend>Add to a new list:</legend>
|
||||
<ol
|
||||
><li>
|
||||
<fieldset class="fg">
|
||||
<legend>Add to a new list:</legend>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="newvirtualshelf"> List name: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
[% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />[% END %]
|
||||
[% UNLESS ( biblionumbers ) %]
|
||||
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
|
||||
|
|
@ -106,15 +112,19 @@
|
|||
[% END %]
|
||||
<input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
|
||||
<input type="hidden" name="confirmed" value="1" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="category">Category:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="public">Category:</label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select name="public" id="public">
|
||||
<option value="0">Private</option>
|
||||
<option value="1">Public</option>
|
||||
</select>
|
||||
</li></ol
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
[% END %]
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,14 @@
|
|||
[% ELSE %]
|
||||
<div id="export" class="detailtagcell">
|
||||
<form method="get" action="/cgi-bin/koha/virtualshelves/downloadshelf.pl">
|
||||
<fieldset class="rows">
|
||||
<legend><h1>Download list</h1></legend>
|
||||
<ol
|
||||
><li>
|
||||
<h1>Download list</h1>
|
||||
<fieldset class="fg">
|
||||
<legend>Select a download format</legend>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="format">Format: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select name="format" id="format">
|
||||
<option value="">-- Choose format --</option>
|
||||
<option value="iso2709">MARC</option>
|
||||
|
|
@ -43,8 +46,8 @@
|
|||
<option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</li></ol
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="action"><input type="hidden" name="shelfid" value="[% shelfid | html %]" /> <input type="submit" name="save" class="btn btn-primary" value="Save" /> <a class="cancel close" href="#">Cancel</a> </fieldset>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -34,19 +34,26 @@
|
|||
[% INCLUDE 'csrf-token.inc' %]
|
||||
|
||||
<h1>Sending your list</h1>
|
||||
<fieldset class="rows">
|
||||
<fieldset class="fg">
|
||||
<legend class="sr-only">Enter message details</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="email">Email address:</label>
|
||||
<input type="text" id="email" name="email" size="43" class="focus" />
|
||||
</li>
|
||||
<li>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<input type="text" id="email" name="email" class="focus" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="comment">Comment:</label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<textarea id="comment" name="comment" rows="4" cols="40"></textarea>
|
||||
</li>
|
||||
<li> <input type="hidden" name="shelfid" value="[% shelfid | html %]" /> </li></ol
|
||||
></fieldset>
|
||||
<input type="hidden" name="shelfid" value="[% shelfid | html %]" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="op" value="cud-send" />
|
||||
|
||||
<nav class="navbar navbar-default fixed-bottom">
|
||||
|
|
|
|||
|
|
@ -34,42 +34,46 @@
|
|||
</style>
|
||||
|
||||
[% BLOCK list_permissions %]
|
||||
<li>
|
||||
<label for="allow_changes_from">Allow changes to contents from: </label>
|
||||
<select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
|
||||
[% IF shelf.allow_change_from_owner %]
|
||||
<option value="0">Nobody</option>
|
||||
[% ELSE %]
|
||||
<option value="0" selected="selected">Nobody</option>
|
||||
[% END %]
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="allow_changes_from">Allow changes to contents from: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
|
||||
[% IF shelf.allow_change_from_owner %]
|
||||
<option value="0">Nobody</option>
|
||||
[% ELSE %]
|
||||
<option value="0" selected="selected">Nobody</option>
|
||||
[% END %]
|
||||
|
||||
[% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
|
||||
<option value="1" selected="selected">Owner only</option>
|
||||
[% ELSE %]
|
||||
<option value="1">Owner only</option>
|
||||
[% END %]
|
||||
[% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
|
||||
<option value="1" selected="selected">Owner only</option>
|
||||
[% ELSE %]
|
||||
<option value="1">Owner only</option>
|
||||
[% END %]
|
||||
|
||||
[% IF shelf.allow_change_from_permitted_staff %]
|
||||
<option value="4" selected="selected">Permitted staff only</option>
|
||||
[% ELSE %]
|
||||
<option value="4">Permitted staff only</option>
|
||||
[% END %]
|
||||
[% IF shelf.allow_change_from_staff %]
|
||||
<option value="3" selected="selected">Staff only</option>
|
||||
[% ELSE %]
|
||||
<option value="3">Staff only</option>
|
||||
[% END %]
|
||||
[% IF shelf.allow_change_from_permitted_staff %]
|
||||
<option value="4" selected="selected">Permitted staff only</option>
|
||||
[% ELSE %]
|
||||
<option value="4">Permitted staff only</option>
|
||||
[% END %]
|
||||
[% IF shelf.allow_change_from_staff %]
|
||||
<option value="3" selected="selected">Staff only</option>
|
||||
[% ELSE %]
|
||||
<option value="3">Staff only</option>
|
||||
[% END %]
|
||||
|
||||
[% IF shelf.allow_change_from_others %]
|
||||
<option value="2" selected="selected">Anyone seeing this list</option>
|
||||
[% ELSE %]
|
||||
<option value="2">Anyone seeing this list</option>
|
||||
[% END %]
|
||||
</select>
|
||||
  <span id="permitted_staff_remark" style="display:none;color:red;">The Permitted staff only permission has no actual effect while this list is strictly private.</span>  
|
||||
<span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span>  
|
||||
<span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
|
||||
</li>
|
||||
[% IF shelf.allow_change_from_others %]
|
||||
<option value="2" selected="selected">Anyone seeing this list</option>
|
||||
[% ELSE %]
|
||||
<option value="2">Anyone seeing this list</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</div>
|
||||
  <div class="hint" id="permitted_staff_remark" style="display:none;color:red;">The Permitted staff only permission has no effect while this list is private.</div>  
|
||||
<div class="hint" id="staff_remark" style="display:none;color:red;">The Staff only permission has no effect while this list is private.</div>  
|
||||
<div class="hint" id="anyone_remark" style="display:none;color:red;">The Anyone permission has no effect while this list is private.</div>
|
||||
</div>
|
||||
[% END %]
|
||||
</head>
|
||||
|
||||
|
|
@ -417,7 +421,7 @@
|
|||
[% IF op == 'add_form' OR op == 'edit_form' %]
|
||||
<form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<fieldset class="rows">
|
||||
<fieldset class="fg">
|
||||
[% IF op == 'add_form' %]
|
||||
<legend><h1>Create a new list</h1></legend>
|
||||
<input type="hidden" name="op" value="cud-add" />
|
||||
|
|
@ -429,13 +433,21 @@
|
|||
[% END %]
|
||||
<input type="hidden" name="referer" value="[% referer | html %]" />
|
||||
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
||||
<ol>
|
||||
<li>
|
||||
<label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" />
|
||||
<span class="required">Required</span>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="shelfname" class="required">Name: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" />
|
||||
</div>
|
||||
<div class="required">Required</div>
|
||||
</div>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<span class="label">Owner: </span>
|
||||
</div>
|
||||
<div class="fg-text">
|
||||
[% IF op == 'add_form' %]
|
||||
<input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
|
||||
[% ELSE %]
|
||||
|
|
@ -445,10 +457,14 @@
|
|||
<input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="sortfield">Sort this list by: </label>
|
||||
<select name="sortfield">
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select id="sortfield" name="sortfield">
|
||||
[% IF shelf.sortfield == "title" %]
|
||||
<option value="title" selected="selected">Title</option>
|
||||
[% ELSE %]
|
||||
|
|
@ -477,10 +493,14 @@
|
|||
<option value="dateadded">Date added</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
[% IF ( CAN_user_lists_create_public_lists ) %]
|
||||
</div>
|
||||
</div>
|
||||
[% IF ( CAN_user_lists_create_public_lists ) %]
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="public">Public: </label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<select id="public" name="public" onchange="AdjustRemark()">
|
||||
[% IF shelf.is_private %]
|
||||
<option value="0" selected="selected">Private</option>
|
||||
|
|
@ -493,14 +513,20 @@
|
|||
<option value="1">Public</option>
|
||||
[% END %]
|
||||
</select>
|
||||
[% ELSE %]
|
||||
<label>Public: </label>
|
||||
</div>
|
||||
</div>
|
||||
[% ELSE %]
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<span class="label">Public: </span>
|
||||
</div>
|
||||
<div class="fg-text">
|
||||
<span>Private</span>
|
||||
<input id="public" name="public" value="0" type="hidden" />
|
||||
[% END %]
|
||||
</li>
|
||||
[% INCLUDE list_permissions %]
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
[% INCLUDE list_permissions %]
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="action">
|
||||
|
|
@ -595,23 +621,29 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<fieldset class="brief">
|
||||
<ol>
|
||||
<li>
|
||||
<fieldset class="fg">
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="barcodes">Barcodes:</label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<textarea name="barcodes" id="barcodes" rows="5"></textarea>
|
||||
<input type="hidden" name="op" value="cud-add_biblio" />
|
||||
<input type="hidden" name="referer" value="view" />
|
||||
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
||||
</li>
|
||||
<li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fg-row">
|
||||
<div class="fg-label">
|
||||
<label for="biblionumbers">Biblio numbers:</label>
|
||||
</div>
|
||||
<div class="fg-input">
|
||||
<textarea name="biblionumbers" id="biblionumbers" rows="5"></textarea>
|
||||
<input type="hidden" name="op" value="cud-add_biblio" />
|
||||
<input type="hidden" name="referer" value="view" />
|
||||
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- /.modal-body -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue