1 [%- PROCESS "opac/parts/header.tt2";
2 WRAPPER "opac/parts/base.tt2";
3 INCLUDE "opac/parts/topnav.tt2";
4 ctx.page_title = l("Print Record Preview");
5 PROCESS "opac/parts/org_selector.tt2";
7 <h2 class="sr-only">[% l('Print Record Preview') %]</h2>
8 [% INCLUDE "opac/parts/searchbar.tt2" %]
9 <br class="clear-both" />
10 <div id="content-wrapper" class="content-wrapper-record-page">
12 <form id="previewForm" action="[% mkurl('',{},['locg','format','sort','sort_dir','context_org','bre_id','is_list']) %]">
13 <input type="hidden" name="old_event" value="[% ctx.preview_record.id %]"/>
14 <input type="hidden" name="bre_id" value="[% ctx.bre_id %]"/>
15 <input type="hidden" name="locg" value="[% ctx.selected_print_email_loc %]"/>
16 <input type="hidden" name="is_list" value="[% ctx.is_list %]"/>
17 <input type="hidden" name="redirect_to" value="[% ctx.redirect_to | html %]"/>
19 <div class="searchbar">
20 <label for="formats">[% l('Format: ') %]
21 <select class="form-control w-100" id="formats" name="format">
22 [% FOR f IN ctx.formats %]
23 [% IF !ctx.format_obj; ctx.format_obj = f; END %]
24 <option [% IF f.id == ctx.format; ctx.format_obj = f; 'selected="selected"'; END %] value="[% f.id %]">[% f.name | html %]</option>
30 [% IF ctx.is_list == '1' %]
31 <div class="searchbar">
32 <label for="sortby">[% l('Sort by: ') %]
33 <select id="sortby" name="sort">
34 <option [% IF ctx.sort == 'author'; 'selected="selected"'; END %] value="author">[% l('Author') %]</option>
35 <option [% IF ctx.sort == 'title'; 'selected="selected"'; END %] value="title">[% l('Title') %]</option>
36 <option [% IF ctx.sort == 'pubdate'; 'selected="selected"'; END %] value="pubdate">[% l('Publication Date') %]</option>
38 <select id="sort_dir" name="sort_dir">
39 <option [% IF ctx.sort_dir == 'ascending'; 'selected="selected"'; END %] value="ascending">[% l('Ascending') %]</option>
40 <option [% IF ctx.sort_dir == 'descending'; 'selected="selected"'; END %] value="descending">[% l('Descending') %]</option>
46 [% IF ctx.format_obj.holdings == 't' %]
47 <div class="searchbar">
48 <label for="context_org">[% l('Holdings Library: ') %]
49 [% INCLUDE build_org_selector id='context_org' name='context_org' value=ctx.selected_print_email_loc %]</br>
55 <div class="searchbar">
56 <button type="submit" class="btn btn-confirm" >[% l("Update") %]</button>
61 [% IF ctx.preview_record.template_output %]
62 <div class="searchbar">
63 <a class="btn btn-confirm" href="[% mkurl('../print/' _ ctx.preview_record.id, {redirect_to => ctx.redirect_to}) %]">[% l("Print Now") %]</a> |
64 <a class="btn btn-confirm" href="[% ctx.redirect_to | html %]">[% l("Return") %]</a>
67 <div>[% ctx.preview_record.template_output.data %]</div>
69 <div class="alert alert-danger" role="alert">
71 'Error previewing record: [_1]',
72 (ctx.preview_record.textcode ? ctx.preview_record.textcode _ ' / ' _ ctx.preview_record.desc : 0) ||
73 ctx.preview_record.error_output.data ||
74 l('No record data returned from server')
79 <a class="opac-button" href="[% ctx.redirect_to | html %]">[% l("Return") %]</a>
82 <br class="clear-both" />