kpac : no results message
authorBill Erickson <berick@esilibrary.com>
Mon, 9 Apr 2012 17:59:56 +0000 (13:59 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 30 Jul 2012 19:03:22 +0000 (15:03 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/kpac/results.tt2

index 8a8dc0d..b13da77 100644 (file)
@@ -6,23 +6,31 @@
         
 <h2 class="sub_header2">Search Results</h2>
 
-<div class="sub_navigation2">
-    [% INCLUDE 'kpac/parts/paginate.tt2' %]
-</div>
+[% IF ctx.records.size == 0 %]
 
-<div id="search_results_parent">
+    <br/>
+    <div style='width:100%; text-align:center'>
+        <h3>[% l('No records were found that matched your search.') %]</h3>
+    </div>
 
-[%  FOR rec IN ctx.records;
-        attrs = {marc_xml => rec.marc_xml};
-        PROCESS get_marc_attrs args=attrs %]
+[% ELSE %]
 
-    [% INCLUDE 'kpac/parts/record_row.tt2' show_actions=1 rec_id=rec.id%]
+    <div class="sub_navigation2">
+        [% INCLUDE 'kpac/parts/paginate.tt2' %]
+    </div>
 
-[% END %]
-</div>
+    <div id="search_results_parent"> [%
+        FOR rec IN ctx.records;
+            attrs = {marc_xml => rec.marc_xml};
+            PROCESS get_marc_attrs args=attrs;
+            INCLUDE 'kpac/parts/record_row.tt2' show_actions=1 rec_id=rec.id;
+        END;
+    %] </div>
+
+    <div class="sub_navigation3">
+        [% INCLUDE 'kpac/parts/paginate.tt2' showtop=1 %]
+    </div>
 
-<div class="sub_navigation3">
-    [% INCLUDE 'kpac/parts/paginate.tt2' showtop=1 %]
-</div>
+[% END %]
 
 [% END %]