Jonathan Druart
a3c0c92508
This is the result of % perl csrf_add_missing_csrf.pl Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
159 lines
6.9 KiB
Text
159 lines
6.9 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% FILTER collapse %]
|
|
[% t("Manage items") | html %] ›
|
|
[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] ›
|
|
[% t("Rotating collections") | html %] ›
|
|
[% t("Tools") | html %] ›
|
|
[% t("Koha") | html %]
|
|
[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="rcoll_addItems" class="tools rcoll">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %]</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Manage items</span>
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
[% END #/ WRAPPER sub-header.inc %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
[% INCLUDE 'messages.inc' %]
|
|
[% 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>[% tx("Manage items for '{collection_title}'", { collection_title = colTitle }) | html %]</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" %]
|
|
<span>No item with matching barcode found</span>
|
|
[% ELSIF failureMessage == "IN_COLLECTION_OTHER" %]
|
|
<span>Item is already in a different rotating collection</span>
|
|
[% ELSIF failureMessage == "IN_COLLECTION" %]
|
|
<span>Item is already in this collection</span>
|
|
[% 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" %]
|
|
<span>No item with matching barcode found</span>
|
|
[% ELSIF failureMessage == "NOT_IN_COLLECTION" %]
|
|
<span>Item is not in this collection</span>
|
|
[% ELSE %]
|
|
[% failureMessage | html %]
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
<div>
|
|
<form action="addItems.pl" method="post">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<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>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="hidden" id="colId" name="colId" value="[% colId | html %]" />
|
|
<input type="hidden" name="action" value="addItem" />
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
</fieldset>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div class="page-section">
|
|
[% IF ( collectionItemsLoop ) %]
|
|
<h2>Items in collection</h2>
|
|
<p>Total items: [% collectionItemsLoop.size | html%]</p>
|
|
<table>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Call number</th>
|
|
<th>Barcode</th>
|
|
<th> </th>
|
|
</tr>
|
|
[% FOREACH collectionItemsLoo IN collectionItemsLoop %]
|
|
<tr>
|
|
<td>[% INCLUDE 'biblio-title.inc' biblio=collectionItemsLoo link = 1 %]</td>
|
|
<td>[% collectionItemsLoo.itemcallnumber | html %]</td>
|
|
<td>[% collectionItemsLoo.barcode | html %]</td>
|
|
<td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]&barcode=[% collectionItemsLoo.barcode | uri %]&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>
|
|
[% 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' %]
|