Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

135 lines
6.2 KiB

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Collection [% colTitle | html %] &rsaquo; Add or remove items</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_addItems" class="tools rcoll">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | html %]">Collection <em>[% colTitle | html %]</em></a> &rsaquo; Add or remove items</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF ( ! colId ) %]
<div class="dialog message">
<p>Invalid collection id</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% ELSE %]
[% INCLUDE 'rotating-collections-toolbar.inc' %]
<h1>Collection <em>[% colTitle | html %]</em></h1>
[% IF ( previousActionAdd ) %]
[% IF ( addSuccess ) %]
<div class="dialog message">Item with barcode '[% barcode | html %]' added successfully</div>
[% ELSE %]
<div class="dialog alert">
<p>Failed to add item with barcode <em>[% barcode | html %]</em>:
<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 | html %]
[% END %]
</p>
</div>
[% END %]
[% END %]
[% IF ( previousActionRemove ) %]
[% IF ( removeSuccess ) %]
<div class="dialog message">Item with barcode <em>[% barcode | html %]</em> removed successfully</div>
[% ELSE %]
<div class="dialog alert">
Failed to remove item with barcode <em>[% barcode | html %]</em>:
<p>
[% IF failureMessage == "NO_ITEM" %]
No item with matching barcode found
[% ELSIF failureMessage == "NOT_IN_COLLECTION" %]
Item is not in this collection
[% ELSE %]
[% failureMessage | html %]
[% 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 | html %]" />
<input type="hidden" name="action" value="addItem" />
<input type="submit" value="Submit" />
</p>
</fieldset>
</form>
</div>
<div>
<h2>Items in <em>[% colTitle | html %]</em></h2>
[% IF ( collectionItemsLoop ) %]
<h3>Total items: [% collectionItemsLoop.size | html%]</h3>
<table>
<tr>
<th>Title</th>
<th>Call number</th>
<th>Barcode</th>
<th>&nbsp;</th>
</tr>
[% FOREACH collectionItemsLoo IN collectionItemsLoop %]
<tr>
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = collectionItemsLoo.biblionumber %][% collectionItemsLoo.title | html %]</a></td>
<td>[% collectionItemsLoo.itemcallnumber | html %]</td>
<td>[% collectionItemsLoo.barcode | html %]</td>
<td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]&amp;barcode=[% collectionItemsLoo.barcode | uri %]&amp;removeItem=1&amp;action=addItem">Remove</a></td>
</tr>
[% END %]
</table>
[% ELSE %]
<div class="dialog message">There are no items in this collection.</div>
[% END %]
</div>
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% Asset.js("js/rotating-collections.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]