source: extensions/gally/picture.tpl @ 4446

Last change on this file since 4446 was 4446, checked in by grum, 14 years ago

[Template:Gally] Add template to subversion

  • Property svn:executable set to *
File size: 13.8 KB
Line 
1<!-- **GBL** >PICTURE> -->
2
3{include file='dialogs.tpl'}
4
5
6<div id="imageHeaderBar">
7  <div class="browsePath">
8    <h2>
9    [ <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
10    {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
11    {$LEVEL_SEPARATOR}{$current.TITLE} ]
12    </h2>
13  </div>
14  <div class="imageNumber">{$PHOTO}</div>
15  <h2>&nbsp;</h2>
16</div> <!-- imageHeaderBar -->
17
18{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
19<div id="imageToolBar">
20  <div id="imageToolBarContainer" class="uiImg">
21      <div class="imageToolBarBg">&nbsp;</div>
22
23      <div class="randomButtons">
24        {if isset($U_SLIDESHOW_START) }
25          <a id="icon_start_slideshow" class="button" href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}">--></a>
26        {/if}
27        {if isset($U_SLIDESHOW_STOP) }
28          <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}">--></a>
29        {/if}
30          <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" />--></a>
31        {if isset($current.U_DOWNLOAD) }
32          <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}">--></a>
33        {/if}
34        {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
35        {if isset($favorite) }
36          <a id="icon_{$favorite.FAVORITE_IMG|regex_replace:'/(.*\/)*(del_)*(favorite)+(\.png)*/i':'$2$3'}" class="button" href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><!-- <img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"> --></a>
37        {/if}
38        {if !empty($U_SET_AS_REPRESENTATIVE) }
39          <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"> --></a>
40        {/if}
41        {if isset($U_ADMIN) }
42          <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"> --></a>
43        {/if}
44        {if isset($U_CADDIE) }{*caddie management BEGIN*}
45        <script type="text/javascript">
46        {literal}
47        function addToCadie(aElement, rootUrl, id)
48        {
49          if (aElement.disabled) return;
50          aElement.disabled=true;
51          var y = new PwgWS(rootUrl);
52
53          y.callService(
54            "pwg.caddie.add", {image_id: id} ,
55            {
56              onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
57              onSuccess: function(result) { aElement.disabled = false; }
58            }
59          );
60        }{/literal}
61        </script>
62        <a id="icon_caddie" class="button" href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"> --></a>
63        {/if} {*caddie management END*}
64      </div>
65      {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
66
67      {if $SHOW_PICTURE_NAME_ON_TITLE }
68      <div><h2>{$current.TITLE}</h2></div>
69      {/if}
70
71  </div>
72</div> <!-- imageToolBar -->
73
74{if isset($previous) }
75<div id="navThumbPrev">
76  <table id="navThumbPrevContainer" class="uiImg"><tr><td>
77    <div class="navThumbPrevBg">&nbsp;</div>
78    <div class="navThumbPrevContent">
79      <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
80        <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
81      </a>
82    </div>
83  </td></tr></table>
84</div> <!-- navThumbPrev -->
85{/if}
86
87{if isset($next) }
88<div id="navThumbNext">
89  <table id="navThumbNextContainer" class="uiImg"><tr><td>
90    <div class="navThumbNextBg">&nbsp;</div>
91    <div class="navThumbNextContent">
92      <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
93        <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
94      </a>
95    </div>
96  </td></tr></table>
97</div> <!-- navThumbNext -->
98{/if}
99
100
101  <div id="theImage">
102      {$ELEMENT_CONTENT}
103
104      {if isset($COMMENT_IMG)}
105      <p>{$COMMENT_IMG}</p>
106      {else}
107      <p>&nbsp;</p>
108      {/if}
109
110      {if isset($U_SLIDESHOW_STOP) }
111      <p>
112        [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
113      </p>
114      {/if}
115  </div> <!-- theImage -->
116
117
118<div id="theTabsContainer">
119<div id="theTabs" class="uiImg">
120  <ul id="theTabsheets">
121    <li class="tab" id="tabImageInfos"><a href="#imageInfos">imageInfos</a></li>
122    {if isset($metadata)}
123      {foreach from=$metadata item=meta key=id}
124        <li class="tab" id="tabImageMeta"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
125      {/foreach}
126    {/if}
127    {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
128      <li class="tab" id="tabTheComment">
129        <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
130        <!-- <span class="comment_icon"><img src="{$ROOT_URL}{$themeconf.icon_dir}/comments.png" alt=""/></span> -->
131      </li>
132    {/if}
133  </ul>
134  <div id="theTabsBg"></div>
135
136  <div id="imageInfos" class="tabPanel">
137    <div id="imageInfosContainer">
138    <div class="imageInfosBg">&nbsp;</div>
139
140  <table class="infoTable" summary="Some info about this picture">
141    <tr  class="emptyrow" style="line-height:0px;">
142      <td colspan="2" width="49.75%">&nbsp;</td>
143      <td>&nbsp;</td>
144      <td colspan="2" width="49.75%">&nbsp;</td>
145    </tr>
146
147    <tr>
148      <td class="label">{'Author'|@translate}</td>
149      <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
150      <td>&nbsp;</td>
151      <td class="label">{'Dimensions'|@translate}</td>
152      <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
153    </tr>
154    <tr>
155      <td class="label">{'Created on'|@translate}</td>
156      <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
157      <td>&nbsp;</td>
158      <td class="label">{'File'|@translate}</td>
159      <td class="value">{$INFO_FILE}</td>
160    </tr>
161    <tr>
162      <td class="label">{'Posted on'|@translate}</td>
163      <td class="value">{$INFO_POSTED_DATE}</td>
164      <td>&nbsp;</td>
165      <td class="label">{'Filesize'|@translate}</td>
166      <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
167    </tr>
168    {if isset($related_tags)}
169      <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
170      <tr id="infoTags">
171        <td class="label">{'Tags'|@translate}</td>
172        <td colspan="4" class="value">
173            {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
174            <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
175        </td>
176      </tr>
177    {/if}
178    {if isset($related_categories)}
179      <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
180      <tr id="infoCats">
181        <td class="label">{'Categories'|@translate}</td>
182        <td colspan="4" class="value">
183          {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
184          {$cat}
185          {/foreach}
186        </td>
187      </tr>
188    {/if}
189    <tr class="emptyrow"><td colspan="5">&nbsp;</td><tr>
190    <tr>
191      <td class="label">{'Visits'|@translate}</td>
192      <td colspan="4" class="value">{$INFO_VISITS}</td>
193    </tr>
194
195  {if isset($rate_summary) or isset($rating)}
196    <tr>
197      {if isset($rate_summary)}
198        <td class="label">{'Average rate'|@translate}</td>
199        <td class="value" id="ratingSummary">
200        {if $rate_summary.count}
201          {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
202          {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
203        {else}
204          {'no_rate'|@translate}
205        {/if}
206        </td>
207      {else}
208        <td colspan="2">&nbsp;</td>
209      {/if}
210      <td>&nbsp;</td>
211      {if isset($rating)}
212        <td class="label">
213          <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
214        </td>
215        <td class="value">
216          <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
217          <div>&nbsp;
218          {foreach from=$rating.marks item=mark name=rate_loop}
219          {if !$smarty.foreach.rate_loop.first} | {/if}
220          {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
221            <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
222          {else}
223            <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
224          {/if}
225          {/foreach}
226          <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script>
227          <script type="text/javascript">
228          makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
229          updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
230          ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
231          </script>
232          </div>
233          </form>
234        </td>
235      {else}
236        <td colspan="2">&nbsp;</td>
237      {/if}
238    </tr>
239  {/if}
240
241  {if isset($available_permission_levels) }
242    <tr>
243      <td class="label">{'Privacy level'|@translate}:</td>
244      <td colspan="4" class="value">
245  <script type="text/javascript">
246  {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
247  {
248  selectElement.disabled = true;
249  var y = new PwgWS(rootUrl);
250  y.callService(
251    "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
252    {
253      onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
254      onSuccess: function(result) { selectElement.disabled = false; }
255    }
256    );
257  }{/literal}
258  </script>
259    <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
260    {foreach from=$available_permission_levels item=level}
261      <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
262    {/foreach}
263    </select>
264    </td></tr>
265  {/if}
266
267  </table>
268
269    </div>
270  </div> <!-- imageInfos -->
271
272
273
274
275  {if isset($metadata)}
276  {foreach from=$metadata item=meta key=id}
277  <div id="imageMeta{$id}" class="imageMeta tabPanel">
278    <div id="imageMetaContainer{$id}">
279      <div class="imageMetaBg">&nbsp;</div>
280      <table id="displaymeta{$id}" class="displaymeta infoTable">
281        {foreach from=$meta.lines item=value key=label name=metaloop}
282        {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
283          {if !$smarty.foreach.metaloop.first}</tr>{/if}
284          {if !$smarty.foreach.metaloop.last}<tr>{/if}
285        {/if}
286          <td class="label">{$label|@translate}</td>
287          <td class="value">{$value|replace:',':', '}</td>
288      {/foreach}
289      </table>
290    </div>
291  </div> <!-- imageMeta -->
292  {/foreach}
293  {/if}
294
295
296  {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
297  <div id="theComments" class="tabPanel">
298    <div id='theCommentBG'>&nbsp;</div>
299
300    {if !empty($COMMENT_NAV_BAR)}
301    <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
302    {/if}
303
304
305    {if isset($comment_add) or isset($comments)}
306    <table id="theCommentContainer">
307      <tr style="vertical-align:top;">
308        {if isset($comment_add)}
309        {if isset($comments)}
310        <td width="50%">
311        {else}
312        <td>
313        {/if}
314          <h4>{'comments_add'|@translate}</h4>
315          <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
316            <table>
317              {if $comment_add.SHOW_AUTHOR}
318              <tr>
319                <td>{'upload_author'|@translate}</td><td><input type="text" name="author"></td>
320              </tr>
321              {/if}
322              <tr>
323                <td><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
324              </tr>
325              <tr>
326                <td>
327                  <input type="hidden" name="key" value="{$comment_add.KEY}" />
328                  <input class="submit" type="submit" value="{'Submit'|@translate}">
329                </td>
330              </tr>
331            </table>
332          </form>
333        </td>
334        {/if}
335
336        {if isset($comments)}
337        {if isset($comment_add)}
338        <td width="50%">
339        {else}
340        <td>
341        {/if}
342          <div id="theCommentList">
343            {include file='comment_list.tpl' comment_separator=true}
344          </div>
345        </td>
346        {/if}
347
348      </tr>
349    </table>
350    {/if}
351  </div>
352  {/if} {*comments*}
353
354</div><!-- theTabs -->
355</div>
356
357{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
358<!-- **GBL** <PICTURE< -->
Note: See TracBrowser for help on using the repository browser.