Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
Fridolin Somers bc2d9f869a Bug 22422: improve item location display with class "shelvingloc"
In record detail page, item location is displayed with CSS using class "shelvingloc".
Many many places at intranet and OPAC can use this class.
It allows to change display in all places using CSS customisation.

This patch removes the CSS "display:block" for class "shelvingloc".
Some places where using "inline" to correct the display.
I think the display should not be managed in template.
So it will be inline by default and it can be changed by custom CSS, on all places or depending on a selctor.

Test plan :
1) Compile SCSS to CSS
2) Add to preferences IntranetUserCSS and OPACUserCSS : .shelvingloc { color:red }
3) Go to pages impacted by patch, be sure to look at cart with "more details"
4) You see item location italic and red

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 10:40:32 +00:00

105 lines
4.7 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<style>
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
</head>
<body id="tags_list" class="tools">
[% 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/tags/review.pl">Tags</a> &rsaquo; Results for tag <i>[% tag | html %]</i></div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF ( titles ) %]
<h3>Titles tagged with the term <i>[% tag | html %]</i></h3>
<table id="itemst">
<thead><tr>
<th>Title</th>
<th>Location</th>
<th>&nbsp;</th>
</tr></thead>
[% FOREACH title IN titles %]
<tr>
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title | html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield | html %][% END %]</a>
[% title.author | html %]
<p>[% IF ( title.publishercode ) %]- [% title.publishercode | html %]
[% IF ( title.place ) %] [% title.place | html %][% END %][% END %]
[% IF ( title.pages ) %] - [% title.pages | html %][% IF ( title.size ) %] [% title.size | html %]
[% END %]
[% END %]</p>
[% IF ( title.notes ) %]
<p>[% title.notes | html %]</p>[% END %]
[% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
<a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a> <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
[% END %]</p>
[% END %]
</td>
<td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
<li>
[% item.branchname | html %]
<span class="shelvingloc">[% item.location_description | html %]</span>
[% IF ( item.itemcallnumber ) %]
([% item.itemcallnumber | html %])
[% END %]
</li>
[% END %]</ul>[% ELSE %]This record has no items.[% END %]
</td>
<td><form method="post" action="/cgi-bin/koha/tags/list.pl"><input type="hidden" name="op" value="del" /><input type="hidden" name="tag" value="[% tag | html %]" /><input type="hidden" name="tag_id" value="[% title.tag_id | html %]" /><button type="submit" class="delete btn btn-default btn-sm"><i class="fa fa-trash"></i> Remove tag</button></form></td>
</tr>
[% END %]
</table>
[% ELSE %]
<div class="dialog message">There are no titles tagged with the term <i>[% tag | html %]</i></div>
[% END %]
</form>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
<ul>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a></li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a></li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a></li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a></li>
</ul>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function() {
$(".delete").click(function (event) {
$(this).parent().parent().parent().addClass("selected");
var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
if (!answer){
$("tr").removeClass("selected");
event.preventDefault();
}
});
$("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
],
"aaSorting": [[ 0, "asc" ]],
"sPaginationType": "four_button"
}));
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]