[% 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/admin-index.tt"><img src="/icons/folder.gif" border="0" style="float: left"></a>
      <a href="$item.name/admin-index.tt">[% item.name %]</a><br>
      [% IF item.has_index %]
         [% item.page.title %]
      [% END %]
   </td>
   [% ELSE %]
   <td>
      [% tmpl = item.template %]
      <a href="$item.name"><img src="/icons/text.gif" style="float: left; border: 0"></a>
      <a href="$item.name">[% item.name %]</a><br>
     [% tmpl.otitle || tmpl.title %]
   </td>
   <td>[% tmpl.pf_source_file +%]
       [% IF tmpl.pf_source_version; 'v'; tmpl.pf_source_version; END %]<br>
       [% IF tmpl.pf_compiled_date %]<span style="float: right">[% date(tmpl.pf_compiled_date) %]</span>[% END %]
       [% IF tmpl.pf_compiled_by_name %] by [% tmpl.pf_compiled_by_name; END %]
   </td>
   [% END %]
   </tr>
[% END %]
</table>
