filelist.tpl 2.53 KB
Newer Older
1
2
3
{if empty($filelist)}
<p>{str tag=nofilesfound section=artefact.file}</p>
{else}
4
<table id="filelist" class="tablerenderer filelist">
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 <thead>
  <tr>
   <th></th>
   <th>{str tag=Name section=artefact.file}</th>
   <th>{str tag=Description section=artefact.file}</th>
   <th>{str tag=Size section=artefact.file}</th>
   <th>{str tag=Date section=artefact.file}</th>
   <th></th>
  </tr>
 </thead>
 <tbody>
  {foreach from=$filelist item=file}
  <tr id="file:{$file->id}" class="r{cycle values=0,1} directory-item{if $file->isparent} parentfolder{/if}{if $file->artefacttype == 'folder'} folder{/if}{if !empty($highlight) && $highlight == $file->id} highlight-file{/if}{if $edit == $file->id} hidden{/if}">
    <td>
19
      {if $editable}
20
      <div{if !$file->isparent} class="icon-drag" id="drag:{$file->id}"{/if}>
21
22
        <img src="{if $file->artefacttype == 'image'}{$WWWROOT}artefact/file/download.php?file={$file->id}&size=20x20{else}{$THEMEURL}images/{$file->artefacttype}.gif{/if}"{if !$file->isparent} title="{str tag=clickanddragtomovefile section=artefact.file arg1=$file->title}"{/if}>
      </div>
23
24
25
      {else}
        <img src="{if $file->artefacttype == 'image'}{$WWWROOT}artefact/file/download.php?file={$file->id}&size=20x20{else}{$THEMEURL}images/{$file->artefacttype}.gif{/if}">
      {/if}
26
27
28
    </td>
    <td class="filename">
    {if $file->artefacttype == 'folder'}
29
      <a href="{$querybase}folder={$file->id}" class="changefolder" title="{str tag=gotofolder section=artefact.file arg1=$file->title}">{$file->title|str_shorten:34}</a>
30
31
32
33
34
35
36
37
    {else}
      <a href="{$WWWROOT}artefact/file/download.php?file={$file->id}" title="{str tag=downloadfile section=artefact.file arg1=$file->title}">{$file->title|str_shorten:34}</a>
    {/if}
    </td>
    <td>{$file->description}</td>
    <td>{$file->size}</td>
    <td>{$file->mtime}</td>
    <td>
38
    {if $editable && !$file->isparent}
39
40
      {if !isset($file->can_edit) || $file->can_edit !== 0}<button type="submit" name="{$prefix}_edit[{$file->id}]" value="{$file->id}">{str tag=edit}</button>{/if}
      {if $file->childcount == 0}<button type="submit" name="{$prefix}_delete[{$file->id}]" value="{$file->id}">{str tag=delete}</button>{/if}
41
    {/if}
42
    {if $selectable && $file->artefacttype != 'folder'}
43
      <button type="submit" class="select small" name="{$prefix}_select[{$file->id}]" value="{$file->id}">{str tag=select}</button>
44
    {/if}
45
46
47
    </td>
  </tr>
  {if $edit == $file->id}
48
    {include file="artefact:file:form/editfile.tpl" prefix=$prefix fileinfo=$file}
49
50
51
52
53
  {/if}
  {/foreach}
 </tbody>
</table>
{/if}