filelist.tpl 2.72 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
    </td>
    <td class="filename">
28
    {assign var=displaytitle value=$file->title|str_shorten_text:34|escape}
29
    {if $file->artefacttype == 'folder'}
30
      <a href="{$querybase}folder={$file->id}{if $owner}&owner={$owner}{if $ownerid}&ownerid={$ownerid}{/if}{/if}" class="changefolder" title="{str tag=gotofolder section=artefact.file arg1=$displaytitle}">{$displaytitle}</a>
31
    {else}
32
      <a href="{$WWWROOT}artefact/file/download.php?file={$file->id}" target="_blank" title="{str tag=downloadfile section=artefact.file arg1=$displaytitle}">{$displaytitle}</a>
33
34
    {/if}
    </td>
35
    <td>{$file->description|escape}</td>
36
37
38
    <td>{$file->size}</td>
    <td>{$file->mtime}</td>
    <td>
39
    {if $editable && !$file->isparent}
40
41
      {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}
42
    {/if}
43
    {if $selectable && $file->artefacttype != 'folder'}
44
      <button type="submit" class="select small" name="{$prefix}_select[{$file->id}]" id="{$prefix}_select_{$file->id}" value="{$file->id}">{str tag=select}</button>
45
    {/if}
46
47
48
    </td>
  </tr>
  {if $edit == $file->id}
49
    {include file="artefact:file:form/editfile.tpl" prefix=$prefix fileinfo=$file groupinfo=$groupinfo}
50
51
52
53
54
  {/if}
  {/foreach}
 </tbody>
</table>
{/if}