source: trunk/admin/template/goto/photos_add_direct.tpl @ 5098

Last change on this file since 5098 was 5098, checked in by plg, 14 years ago

feature 1491: administration panel header/footer. Graphicaly outside the
administration theme. The header includes the gallery title with a link to
gallery, a theme changer, an explicit "visit gallery" link, a logout link.
The footer includes links to piwigo.org (homepage, documentation, forum) and
the contact webmaster link.

Due to new header/footer, I've removed the "Links" section in the menubar.

The new footer sticks to the bottom of the browser window.

I've slightly "rounded" grum tabs to look like the menubar borders.

Graphical illustration (top left and bottom left leaves) were removed to
improve readability. They make things beautiful on gallery side, they
decrease usability on admin side.

Piwigo logo was removed to save space on administration footer. It would be
nice to have a small logo to place bottom left in the footer next to
"Powered by Piwigo".

Links>Administration link was replaced by a big link box just above the
menubar.

The H2 was outside the #content box, nearly invisible on top right corner.
Now it is 1) easy to read 2) inside #content.

feature 1490: ability to switch from goto/roma to goto/clear with a single
click in administration header.

The global organisation of the page is quite heavily changed. The global
layout is:

body#theAdminPage
body#theAdminPage > #the_page
body#theAdminPage > #the_page > #pwgHead
body#theAdminPage > #the_page > #pwgMain
body#theAdminPage > #the_page > #pwgMain > #menubar
body#theAdminPage > #the_page > #pwgMain > #content
body#theAdminPage > #the_page > #footer

File size: 5.3 KB
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</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{if count($setup_errors) > 0}
79<div class="errors">
80  <ul>
81  {foreach from=$setup_errors item=error}
82    <li>{$error}</li>
83  {/foreach}
84  </ul>
85</div>
86{else}
87
88{if !empty($thumbnails)}
89<fieldset>
90  <legend>{'Uploaded Photos'|@translate}</legend>
91  <div>
92  {foreach from=$thumbnails item=thumbnail}
93    <a href="{$thumbnail.link}" onclick="window.open(this.href); return false;">
94      <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail">
95    </a>
96  {/foreach}
97  </div>
98  <p id="batchLink"><a href="{$batch_link}">{$batch_label}</a></p>
99</fieldset>
100{/if}
101
102
103<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">
104{if $upload_mode eq 'multiple'}
105<input name="upload_id" value="{$upload_id}" type="hidden">
106{/if}
107
108    <div class="formField">
109      <div class="formFieldTitle">{'Drop into category'|@translate}</div>
110     
111      <label><input type="radio" name="category_type" value="existing"> {'existing category'|@translate}</label>
112      <label><input type="radio" name="category_type" value="new" checked="checked"> {'create a new category'|@translate}</label>
113
114      <div id="category_type_existing" style="display:none" class="category_selection">
115        <select class="categoryDropDown" name="category">
116          {html_options options=$category_options}
117        </select>
118      </div>
119
120      <div id="category_type_new" class="category_selection">
121        <table>
122          <tr>
123            <td>{'Parent category'|@translate}</td>
124            <td>
125              <select class="categoryDropDown" name="category_parent">
126                <option value="0">------------</option>
127                {html_options options=$category_options}
128              </select>
129            </td>
130          </tr>
131          <tr>
132            <td>{'Category name'|@translate}</td>
133            <td>
134              <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" style="width:400px">
135            </td>
136          </tr>
137        </table>
138      </div>
139    </div>
140
141    <div class="formField">
142      <div class="formFieldTitle">{'Who can see these photos?'|@translate}</div>
143
144      <select name="level" size="1">
145        {html_options options=$level_options selected=$level_options_selected}
146      </select>
147    </div>
148
149    <div class="formField">
150      <div class="formFieldTitle">{'Select files'|@translate}</div>
151
152{if $upload_mode eq 'html'}
153    <p><a href="{$switch_url}">{'... or switch to the multiple files form'|@translate}</a></p>
154
155      <p>{'JPEG files or ZIP archives with JPEG files inside please.'|@translate}</p>
156
157      <div id="uploadBoxes"></div>
158      <div id="addUploadBox">
159        <a href="javascript:">{'+ Add an upload box'|@translate}</a>
160      </div>
161   
162    </div> <!-- formField -->
163
164    <p>
165      <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/>
166    </p>
167{elseif $upload_mode eq 'multiple'}
168    </table>
169
170    <p>
171      <input type="file" name="uploadify" id="uploadify" />
172    </p>
173
174    <p><a href="{$switch_url}">{'... or switch to the old style form'|@translate}</a></p>
175
176    <div id="fileQueue"></div>
177
178    </div> <!-- formField -->
179    <p>
180      <input class="submit" type="button" value="{'Upload'|@translate}" onclick="javascript:jQuery('#uploadify').uploadifyUpload()"/>
181      <input type="submit" name="submit_upload" style="display:none"/>
182    </p>
183{/if}
184</form>
185{/if}
Note: See TracBrowser for help on using the repository browser.