Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt
Jonathan Druart fc640d2a86 Bug 15111: Do not include the antiClickjack legacy browser trick for greybox
Most of the scripts called via greybox (which uses iframe) don't include
doc-head-close. But some do.
This patch adds a popup parameter for these templates, not to include
the legacy browser trick and avoid the replacement of the location.

Test plan:
1/ Export patroncard and label
2/ translate itemtypes
3/ click on a idref link at the OPAC

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-03-14 16:30:09 +00:00

105 lines
7.6 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label printing/exporting</title>
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
<script type="text/javascript">
//<![CDATA[
function Done() {
window.location = "[% referer %]";
};
//]]>
</script>
<style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
<style type="text/css">table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
</head>
<body id="labels_label-print" class="tools labels">
<div id="custom-doc" class="yui-t2">
<div id="bd">
[% IF ( batches ) %]
<form>
<h3>Click on the following links to download the exported batch(es).</h3>
[% FOREACH batche IN batches %]
<fieldset>
[% IF ( batche.label_ids ) %]
<legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count %] single label[% ELSE %][% batche.label_count %] single labels[% END %]</legend>
<p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script %]?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %][% batche.label_ids %]">Download as PDF</a></p>
<p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.label_ids %]">Download as CSV</a></p>
<p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.label_ids %]">Download as XML</a></p>
[% ELSIF ( batche.item_numbers ) %]
<legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count %] single label[% ELSE %][% batche.label_count %] single labels[% END %]</legend>
<p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script %]?template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %][% batche.item_numbers %]">Download as PDF</a></p>
<p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.item_numbers %]">Download as CSV</a></p>
<p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.item_numbers %]">Download as XML</a></p>
[% ELSE %]
<legend>Label Batch Number [% batche.batch_id %]</legend>
<p><a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %]">Download as PDF</a>
</p>
<p>
<a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]">Download as CSV</a>
</p>
<p>
<a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]">Download as XML</a></p>
[% END %]
</fieldset>
[% END %]
<fieldset class="action">
<input type="button" id="done" onclick="parent.parent.GB_hide();" class="submit" value="Done" />
</fieldset>
</form>
[% ELSE %]
<h3>
[% IF ( label_ids ) %]
[% IF ( label_count == 1 ) %]Exporting [% label_count %] label[% ELSE %]Exporting [% label_count %] labels[% END %]
[% ELSIF ( item_numbers ) %]
[% IF ( item_count == 1 ) %]Exporting [% item_count %] label[% ELSE %]Exporting [% item_count %] labels[% END %]
[% ELSE %]
[% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
[% END %]
</h3>
<form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
<input type="hidden" name="op" value="export" />
<input type="hidden" name="referer" value="[% referer %]" />
[% FOREACH batch_id IN batch_ids %]
<input type="hidden" name="batch_id" value="[% batch_id.batch_id %]" />
[% END %]
[% FOREACH label_id IN label_ids %]
<input type="hidden" name="label_id" value="[% label_id.label_id %]" />
[% END %]
[% FOREACH item_number IN item_numbers %]
<input type="hidden" name="item_number" value="[% item_number.item_number %]" />
[% END %]
<fieldset class="rows">
<ol>
<li>
<label for="template_id" style="width:20em">Select a template to be applied: </label>
<select name="template_id" id="template_id">
[% FOREACH template IN templates %]
<option value="[% template.template_id %]">[% template.template_code %]</option>
[% END %]
</select>
</li>
<li>
<label for="layout_id" style="width:20em">Select a layout to be applied: </label>
<select name="layout_id" id="layout_id">
[% FOREACH layout IN layouts %]
<option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
[% END %]
</select>
</li>
<li>
<label for="start_label" style="width:20em">Enter starting label position (for PDF): </label>
<input type="text" size="5" id="start_label" name="start_label" class="focus" title="Starting label number" value="1"/>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" class="submit" value="Export" />
<a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();return false;">Cancel</a>
</fieldset>
</form>
[% END %]
</div>
[% INCLUDE 'popup-bottom.inc' %]