Bug 31516: Add error message for viewing enrollments for a non-existent club
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Fri, 2 Sep 2022 18:51:25 +0000 (18:51 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Sep 2022 19:19:27 +0000 (16:19 -0300)
To test:
 1) Go to non-existent club's enrollment page, e.g.
    http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
 2) Notice the not fully filled header text and empty table
 3) Apply patch and revisit the page to see the proper error message given

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt

index 4383291..ab26a7b 100644 (file)
@@ -36,7 +36,9 @@
     <div class="row">
         <div class="col-sm-10 col-sm-push-2">
             <main>
-
+                [% IF !club %]
+                <div class="dialog message">The club you requested does not exist.</div>
+                [% ELSE %]
                 <h1>Club enrollments for <em>[% club.name | html %]</em></h1>
 
                 <table id="enrollments-table">
@@ -61,6 +63,7 @@
                         [% END %]
                     </tbody>
                 </table>
+                [% END %]
 
             </main>
         </div> <!-- /.col-sm-10.col-sm-push-2 -->