[Groonga-commit] nroonga/norema [master] Make output consistent when no entry found

Zurück zum Archiv-Index

null+****@clear***** null+****@clear*****
2012年 8月 9日 (木) 15:44:56 JST


Yoji SHIDARA	2012-08-09 15:44:56 +0900 (Thu, 09 Aug 2012)

  New Revision: a81d0ac8351d0a223397870539e507353a0d142e
  https://github.com/nroonga/norema/commit/a81d0ac8351d0a223397870539e507353a0d142e

  Log:
    Make output consistent when no entry found

  Modified files:
    views/search.jade

  Modified: views/search.jade (+6 -2)
===================================================================
--- views/search.jade    2012-08-09 15:25:49 +0900 (7086eda)
+++ views/search.jade    2012-08-09 15:44:56 +0900 (224bdb8)
@@ -1,12 +1,16 @@
 extends layout
 
 block content
-  if records
+  if records.length > 0
     .alert.alert-info
-      = "Found " + num_found + " entries. Showing " + from + " - " + to + " (" + num_showing + " entries)."
+      | Found #{num_found} entries.
+      | Showing #{from} - #{to} (#{num_showing} entries).
 
     each record, index in records
       .record
         h2 #{record.data.title}
         p= record.data.path
         !{record.data.desc}
+  else
+    .alert.alert-info
+      | No entry found.
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Zurück zum Archiv-Index