Fix for Bug 6599 - Don't show dictionary definition table if there are no definitions
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit bd6404608a)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
633908d27e
commit
9bb97e76a8
|
|
@ -19,55 +19,55 @@
|
|||
[% END %]
|
||||
<h1>Dictionary</h1>
|
||||
[% IF ( start_dictionary ) %]
|
||||
<p>Use the dictionary to define custom criteria for reporting.</p>
|
||||
<p>Use the dictionary to define custom criteria for reporting.</p>
|
||||
|
||||
|
||||
<h2>Current Terms</h2>
|
||||
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
|
||||
<input type="hidden" name="phase" value="View Dictionary" />
|
||||
Filter by area <select name="areas">
|
||||
<option value="">All</option>
|
||||
[% FOREACH area IN areas %]
|
||||
[% IF ( area.selected ) %]
|
||||
<option value="[% area.id %]" selected="selected" >[% area.name %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% area.id %]">[% area.name %]</option>
|
||||
[% END %]
|
||||
[% IF ( definitions ) %]
|
||||
<h2>Current Terms</h2>
|
||||
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
|
||||
<input type="hidden" name="phase" value="View Dictionary" />
|
||||
[% IF ( areas ) %]
|
||||
Filter by area <select name="areas">
|
||||
<option value="">All</option>
|
||||
[% FOREACH area IN areas %]
|
||||
[% IF ( area.selected ) %]
|
||||
<option value="[% area.id %]" selected="selected" >[% area.name %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% area.id %]">[% area.name %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
<input name="submit" value="Go" type="submit" />
|
||||
</form>
|
||||
<br />
|
||||
[% END %]
|
||||
<table border="1" cellspacing="0" cellpadding="5">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Area</th>
|
||||
<th>Definition</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
[% FOREACH definition IN definitions %]
|
||||
[% UNLESS ( loop.odd ) %]
|
||||
<tr class="highlight" valign="top">
|
||||
[% ELSE %]
|
||||
<tr valign="top">
|
||||
[% END %]
|
||||
<td>[% definition.name %]</td>
|
||||
<td>[% definition.description %]</td>
|
||||
<td>[% definition.areaname %]</td>
|
||||
<td>[% definition.saved_sql %]</td>
|
||||
<td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl">
|
||||
<input type="hidden" name="id" value="[% definition.id %]" />
|
||||
<input type="hidden" name="phase" value="Delete Definition" />
|
||||
<input type="submit" name="submit" value="Delete Definition" />
|
||||
</form></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</table>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
<input name="submit" value="Go" type="submit" />
|
||||
</form>
|
||||
<br />
|
||||
<table border="1" cellspacing="0" cellpadding="5">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Area</th>
|
||||
<th>Definition</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
[% IF ( definitions ) %]
|
||||
[% FOREACH definition IN definitions %]
|
||||
[% UNLESS ( loop.odd ) %]
|
||||
<tr class="highlight" valign="top">
|
||||
[% ELSE %]
|
||||
<tr valign="top">
|
||||
[% END %]
|
||||
<td>[% definition.name %]</td>
|
||||
<td>[% definition.description %]</td>
|
||||
<td>[% definition.areaname %]</td>
|
||||
<td>[% definition.saved_sql %]</td>
|
||||
<td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl">
|
||||
<input type="hidden" name="id" value="[% definition.id %]" />
|
||||
<input type="hidden" name="phase" value="Delete Definition" />
|
||||
<input type="submit" name="submit" value="Delete Definition" />
|
||||
</form></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</table>
|
||||
[% END %]
|
||||
|
||||
|
||||
[% IF ( new_dictionary ) %]
|
||||
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
|
||||
|
|
|
|||
Loading…
Reference in New Issue