Owen Leonard
b2eb614bd4
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
175 lines
7.2 KiB
Text
175 lines
7.2 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>
|
|
[%- IF ( action == "new" ) %]
|
|
Add a new collection
|
|
[% ELSE %]
|
|
Edit collection [% editColTitle | html %]
|
|
[% END -%] › Rotating collections › Tools › Koha
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="rcoll_editCollections" class="tools rcoll">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
|
|
<ol>
|
|
<li>
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a>
|
|
</li>
|
|
|
|
[%- IF ( action == "new" ) %]
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Add a new collection
|
|
</a>
|
|
</li>
|
|
[% ELSE %]
|
|
<li>
|
|
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId | uri %]">Collection <em>[% editColTitle | html %]</em></a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Edit
|
|
</a>
|
|
</li>
|
|
[% END -%]
|
|
</ol>
|
|
</nav>
|
|
[% END %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
[% IF ( previousActionCreate ) %]
|
|
[% IF ( createSuccess ) %]
|
|
<div class="dialog message">
|
|
<p>Collection <em>[% createdTitle | html %]</em> added successfully</p>
|
|
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
|
|
</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">
|
|
<p>Collection <em>[% createdTitle | html %]</em> failed to be added</p>
|
|
<p>
|
|
[% IF failureMessage == "NO_TITLE" %]
|
|
<span>No title entered.</span>
|
|
[% ELSIF failureMessage == "DUPLICATE_TITLE" %]
|
|
<span>Title already in use.</span>
|
|
[% ELSIF failureMessage == "NO_DESCRIPTION" %]
|
|
<span>No description entered.</span>
|
|
[% ELSE %]
|
|
[% failureMessage | html %]
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( previousActionDelete ) %]
|
|
[% IF ( deleteSuccess ) %]
|
|
<div class="dialog message">
|
|
<p>Collection deleted successfully</p>
|
|
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
|
|
</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">Collection failed to be deleted</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( previousActionUpdate ) %]
|
|
[% IF ( updateSuccess ) %]
|
|
<div class="dialog message">
|
|
<p>Collection <em>[% updatedTitle | html %]</em> updated successfully</p>
|
|
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
|
|
</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">
|
|
<p>Collection <em>[% updatedTitle | html %]</em> failed to be updated</p>
|
|
<p>
|
|
[% IF failureMessage == "NO_ID" %]
|
|
No collection id given.
|
|
[% ELSIF failureMessage == "DUPLICATE_TITLE" %]
|
|
Title already in use.
|
|
[% ELSE %]
|
|
[% failureMessage | html %]
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
<div>
|
|
|
|
[% IF action == "new" || action == "edit" %]
|
|
[% IF ( previousActionEdit ) %]
|
|
<h1>Edit collection <em>[% editColTitle | html %]</em></h1>
|
|
[% ELSE %]
|
|
<h1>Add new collection</h1>
|
|
[% END %]
|
|
|
|
<form action="editCollections.pl" method="post" class="validated">
|
|
[% IF ( previousActionEdit ) %]
|
|
<input type="hidden" name="action" value="update" />
|
|
<input type="hidden" name="colId" value="[% editColId | html %]" />
|
|
[% ELSE %]
|
|
<input type="hidden" name="action" value="create" />
|
|
[% END %]
|
|
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label class="required" for="title">Title: </label>
|
|
[% IF ( editColTitle ) %]
|
|
<input type="text" name="title" value="[% editColTitle | html %]" required="required" />
|
|
<span class="required">Required</span>
|
|
[% ELSE %]
|
|
<input type="text" name="title" required="required" />
|
|
<span class="required">Required</span>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="description">Description: </label>
|
|
[% IF (editColDescription ) %]
|
|
<input type="text" size="50" name="description" value="[% editColDescription | html %]" />
|
|
[% ELSE %]
|
|
<input type="text" size="50" name="description" />
|
|
[% END %]
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<p><input type="submit" value="Submit" /> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a></p>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
</div>
|
|
|
|
</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' %]
|