Koha/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt
Victor Grousset/tuxayo 7758a0248e
Bug 30733: Simplify translatable strings
And a few minor fixes when they where causing issues for
translatability.
And rephrased a string about password reset to have it identical to
other strings with the same meaning.

Simplified via wrapping strings with <span> to split to huge
concatenated strings with a lot of %s everywhere.

== Test plan ==
This patch needs mainly proof reading. Still it's possible to do some
basic testing to demonstrate that adding a <span> in an IF doesn't
break anything.
Pick in one of the 110 modified templates a string that you know how to
display. Otherwise:
1. acquisitions => vendor => basket => add to basket =>
   search "from existing record" => add order
2. Cancel the order
3. You see without issue "Bibliographic record will not be deleted"
4. administration => Patron categories
5. Try to delete a used and unused category
6. You see as expected
   Category XXXX is in use. Deletion not possible!
   and
   Confirm deletion of category XXXX

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-17 10:16:34 -03:00

156 lines
6.5 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Add or remove items &rsaquo; Collection [% colTitle | html %] &rsaquo; Rotating collections &rsaquo; Tools &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_addItems" class="tools rcoll">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.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>
<li>
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">Collection <em>[% colTitle | html %]</em></a>
</li>
<li>
<a href="#" aria-current="page">
Add or remove items
</a>
</li>
</ol>
</nav>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Add/remove items from collection</h1>
[% 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' %]
<h2>Collection <em>[% colTitle | html %]</em></h2>
[% 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">
<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-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 %]&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' %]