-$apacheCanRestart = DebugHelper::apache_canRestart()

.page-header
  %h2
    %li.icon-code
    = Yii::t("app", "Extensions")

%table.table.table-condensed
  %thead
    %tr
      %th=t('Name')
      %th=t('File')
      %th=t('Loaded')
      %th=t('Persistent')
      %th=t('Temporary')
      %th=t('Version')
      %th
      %th
  %tbody
    -foreach($extensions as $ext)
      %tr
        %td
          =$ext->name
        %td
          -if(fileExists($ext->file))
            =$ext->filename
            %a(href="#{url('debug/fileExplorer',array('path'=>dirname($ext->file)))}" title="#{dirname($ext->file)}")
              .icon-folder-open-alt
          -else
            =$ext->file
        %td
          -if($ext->loaded)
            .color-green=t('Loaded')
          -else
            .color-red=t('Not loaded')
        %td
          -if($ext->loaded)
            -if($ext->info->isPersistent)
              .color-green=t('Yes')
            -else
              .color-red=t('No')
          -else
            %i=t('N/A')
        %td
          -if($ext->loaded)
            -if($ext->info->isTemporary)
              .color-green=t('Yes')
            -else
              .color-red=t('No')
          -else
            %i=t('N/A')
        %td
          -if($ext->loaded)
            -$v = $ext->info->getVersion()
            %span(title="#{$v}")=truncate($v,20,"[...]")
          -else
            %i=t('N/A')
        %td
          -if(!$ext->loaded && fileExists($ext->file) && $apacheCanRestart)
            %a(href="#{url('debug/phpExtensionLoad',array('name'=>$ext->filename))}" title="#{t('Load')}")
              .icon-expand-alt
          -if($ext->loaded && fileExists($ext->file) && $apacheCanRestart)
            %a(href="#{url('debug/phpExtensionUnload',array('name'=>$ext->filename))}" title="#{t('Unload')}")
              .icon-collapse-alt
        %td
          -if($ext->loaded)
            %a(href="#{url('debug/phpExtensionFunctions',array('name'=>$ext->name))}" title="#{t('Functions')}")
              .icon-code
          