Owen Leonard
4c14c4998d
This patch makes changes to the form for adding and editing notices, and to the template for viewing a rendered preview of notices. - Preview now shows side-by-side comparisons - JavaScript has been movied out of template into separate file - Validation of the add/edit form improved through use of validation plugin To test, apply the patch on top of those for Bug 17981 - Add a new notice. - Confirm that the form can't be submitted without data in the "code" and "name" fields. - Confirm that the form can't be submitted without filling in at least one message template (subject and body). - Confirm that you cannot submit the form while using an existing notice code. - Follow Bug 17981's test plan for testing the preview function. Confirm that the preview loads correctly and looks correct. - Test both with old syntax messages which require conversion and messages in template-toolkit syntax. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Fixed conflicts caused by bug 20538. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
77 lines
3.4 KiB
Text
77 lines
3.4 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Preview notice template</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
</head>
|
|
<body id="preview_letter" class="catalog">
|
|
<div id="main">
|
|
[% FOR m IN messages %]
|
|
[%# FIXME The message block does not appear at the top of the modal! %]
|
|
<div class="dialog [% m.type %]">
|
|
[% SWITCH m.code %]
|
|
[% CASE 'no_data_for_preview' %]You did not specify data for preview.
|
|
[% CASE 'preview_not_available' %]Preview is not available for letters '[% m.letter_code %]'.
|
|
[% CASE 'not_checked_in_yet' %]Do not forget that the issue has not been checked in yet.
|
|
[% CASE 'not_checked_out_yet' %]Do not forget that the issue has not been checked out yet.
|
|
[% CASE 'no_checkout' %]This item is not checked out.
|
|
[% CASE 'no_item_or_no_patron' %]The item or the patron does not exist.
|
|
[% CASE 'no_hold' %]No hold is placed by this patron on this bibliographic record.
|
|
[% CASE %][% m.code %]
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF rendered_tt_message %]
|
|
[% IF messages_are_similar %]
|
|
<div class="dialog message">The generated notices are exactly the same!</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">The generated notices are different!</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF rendered_message %]
|
|
<div class="yui-g">
|
|
<div class="yui-u first">
|
|
<h3>Original version</h3>
|
|
<span style="font-family:monospace">
|
|
[% FILTER html_line_break %]
|
|
[% original_content | html %]
|
|
[% END %]
|
|
</span>
|
|
</div>
|
|
<div class="yui-u">
|
|
<h3>Original message, rendered:</h3>
|
|
<span style="font-family:monospace">
|
|
[% FILTER html_line_break %]
|
|
[% rendered_message.content | html %]
|
|
[% END %]
|
|
</span>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
|
|
[% IF rendered_tt_message %]
|
|
<hr />
|
|
<div class="yui-g">
|
|
<div class="yui-u first">
|
|
<h3>Converted version</h3>
|
|
<span style="font-family:monospace">
|
|
[% FILTER html_line_break %]
|
|
[% tt_content | html %]
|
|
[% END %]
|
|
</span>
|
|
</div>
|
|
<div class="yui-u">
|
|
<h3>Converted message, rendered:</h3>
|
|
<span style="font-family:monospace">
|
|
[% FILTER html_line_break %]
|
|
[% rendered_tt_message.content | html %]
|
|
[% END %]
|
|
</span>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|