filelist.tpl 2.94 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
 <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}
17
18
    {if !$publishing || !$file->permissions || $file->can_republish}{assign var=publishable value=1}{else}{assign var=publishable value=0}{/if}
  <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}{if !$publishable && $file->artefacttype != 'folder'} disabled{/if}" {if !$publishable && $file->artefacttype != 'folder'} title="{str tag=notpublishable section=artefact.file}"{/if}>
19
    <td>
20
      {if $editable}
21
      <div{if !$file->isparent} class="icon-drag" id="drag:{$file->id}"{/if}>
22
        <img src="{$file->icon}"{if !$file->isparent} title="{str tag=clickanddragtomovefile section=artefact.file arg1=$file->title}"{/if}>
23
      </div>
24
      {else}
25
        <img src="{$file->icon}">
26
      {/if}
27
28
    </td>
    <td class="filename">
29
    {assign var=displaytitle value=$file->title|str_shorten_text:34|escape}
30
    {if $file->artefacttype == 'folder'}
31
      <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>
32
33
    {elseif !$publishable}
      {$displaytitle}
34
    {else}
35
      <a href="{$WWWROOT}artefact/file/download.php?file={$file->id}" target="_blank" title="{str tag=downloadfile section=artefact.file arg1=$displaytitle}">{$displaytitle}</a>
36
37
    {/if}
    </td>
38
    <td>{$file->description|escape}</td>
39
40
41
    <td>{$file->size}</td>
    <td>{$file->mtime}</td>
    <td>
42
    {if $editable && !$file->isparent}
43
44
      {if !isset($file->can_edit) || $file->can_edit !== 0}<input type="submit" class="submit btn-edit s" name="{$prefix}_edit[{$file->id}]" value="{str tag=edit}" />
      <input type="submit" class="submit btn-del s" name="{$prefix}_delete[{$file->id}]" value="{str tag=delete}" />{/if}
45
      {if $file->artefacttype == 'archive'}<a href="{$WWWROOT}artefact/file/extract.php?file={$file->id}">{str tag=Unzip section=artefact.file}</a>{/if}
46
    {/if}
47
    {if $selectable && $file->artefacttype != 'folder' && $publishable}
48
      <input type="submit" class="select small" name="{$prefix}_select[{$file->id}]" id="{$prefix}_select_{$file->id}" value="{str tag=select}" />
49
    {/if}
50
51
52
    </td>
  </tr>
  {if $edit == $file->id}
53
    {include file="artefact:file:form/editfile.tpl" prefix=$prefix fileinfo=$file groupinfo=$groupinfo}
54
55
56
57
58
  {/if}
  {/foreach}
 </tbody>
</table>
{/if}