aboutsummaryrefslogtreecommitdiff
path: root/views/search.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 12:40:52 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 12:40:52 +0000
commit1b6d738c7d2115e73f8d54431b2f157a9ce03011 (patch)
tree3137eac2e4df2e2b614f72c665fbc3e0c66a103e /views/search.haml
parent9c54a386f2b1684b210dacc1d9c2a964362019c4 (diff)
Added search views.
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')
+