filebrowser.tpl 5.3 KB
Newer Older
1
{if $config.select}
2
{include file="artefact:file:form/selectedlist.tpl" selectedlist=$selectedlist prefix=$prefix highlight=$highlight}
3
4
{/if}

5
<script type="text/javascript">
6
{$initjs|safe}
7
8
9
</script>

<input type="hidden" name="folder" id="{$prefix}_folder" value="{$folder}" />
10
11
<input type="hidden" name="{$prefix}_changefolder" id="{$prefix}_changefolder" value="" />
<input type="hidden" name="{$prefix}_foldername" id="{$prefix}_foldername" value="{$foldername}" />
12

13
{if $config.select && !$browse}
14
15
16
<div id="{$prefix}_open_upload_browse_container">
<input type="submit" class="buttondk" id="{$prefix}_open_upload_browse" name="browse" value="{if $config.selectone}{str tag=selectafile section=artefact.file}{else}{str tag=addafile section=artefact.file}{/if}" />{if $config.browsehelp}{contextualhelp plugintype=$config.plugintype pluginname=$config.pluginname section=$config.browsehelp}{/if}
</div>
17
18
{/if}

19
<div id="{$prefix}_upload_browse" class="upload_browse{if $config.select} select{if !$browse} hidden{/if}{/if}">
20

21
{if $config.select && !$config.alwaysopen}
22
<input type="submit" class="buttondk" name="{$prefix}_cancelbrowse" id="{$prefix}_close_upload_browse" value="{str tag=Close}" />
23
24
{/if}

25
26
27
28
29
30
31
32
33
34
35
36
37
38
{if $tabs}
<input type="hidden" name="owner" id="{$prefix}_owner" value="{$tabs.owner}" />
<input type="hidden" name="ownerid" id="{$prefix}_ownerid" value="{$tabs.ownerid}" />
<input type="hidden" name="{$prefix}_changeowner" id="{$prefix}_changeowner" value="" />
<div id="{$prefix}_ownertabs">
{include file="artefact:file:form/ownertabs.tpl" tabs=$tabs prefix=$prefix querybase=$querybase}
</div>
<div id="artefactchooser-body">
  <div id="{$prefix}_ownersubtabs">
  {if $tabs.subtabs}{include file="artefact:file:form/ownersubtabs.tpl" tabs=$tabs prefix=$prefix querybase=$querybase}{/if}
  </div>
{/if}

<table id="{$prefix}_upload_container" class="fileupload{if $tabs && !$tabs.upload} hidden{/if}">
39
40
 <tbody>
{if $config.upload}
41
42
43
  {* config.uploadagreement: disable the file chooser unless the agreement is checked *}
  {* config.simpleupload: the form only contains a file chooser *}
  {* config.submitbutton: add submit button even if js is enabled & don't start uploading as soon as a file is chosen *}
44
  <input type="hidden" name="{$prefix}_uploadnumber" id="{$prefix}_uploadnumber" value="1" />
45
  <input type="hidden" name="MAX_FILE_SIZE" value="{$phpmaxfilesize}" />
46
47
48
49
  <tr><td colspan=2 id="{$prefix}_upload_messages"></td></tr>
  {if $config.uploadagreement}
  <tr id="{$prefix}_agreement" class="uploadform">
    <th><label>{str tag='uploadfile' section='artefact.file'}</label></th>
50
    <td>
51
      <input type="checkbox" name="{$prefix}_notice" id="{$prefix}_notice" />
52
      {$agreementtext|clean_html|safe}
53
54
    </td>
  </tr>
55
  {/if}
56
  <tr class="uploadform">
57
    <th><label>{if $config.simpleupload}{str tag='uploadfile' section='artefact.file'}{else}{str tag='File' section='artefact.file'}{/if}</label></th>
58
    <td>
59
60
      <span id="{$prefix}_userfile_container"><input type="file" class="file" id="{$prefix}_userfile" name="userfile" size="40" /></span>
      <span id="{$prefix}_userfile_maxuploadsize">({str tag=maxuploadsize section=artefact.file} {$maxuploadsize})</span>
61
      {if $config.uploadagreement}<script>setNodeAttribute('{$prefix}_userfile', 'disabled', true);</script>{/if}
62
63
    </td>
  </tr>
64
65
  <tr class="uploadform">
    <th></th>
66
    <td id="{$prefix}_uploadsubmit_container">{* filebrowser.js may add a submit button in here even if config.submitbutton is off *}
67
68
69
      {if $config.submitbutton}
      <input type="submit" class="submit nojs-hidden-block" name="{$prefix}_uploadsubmit" id="{$prefix}_uploadsubmit" value="{str tag=upload section=artefact.file}" />
      {/if}
70
      <noscript><input type="submit" class="submit" name="{$prefix}_upload" id="{$prefix}_upload" value="{str tag=upload section=artefact.file}" /></noscript>
71
72
73
74
75
76
77
78
    </td>
  </tr>
{/if}

{if $config.createfolder}
  <tr>
    <th><label>{str tag='createfolder' section='artefact.file'}</label></th>
    <td>
79
80
      <input type="text" class="text" name="{$prefix}_createfolder_name" id="{$prefix}_createfolder_name" size="40" />
      <input type="submit" class="submit" name="{$prefix}_createfolder" id="{$prefix}_createfolder" value="{str tag=createfolder section=artefact.file}" />
81
82
83
    </td>
  </tr>
  <tr>
84
    <td colspan="2" id="{$prefix}_createfolder_messages"></td>
85
86
87
88
89
90
  </tr>
{/if}
 </tbody>
</table>

{if $config.edit}
91
92
<input type="hidden" name="{$prefix}_move" id="{$prefix}_move" value="" />
<input type="hidden" name="{$prefix}_moveto" id="{$prefix}_moveto" value="" />
93
94
95
{/if}

<div id="{$prefix}_foldernav" class="foldernav">
96
{include file="artefact:file:form/folderpath.tpl" path=$path querybase=$querybase owner=$tabs.owner ownerid=$tabs.ownerid}
97
98
99
</div>

<div id="{$prefix}_filelist_container">
100
{include file="artefact:file:form/filelist.tpl" prefix=$prefix filelist=$filelist editable=$config.edit selectable=$config.select highlight=$highlight edit=$edit querybase=$querybase groupinfo=$groupinfo owner=$tabs.owner ownerid=$tabs.ownerid selectfolders=$config.selectfolders showtags=$config.showtags editmeta=$config.editmeta}
101
102
103
104
105
106
</div>

{* Edit form used when js is available *}
{if $edit <= 0}
<table class="hidden">
  <tbody id="{$prefix}_edit_placeholder">
107
  {include file="artefact:file:form/editfile.tpl" prefix=$prefix groupinfo=$groupinfo}
108
109
110
  </tbody>
</table>
{/if}
111

112
113
114
115
{if $tabs}
</div>
{/if}

116
</div>