﻿[% META otitle='Index över filer' %]

[%
	dir = page.dir;
%]

<h1>Index $dir.path_slash</h1>

<table class="admin">
<tr><td>
   [% IF dir.url_path_slash == site.home.url_path_slash %]
   <a href=".."><img src="/icons/back.gif" border="0"> Parent Directory</a>
   [% ELSE %]
   <a href="$dir.parent.url_path/admin-index.tt"><img src="/icons/back.gif" border="0"> Parent Directory</a>
   [% END %]
</td></tr>
[% FOREACH item IN dir.files %]
   [% CALL req.may_yield %]
   <tr>
   [% IF item.is_dir %]
   <td>
      <a href="[% item.name | uri | html %]/admin-index.tt"><img src="/icons/folder.gif" border="0" style="float: left"></a>
      <a href="[% item.name | uri | html %]/admin-index.tt">[% item.name | html %]</a><br>
      [% IF item.has_index %]
         [% item.page.title | html %]
      [% END %]
   </td>
   [% ELSE %]
   <td>
      [% doc = item.document %]
      <a href="$home/pf/cms/source.tt?page=$item.url_path"><img src="/icons/text.gif" style="float: left; border: 0"></a>
      <a href="$home/pf/cms/source.tt?page=$item.url_path">[% item.name | html %]</a><br>
     [% doc.title || doc.otitle | html %]
   </td>
   <td>[% doc.pf_source_file +%]
       [% IF doc.pf_source_version; ' v'; doc.pf_source_version; END %]<br>
       [% IF doc.pf_compiled_date %]<span style="float: right">[% date(doc.pf_compiled_date) %]</span>[% END %]
       [% IF doc.pf_compiled_by_name %] by [% doc.pf_compiled_by_name; END %]
   </td>
   [% END %]
   </tr>
[% END %]
</table>
