-$users = User::getUsernameArray()

%h2='run test notif'

%a.icon-table(href="#{url('notificationSetting')}")=' view all notification settings'
%br
%a.icon-table(href="#{url('notification')}")=' view all notification'

%table.table.table-condensed
  %thead
    %tr
      %th='id'
      %th='description'
      %th='enabled'
      %th='target_id'
      %th='target_type'
      %th='object_table'
      %th='endpoint_type'
      %th='sound'
      %th='popup'
      %th='level'
      %th='filter'
      %th='filter_type'
      %th
  %tbody
  -foreach($notifications as $n)
    %tr
      %td=$n->id
      %td=$n->description
      %td=$n->enabled
      %td=$n->target_id." (".$users[$n->target_id].")"
      %td=$n->target_type
      %td=$n->object_table
      %td=$n->endpoint_type
      %td=$n->sound
      %td=$n->popup
      %td=$n->level
      %td=$n->filter
      %td=$n->filter_type
      %td
        %a.icon-eye-open(href="#{url('notificationSetting/view', array('id'=>$n->id))}")
        %a.icon-bolt(href="#{url('debug/test_createNotification', array('run'=>$n->id))}")
        