Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt
Jonathan Druart 5825026448 Bug 21526: uri escape TT variables when used in 'a href'
This patch has been generated with the script provided on bug 21576.
It only affects variable used in the href attribute of a link *when*
href it the first attribute of the node (grep "a href")

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-26 17:09:57 +00:00

76 lines
2.3 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your search IDREF for ppn [% unimarc3 | html %]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %]
<style>
ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a { padding:0.6em 1em; }
#idref h2.role {
background-color: #DDDEEE;
cursor: pointer;
}
#idref table {
margin: 0;
}
</style>
[% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='idref' bodyclass='scrollto' %]
<div class="main">
[% IF error %]
This ppn is not found on the idref service.
[% ELSE %]
[% FOREACH role IN content %]
<div>
<h2 class="role" title="Click to expand this role">[% role.role_name | html %] ([% role.count | html %])</h2>
<div class="docs">
<table>
<thead>
<tr>
<th>Citation</th>
<th>Koha</th>
<th>Sudoc</th>
</tr>
</thead>
<tbody>
[% FOREACH doc IN role.docs %]
<tr>
<td>[% doc.citation | html %]</td>
<td><a href="/cgi-bin/koha/opac-search.pl?q=ident:[% doc.ppn | uri %]" target="_blank">Koha</a></td>
<td><a href="http://www.sudoc.fr/[% doc.ppn | uri %]" target="_blank" rel="noreferrer">Sudoc</a></td>
</tr>
[% END %]
</tbody>
</table>
</div>
</div>
[% END %]
[% END %]
</div>
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function (){
$("table").dataTable($.extend(true, {}, dataTablesDefaults, {
'filter': false,
'columnDefs': [
{ 'targets': [-1, -2], 'sortable': false }
],
}));
$(".role").click(function(){
var docs_node = $(this).parent().find("div.docs");
if ( $(docs_node).is(":visible") ) {
$(".docs").hide();
} else {
$(".docs").hide();
docs_node.show();
}
});
$(".docs").hide();
});
</script>
[% END %]
[% INCLUDE 'opac-bottom.inc' is_popup=1%]