baseline
[omp.pkp.sfu.ca.git] / templates / manager / files / index.tpl
bloba722fb28e7886bb368b20cd1ace9c63761695fb5
1 {**
2  * index.tpl
3  *
4  * Copyright (c) 2003-2008 John Willinsky
5  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6  *
7  * Files browser.
8  *
9  * $Id: index.tpl,v 1.1.1.1 2008/10/20 21:27:09 tylerl Exp $
10  *}
11 {strip}
12 {assign var="pageTitle" value="manager.filesBrowser"}
13 {include file="common/header.tpl"}
14 {/strip}
16 {assign var=displayDir value="/$currentDir"}
17 <h3>{translate key="manager.files.indexOfDir" dir=$displayDir|escape}</h3>
19 {if $currentDir}
20 <p><a href="{url op="files" path=$parentDir|explode:"/"}" class="action">&lt; {translate key="manager.files.parentDir"}</a></p>
21 {/if}
23 <table width="100%" class="listing">
24         <tr>
25                 <td class="headseparator" colspan="6">&nbsp;</td>
26         </tr>
27         <tr class="heading" valign="bottom">
28                 <td></td>
29                 <td width="25%">{translate key="common.fileName"}</td>
30                 <td width="25%">{translate key="common.type"}</td>
31                 <td width="25%">{translate key="common.dateModified"}</td>
32                 <td width="5%">{translate key="common.size"}</td>
33                 <td width="20%" align="right">{translate key="common.action"}</td>
34         </tr>
35         <tr>
36                 <td class="headseparator" colspan="6">&nbsp;</td>
37         </tr>
38         {foreach from=$files item=file name=files}
39         {if $currentDir}
40                 {assign var=filePath value="$currentDir/`$file.name`"}
41         {else}
42                 {assign var=filePath value=$file.name}
43         {/if}
44         {assign var=filePath value=$filePath|escape}
45         <tr valign="top">
46                 <td>{if $file.isDir}{icon name="folder"}{else}{icon name="letter"}{/if}</td>
47                 <td><a href="{url op="files" path=$filePath|explode:"/"}">{$file.name}</a></td>
48                 <td>{$file.mimetype|escape|default:"&mdash;"}</td>
49                 <td>{$file.mtime|escape|date_format:$datetimeFormatShort}</td>
50                 <td>{$file.size|escape|default:"&mdash;"}</td>
51                 <td align="right" class="nowrap">
52                         {if !$file.isDir}
53                                 <a href="{url op="files" path=$filePath|explode:"/" download=1}" class="action">{translate key="common.download"}</a>&nbsp;|
54                         {/if}
55                         <a href="{url op="fileDelete" path=$filePath|explode:"/"}" onclick="return confirm('{translate|escape:"jsparam" key="manager.files.confirmDelete"}')" class="action">{translate key="common.delete"}</a>
56                 </td>
57         </tr>
58         <tr>
59                 <td colspan="6" class="{if $smarty.foreach.files.last}end{/if}separator">&nbsp;</td>
60         </tr>
61 {foreachelse}
62         <tr>
63                 <td colspan="6" class="nodata">{translate key="manager.files.emptyDir"}</td>
64         </tr>
65         <tr>
66                 <td colspan="6" class="endseparator">&nbsp;</td>
67         </tr>
68 {/foreach}
69 </table>
71 <form method="post" action="{url op="fileUpload" path=$currentDir|explode:"/"}" enctype="multipart/form-data">
72         <input type="file" size="20" name="file" class="uploadField" />
73         <input type="submit" value="{translate key="manager.files.uploadFile"}" class="button" />
74 </form>
76 <form method="post" action="{url op="fileMakeDir" path=$currentDir|explode:"/"}" enctype="multipart/form-data">
77         <input type="text" size="20" maxlength="255" name="dirName" class="textField" />
78         <input type="submit" value="{translate key="manager.files.createDir"}" class="button" />
79 </form>
81 <p>{translate key="manager.files.note"}</p>
83 {include file="common/footer.tpl"}