aboutsummaryrefslogtreecommitdiff
path: root/views/search.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/search.haml')
-rw-r--r--views/search.haml21
1 files changed, 21 insertions, 0 deletions
diff --git a/views/search.haml b/views/search.haml
new file mode 100644
index 0000000..dec227a
--- /dev/null
+++ b/views/search.haml
@@ -0,0 +1,21 @@
+%h2 Search
+%form{:method => "GET", :action => '/search'}
+ %p
+ %label{:for => "q"}
+ Search for
+ %input{:type => "text", :name => "q", :value => "#{@q}"}
+ %input{:type => "submit", :name => "submit", :value => "Search"}
+- unless @q.nil?
+ - if @q.length < @min_length and @alerts.empty?
+ %div{:class => ["error"]}
+ %p
+ Search terms must be at least
+ =@min_length
+ characters long.
+ - else
+ %form#alerts{:method => :post, :action => '/alerts/acknowledge'}
+ = partial('search_table')
+ - unless @alerts.empty?
+ %h2 Actions
+ %p= partial('acknowledge_input')
+