Koha/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt
Martin Renvoize 7369fa5e50 Bug 26618: (QA follow-up) Update messages syntax
As highlighted, we were not using the standard form of message passing
here. This patch updates the template and controller to adopt the more
usual syntax.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00

84 lines
4 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Transfer collection</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_transferCollection" 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; Transfer collection</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Transfer collection <em>[% colTitle | html %]</em></h1>
[% IF ( messages ) %]
[% FOREACH message IN messages %]
<div class="dialog [% m.type | html %]">
[%- SWITCH message.code -%]
[%- CASE 'limits' %]
<p>Cannot transfer item [% message.item.itemnumber | html %] due to transfer limits</p>
[%- CASE 'enqueued' -%]
<p>Item [% message.item.itemnumber | html %] queued behind [% message.found_transfer.reason | html %] transfer to [% Branches.GetName(message.found_transfer.tobranch) | html %]</p>
[% END %]
</div>
[% END %]
[% END %]
[% IF ( transferSuccess ) %]
<div class="dialog message">
<p>Collection transferred successfully</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% ELSIF ( transferFailure ) %]
<div class="dialog alert">
<p>Failed to transfer collection</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% END %]
[% IF ( transferSuccess ) %]
[% ELSE %]
<div>
<form action="transferCollection.pl" method="post">
<input type="hidden" name="colId" value="[% colId | html %]" />
<fieldset class="rows">
<ol>
<li>
<label for="toBranch">Choose your library:</label>
<select id="toBranch" name="toBranch">
[% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
</select>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Transfer collection"> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a>
</fieldset>
</form>
</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' %]