.page-header
  %h2
    %li.icon-font
    = Yii::t("app", "Create Flash Message")

%table.table.table-condensed
  %thead
    %tr
      %th=t('Date/Time')
      %th=t('Type')
      %th=t('Level')
      %th=t('Target')
      %th=t('Permanent')
      %th=t('Message')
      %th=t('Actions')
  %tbody
    -foreach($messages as $f)
      %tr
        %td=$f->timestamp
        %td=$f->type
        %td=$f->level
        %td=$f->getTarget()
        %td=$f->permanent
        %td=$f->content
        %td
          %a(href="#{url('debug/flashMessages', array('action'=>'delete', 'flash'=>$f->id))}")
            .icon-trash
%hr

%form(method="POST")
  %b=t('Level:')
  %input(name="flash_level" type="radio" value="success" checked="checked")
  ='success'
  %input(name="flash_level" type="radio" value="notice")
  ='notice'
  %input(name="flash_level" type="radio" value="error")
  ='error'
  %br
  %b=t('Type:')
  %input(name="flash_type" type="radio" value="session" checked="checked")
  ='session'
  %input(name="flash_type" type="radio" value="file")
  ='file'
  %br
  %b=t('Target (only for TYPE=file):')
  %input(name="flash_target" type="radio" value="user" checked="checked")
  ='user'
  %input(name="flash_target" type="radio" value="ip")
  ='remote_host'
  %input(name="flash_target" type="radio" value="global")
  ='global'
  %br
  %b=t('Custom target (only for TYPE=file):')
  %input(name="flash_custom_target" type="text" value="")  
  %br
  %b=t('Permanent (only for TYPE=file):')
  %input(name="flash_permanent" type="radio" value="0" checked="checked")
  ='false'
  %input(name="flash_permanent" type="radio" value="1")
  ='true'
  %br
  %b=t('Message:')
  %input(name="flash_message" type="text" value="#{DateTimeEx::nows()}")
  %br
  %input(type="submit" name="action" value="create")  