Bug 9650 - Show message if there are no notices
authorOwen Leonard <oleonard@myacpl.org>
Sun, 17 Feb 2013 00:11:52 +0000 (19:11 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 20 Feb 2013 13:25:33 +0000 (08:25 -0500)
When there are no notices for the selected library, the
interface displays a table header with an empty table.

This patch adds a message which appears when there are no
notices for the selected library, or if no library selected
and there are no notices at all.

To test, visit the notices and slips page and
select a library for which there are no notices. A message
should be displayed, "There are no notices for this library."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
tools/letter.pl

index e095bdc..c6150bb 100644 (file)
@@ -166,6 +166,8 @@ $(document).ready(function() {
             </select>
             [% END %]
         [% END %]
+
+[% IF ( letter ) %]
         <table id="lettert">
                <thead><tr>
                        <th>Library</th>
@@ -218,6 +220,15 @@ $(document).ready(function() {
     [% END %]
         </tbody>
                </table>
+[% ELSE %]
+    <div class="dialog message">
+        [% IF ( branchcode ) %]
+           <p>There are no notices for this library.</p>
+        [% ELSE %]
+            <p>There are no notices.</p>
+        [% END %]
+    </div>
+[% END %]
 [% END %]
 
        
index 317ea83..a462aba 100755 (executable)
@@ -115,6 +115,7 @@ $template->param(
     independant_branch => $my_branch,
        script_name => $script_name,
   searchfield => $searchfield,
+    branchcode => $branchcode,
        action => $script_name
 );