[Koha-patches] [PATCH] Fix for Bug 6599 - Don't show dictionary definition table if there are no definitions

Owen Leonard oleonard at myacpl.org
Mon Jul 18 18:42:47 CEST 2011


---
 .../prog/en/modules/reports/dictionary.tt          |   94 ++++++++++----------
 1 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
index 23505ad..c4a8da5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
@@ -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 %]
-[% 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>&nbsp;</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 %]
+		[% 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>&nbsp;</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 %]
-</table>
-[% END %]
-
 
 [% IF ( new_dictionary ) %]
 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
-- 
1.7.3



More information about the Koha-patches mailing list