source: extensions/upload_form/upload.tpl @ 4809

Revision 4807, 3.2 KB checked in by plg, 10 years ago (diff)

feature 1411 added: display many informations about upload result. With
thumbnails and links to administer uploaded photos.

Line 
1{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
2
3{literal}
4<script>
5$(document).ready(function(){
6
7  $("input[name=category_type]").click(function () {
8    $("[id^=category_type_]").hide();
9    $("#category_type_"+$(this).attr("value")).show();
10  });
11
12});
13</script>
14{/literal}
15
16<script type="text/javascript" src="{$plugin_path}/include/upload.js"></script>
17
18{literal}
19<style>
20#uploadBoxes P {
21  margin:0;
22  margin-bottom:2px;
23  padding:0;
24}
25</style>
26{/literal}
27
28<div class="titrePage">
29  <h2>{'Upload Form'|@translate}</h2>
30</div>
31
32{if count($setup_errors) > 0}
33<div class="errors">
34  <ul>
35  {foreach from=$setup_errors item=error}
36    <li>{$error}</li>
37  {/foreach}
38  </ul>
39</div>
40{else}
41
42{if !empty($thumbnails)}
43<fieldset>
44  <legend>{'Uploaded Photos'|@translate}</legend>
45  <div>
46  {foreach from=$thumbnails item=thumbnail}
47    <a href="{$thumbnail.link}" onclick="window.open(this.href); return false;">
48      <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail">
49    </a>
50  {/foreach}
51  </div>
52</fieldset>
53{/if}
54
55
56<form enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">
57  <fieldset>
58    <legend>{'Upload Photos'|@translate}</legend>
59
60    <table>
61      <tr>
62        <th>{'Drop into category'|@translate}</th>
63        <td>
64          <label><input type="radio" name="category_type" value="existing" checked="checked"> {'existing category'|@translate}</label>
65          <label><input type="radio" name="category_type" value="new"> {'create a new category'|@translate}</label>
66
67          <div id="category_type_existing">
68            <select class="categoryDropDown" name="category">
69              {html_options options=$category_options}
70            </select>
71          </div>
72
73          <div id="category_type_new" style="display:none">
74            <table>
75              <tr>
76                <td>{'Parent category'|@translate}</td>
77                <td>
78                  <select class="categoryDropDown" name="category_parent">
79                    <option value="0">------------</option>
80                    {html_options options=$category_options}
81                  </select>
82                </td>
83              </tr>
84              <tr>
85                <td>{'Category name'|@translate}</td>
86                <td>
87                  <input type="text" name="category_name" value="{$F_CATEGORY_NAME}"
88                </td>
89              </tr>
90            </table>
91          </div>
92
93        </td>
94      </tr>
95
96      <tr>
97        <th>{'Minimum privacy level'|@translate}</th>
98        <td>
99          <select name="level" size="1">
100            {html_options options=$level_options selected=$level_options_selected}
101          </select>
102        </td>
103      </tr>
104
105      <tr>
106        <td colspan="2">
107          <div id="uploadBoxes">
108            <p><input class="file" type="file" size="70" name="image_upload[]" /></p>
109          </div>
110          <div id="addUploadBox">
111            <a href="javascript: UpdateUploadSlots()">{'+ Add an upload box'|@translate}</a>
112          </div>
113        </td>
114      </tr>
115     
116    </table>
117   
118    <p>
119      <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/>
120    </p>
121  </fieldset>
122</form>
123{/if}
Note: See TracBrowser for help on using the repository browser.