.page-header
  %h2
    = Yii::t("app", "Impersonate")

%table.table.table-condensed
  %thead
    %tr
      %th=t('Username')
      %th=t('Link')
      %th=t('Validity')
  %tbody
    -foreach($users as $user)
      %tr
        %td
          -if($user->id == user()->id)
            =$user->getFullName()
          -else
            %a(href="#{url('user/view', array('id'=>$user->id))}")
              =$user->getFullName()
        %td
          -if($user->id == user()->id)
            =$user->getImpersonationUrl(true)
          -else
            %a(href="#{$user->getImpersonationUrl(true)}" target="_blank" onclick="return confirm('DO YOU CONFIRM?');")
              =$user->getImpersonationUrl(true)
        %td
          ="$validFrom => $validTo"
            