source: trunk/admin/themes/default/template/photos_add_direct.tpl @ 5200

Last change on this file since 5200 was 5174, checked in by plg, 15 years ago

make the fieldset labels easier to read (no italic, increased letter spacing,
bold)

make the fiedset border softer

photos_add 2 screens comply with the fieldset system instead of specific
formField divs.

File size: 5.2 KB
Line 
1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/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</script>
13{/literal}
14
15{if $upload_mode eq 'html'}
16{literal}
17<script type="text/javascript">
18$(document).ready(function(){
19  function addUploadBox() {
20    var uploadBox = '<p class="file"><input type="file" size="60" name="image_upload[]" /></p>';
21    $(uploadBox).appendTo("#uploadBoxes");
22  }
23
24  addUploadBox();
25
26  $("#addUploadBox A").click(function () {
27    addUploadBox();
28  });
29});
30</script>
31{/literal}
32
33{elseif $upload_mode eq 'multiple'}
34<script type="text/javascript" src="{$uploadify_path}/swfobject.js"></script>
35<script type="text/javascript" src="{$uploadify_path}/jquery.uploadify.v2.1.0.min.js"></script>
36
37<script type="text/javascript">
38var uploadify_path = '{$uploadify_path}';
39var upload_id = '{$upload_id}';
40var session_id = '{$session_id}';
41var pwg_token = '{$pwg_token}';
42var buttonText = 'Browse';
43
44{literal}
45jQuery(document).ready(function() {
46  jQuery("#uploadify").uploadify({
47    'uploader'       : uploadify_path + '/uploadify.swf',
48    'script'         : uploadify_path + '/uploadify.php',
49    'scriptData'     : {
50      'upload_id' : upload_id,
51      'session_id' : session_id,
52      'pwg_token' : pwg_token,
53    },
54    'cancelImg'      : uploadify_path + '/cancel.png',
55    'queueID'        : 'fileQueue',
56    'auto'           : false,
57    'displayData'    : 'speed',
58    'buttonText'     : buttonText,
59    'multi'          : true,
60    'onAllComplete'  : function(event, data) {
61      if (data.errors) {
62        return false;
63      }
64      else {
65        $("input[name=submit_upload]").click();
66      }
67    }
68  });
69});
70{/literal}
71</script>
72{/if}
73
74<div class="titrePage">
75  <h2>{'Upload photos'|@translate}</h2>
76</div>
77
78<div id="photosAddContent">
79
80{if count($setup_errors) > 0}
81<div class="errors">
82  <ul>
83  {foreach from=$setup_errors item=error}
84    <li>{$error}</li>
85  {/foreach}
86  </ul>
87</div>
88{else}
89
90{if !empty($thumbnails)}
91<fieldset>
92  <legend>{'Uploaded Photos'|@translate}</legend>
93  <div>
94  {foreach from=$thumbnails item=thumbnail}
95    <a href="{$thumbnail.link}" onclick="window.open(this.href); return false;">
96      <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail">
97    </a>
98  {/foreach}
99  </div>
100  <p id="batchLink"><a href="{$batch_link}">{$batch_label}</a></p>
101</fieldset>
102{/if}
103
104
105<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">
106{if $upload_mode eq 'multiple'}
107<input name="upload_id" value="{$upload_id}" type="hidden">
108{/if}
109
110    <fieldset>
111      <legend>{'Drop into category'|@translate}</legend>
112     
113      <label><input type="radio" name="category_type" value="existing"> {'existing category'|@translate}</label>
114      <label><input type="radio" name="category_type" value="new" checked="checked"> {'create a new category'|@translate}</label>
115
116      <div id="category_type_existing" style="display:none" class="category_selection">
117        <select class="categoryDropDown" name="category">
118          {html_options options=$category_options}
119        </select>
120      </div>
121
122      <div id="category_type_new" class="category_selection">
123        <table>
124          <tr>
125            <td>{'Parent category'|@translate}</td>
126            <td>
127              <select class="categoryDropDown" name="category_parent">
128                <option value="0">------------</option>
129                {html_options options=$category_options}
130              </select>
131            </td>
132          </tr>
133          <tr>
134            <td>{'Category name'|@translate}</td>
135            <td>
136              <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" style="width:400px">
137            </td>
138          </tr>
139        </table>
140      </div>
141    </fieldset>
142
143    <fieldset>
144      <legend>{'Who can see these photos?'|@translate}</legend>
145
146      <select name="level" size="1">
147        {html_options options=$level_options selected=$level_options_selected}
148      </select>
149    </fieldset>
150
151    <fieldset>
152      <legend>{'Select files'|@translate}</legend>
153
154{if $upload_mode eq 'html'}
155    <p><a href="{$switch_url}">{'... or switch to the multiple files form'|@translate}</a></p>
156
157      <p>{'JPEG files or ZIP archives with JPEG files inside please.'|@translate}</p>
158
159      <div id="uploadBoxes"></div>
160      <div id="addUploadBox">
161        <a href="javascript:">{'+ Add an upload box'|@translate}</a>
162      </div>
163   
164    </fieldset>
165
166    <p>
167      <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/>
168    </p>
169{elseif $upload_mode eq 'multiple'}
170    </table>
171
172    <p>
173      <input type="file" name="uploadify" id="uploadify" />
174    </p>
175
176    <p><a href="{$switch_url}">{'... or switch to the old style form'|@translate}</a></p>
177
178    <div id="fileQueue"></div>
179
180    </fieldset>
181    <p>
182      <input class="submit" type="button" value="{'Upload'|@translate}" onclick="javascript:jQuery('#uploadify').uploadifyUpload()"/>
183      <input type="submit" name="submit_upload" style="display:none"/>
184    </p>
185{/if}
186</form>
187{/if}
188
189</div> <!-- photosAddContent -->
Note: See TracBrowser for help on using the repository browser.