aboutsummaryrefslogtreecommitdiff
path: root/views/_navbar.haml
blob: 283572f57f599e38ea9635a435fd7125e090120c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#navbar
  %ul
    %li#nav_index
      %a{:href => "/"} Mauve
    - if @person
      %li{:class => [ @alert_type == "raised" && "nav_selected"]}
        %a{:href => '/alerts/raised/'+@group_by} 
          Raised (
          %span#count_raised><= @alerts_raised.length
          )
      %li{:class => [ @alert_type == "acknowledged" && "nav_selected"]}
        %a{:href => '/alerts/acknowledged/'+@group_by} 
          Ack'd (
          %span#count_ackd><= @alerts_ackd.length
          )
      %li{:class => [ @alert_type == "cleared" && "nav_selected"]}
        %a{:href => '/alerts/cleared/'+@group_by} 
          Cleared (
          %span#count_cleared><= @alerts_cleared.length
          )
      %li
        %a{:href => '/logout'} Log out
  %br
- %w(notice error).each do |klass|
  - unless flash[klass].to_s.empty?
    %div{:class => ["flash", klass]}
      :textile
        #{flash[klass]}
    :javascript
      $(document).ready(function () { $('div.flash').delay(1000).fadeOut(2000);});
  - else
    %div{:class => ["flash", klass], :style => "display: none"}