Owen Leonard
bb505d77f4
This follow-up makes drastic changes to the templates in order to bring them into compliance with established patterns and markup guidelines. Only minor changes are made to perl scripts. Changes: - Add a toolbar include for displaying new, edit, transfer, and delete buttons. - Improve title and breadcrumbs with collection titles and better specificity. - Correct page structure which was inconsistent with the markup of similarly-structured pages. - Correct styling of error and informational messages. - Added detailed error messages for a couple of conditions which were not defined in the template. - Add link to the detail page of titles which are in a collection using the view defined in the IntranetBiblioDefaultView preference. - Add a link to remove an item from a collection directly without having to scan the barcode. - Add client-side validation to collection creation form. - In RotatingCollections.pm, add biblionumber to the list of columns returned by GetItemsInCollection. - In rotating_collections/*.pl, remove obsolete declaration of system preference variables. To test, perform all the operations associated with Rotating Collections: - Add a new collection - Edit an existing collection - Add items to a collection - Remove items from a collection (via barcode and link) - Test the behavior of all new toolbar buttons - Verify that titles and breadcrumbs look correct and links work correctly. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
122 lines
No EOL
5.5 KiB
Text
122 lines
No EOL
5.5 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Rotating collections › Collection [% colTitle %] ’ Add or remove items</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$( document ).ready(function() {
|
|
$("#barcode").focus();
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> › <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]">Collection <i>[% colTitle %]</i></a> › Add or remove items</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% INCLUDE 'rotating-collections-toolbar.inc' %]
|
|
|
|
<h1>Collection <i>[% colTitle %]</i></h1>
|
|
|
|
[% IF ( previousActionAdd ) %]
|
|
[% IF ( addSuccess ) %]
|
|
<div class="dialog message">Item with barcode '[% barcode %]' added successfully</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">
|
|
<p>Failed to add item with barcode <i>[% barcode %]</i>:
|
|
<p>
|
|
[% IF failureMessage == "NO_ITEM" %]
|
|
No item with matching barcode found
|
|
[% ELSIF failureMessage == "IN_COLLECTION_OTHER" %]
|
|
Item is already in a different rotating collection
|
|
[% ELSIF failureMessage == "IN_COLLECTION" %]
|
|
Item is already in this collection
|
|
[% ELSE %]
|
|
[% failureMessage %]
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( previousActionRemove ) %]
|
|
[% IF ( removeSuccess ) %]
|
|
<div class="dialog message">Item with barcode <i>[% barcode %]</i> removed successfully</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">
|
|
Failed to remove item with barcode <i>[% barcode %]</i>:
|
|
<p>
|
|
[% IF failureMessage == "NO_ITEM" %]
|
|
No item with matching barcode found
|
|
[% ELSIF failureMessage == "NOT_IN_COLLECTION" %]
|
|
Item is not in this collection
|
|
[% ELSE %]
|
|
[% failureMessage %]
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
<div>
|
|
<form action="addItems.pl" method="post">
|
|
<fieldset class="brief">
|
|
<legend>Add or remove items</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="barcode">Barcode: </label>
|
|
<input type="text" id="barcode" name="barcode" />
|
|
[% IF ( removeChecked ) %]
|
|
<label class="inline"><input type="checkbox" name="removeItem" checked="checked" /> Remove item from collection</label>
|
|
[% ELSE %]
|
|
<label class="inline"><input type="checkbox" name="removeItem" /> Remove item from collection</label>
|
|
[% END %]
|
|
</li>
|
|
</ol>
|
|
<p>
|
|
<input type="hidden" id="colId" name="colId" value="[% colId %]" />
|
|
<input type="hidden" name="action" value="addItem" />
|
|
<input type="submit" value="Submit" />
|
|
</p>
|
|
</fieldset>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div>
|
|
<h2>Items in <i>[% colTitle %]</i></h2>
|
|
[% IF ( collectionItemsLoop ) %]
|
|
<table>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Call number</th>
|
|
<th>Barcode</th>
|
|
<th> </th>
|
|
</tr>
|
|
[% FOREACH collectionItemsLoo IN collectionItemsLoop %]
|
|
<tr>
|
|
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = collectionItemsLoo.biblionumber %][% collectionItemsLoo.title |html %]</a></td>
|
|
<td>[% collectionItemsLoo.itemcallnumber %]</td>
|
|
<td>[% collectionItemsLoo.barcode %]</td>
|
|
<td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]&barcode=[% collectionItemsLoo.barcode %]&removeItem=1&action=addItem">Remove</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">There are no items in this collection.</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
</div> <!-- /.yui-b -->
|
|
</div> <!-- /#yui-main -->
|
|
<div class="yui-b">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div> <!-- /#bd -->
|
|
[% INCLUDE 'intranet-bottom.inc' %] |