filelist.tpl 2.49 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
      <div{if !$file->isparent} class="icon-drag" id="drag:{$file->id}"{/if}>
20
21
22
23
24
        <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>
    </td>
    <td class="filename">
    {if $file->artefacttype == 'folder'}
25
26
      <!--a href="?folder={$file->id}{$queryparams}" class="changefolder" title="{str tag=gotofolder section=artefact.file arg1=$file->title}">{$file->title|str_shorten:34}</a-->
      <button type="submit" class="changefolder link" name="changefolder[{$file->id}]" title="{str tag=gotofolder section=artefact.file arg1=$file->title}" value="{$file->id}">{$file->title|str_shorten:34}</button>
27
28
29
30
31
32
33
34
    {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>
35
    {if $editable && !$file->isparent}
36
37
      {if !isset($file->can_edit) || $file->can_edit !== 0}<button type="submit" name="edit[{$file->id}]" value="{$file->id}">{str tag=edit}</button>{/if}
      {if $file->childcount == 0}<button type="submit" name="delete[{$file->id}]" value="{$file->id}">{str tag=delete}</button>{/if}
38
    {/if}
39
40
41
    {if $selectable && $file->artefacttype != 'folder'}
      <button type="submit" class="select small" name="select[{$file->id}]" value="{$file->id}">{str tag=select}</button>
    {/if}
42
43
44
45
46
47
48
49
50
    </td>
  </tr>
  {if $edit == $file->id}
    {include file="artefact:file:form/editfile.tpl" fileinfo=$file}
  {/if}
  {/foreach}
 </tbody>
</table>
{/if}