aboutsummaryrefslogtreecommitdiff
path: root/views/search.haml
blob: 27c59ec4314b8fae3b47fb07e152f1292756e4a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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'}
      = partial('search_table')
      - unless @alerts.empty?
        %h2 Actions
        %p= partial('alert_actions')