Česky
Kamil Dudka

Web components

File detail

Name:DownloadFileBrowser.tpl [Download]
Location: src > templates
Size:3.0 KB
Last modification:2008-03-08 10:29

Source code

{capture name='navigation'}
  {foreach from=$locationBar item=link name=navLoop}
    {if !$smarty.foreach.navLoop.first} > {/if}{if $fileDetail || !$smarty.foreach.navLoop.last}<a href="{$link.href}">{$link.text}</a>{else}{$link.text}{/if}
  {/foreach}
{/capture}
<div id="content">
  <h1>{$pageTitle}</h1>
  <div class="backLink"><a href="{$webRoot}/{$page}" title="{$TR.BackToMainPage}"><img src="{$imgDir}/back.png" alt="{$TR.Back}"/> {$TR.BackToMainPage}</a></div>
{if $fileDetail}
  <h2>{$TR.FileDetail}</h2>
  <div class="backLink"><a href="{$fileDetail.dirLink}" title="{$TR.BackToDirectory}"><img src="{$imgDir}/back.png" alt="{$TR.Back}"/> {$TR.BackToDirectory}</a></div>
  <table class="FileDetail">
    <tr><td class="head">{$TR.Name}:</td><td><a href="?action=download" title="{$TR.Download} {$fileDetail.name}"><span class="name"><img src="{$imgDir}/download.png" alt="{$TR.Download}"/>{$fileDetail.name}</span> [{$TR.Download}]</a></td></tr>
{if $detectedCharset}
    <tr><td class="head">{$TR.DetectedCharset}:</td><td><b>{$detectedCharset}</b> - <a href="?action=downloadUTF8">[{$TR.DownloadAsUTF8}]</a></td></tr>
{/if}
    <tr><td class="head">{$TR.Location}:</td><td>{$smarty.capture.navigation}</td></tr>
    <tr><td class="head">{$TR.Size}:</td><td>{$fileDetail.size}</td></tr>
    <tr><td class="head">{$TR.Mtime}:</td><td>{$fileDetail.date} {$fileDetail.time}</td></tr>
{if $fileDetail.mime}
    <tr><td class="head">MIME:</td><td>{$fileDetail.mime}</td></tr>
{/if}
  </table>
{if $fileSourceCode}
  <h2>{$TR.SourceCode}</h2>
  <div class="SourceCode">{$fileSourceCode}
</div>
{elseif $fileTextContent}
  <h2>{$TR.FileContent}</h2>
  <pre class="FileContent">{$fileTextContent|escape:'html'}
</pre>
{elseif $isImage}
  <h2>{$TR.Preview}</h2>
  <a class="imgPreview" href="javascript:void window.open('?action=fullImage');"><img src="?action=thumbnail640" alt="{$TR.Preview}"/></a>
{/if}
{else}
  <h2>{$TR.FileBrowser}</h2>
  <div id="fbImgPreview"></div>
  <div class="FileBrowser">
    <div class="FileBrowserPath">
      <span class="Download"><a href="?action=download" title="{$TR.Download}"><img src="{$imgDir}/download_dir.png" alt="{$TR.Download}"/></a></span>
      {$TR.Location}: <b>{$smarty.capture.navigation}</b>
    </div>
    <table>
      <thead>
        <tr class="{cycle values=$rowClasses}">
          <td></td>
          <td><a href="{$sort.name.href}" title="{$sort.name.text}">{$TR.Name}{if $sort.name.img}<img src="{$imgDir}/{$sort.name.img}" alt="{$sort.name.alt}" />{/if}</a></td>
          <td><a href="{$sort.size.href}" title="{$sort.size.text}">{$TR.Size}{if $sort.size.img}<img src="{$imgDir}/{$sort.size.img}" alt="{$sort.size.alt}" />{/if}</a></td>
          <td colspan="2"><a href="{$sort.mtime.href}" title="{$sort.mtime.text}">{$TR.Mtime}{if $sort.mtime.img}<img src="{$imgDir}/{$sort.mtime.img}" alt="{$sort.mtime.alt}" />{/if}</a></td>
          <td><!-- Actions --></td>
        </tr>
      </thead>
      <tbody id="fbWorkspace">
{include file='FileBrowserData.tpl'}
      </tbody>
    </table>
  </div>
{/if}
</div>