source: extensions/gally/gally-minimalist/template/picture.tpl @ 16022

Last change on this file since 16022 was 16022, checked in by grum, 12 years ago

new theme gally-minimalist

File size: 17.9 KB
Line 
1<!-- **GBL** >PICTURE> -->
2
3{include file='infos_errors.tpl'}
4
5<div id="content" {if isset($MENUBAR)}class="pictureContent"{/if}>
6
7  <div id="theImageHigh" style="display:none;">
8    <div id="theImgHighBg"></div>
9    <div id="theImgHighContainer">
10      <div id="theImgHighCloseButton" onclick="gallyPP.closeDisplayHigh();"></div>
11      <div id="theImgHighZoomButton" class="fit" onclick="gallyPP.switchZoomHigh();"></div>
12      <div id="theImgHighContainer2">
13        <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}">
14      </div>
15    </div>
16  </div>
17
18{if isset($MENUBAR)}
19  <div id="imageHeaderBar" class="menu">
20    <div class="titrePage" id='titrePageID'>
21      {if #menuAnimated# == "noswitch"}
22          {$MENUBAR}
23      {else}
24        <div id="menuswitcher">
25          <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
26          </a>
27        </div>
28        {$MENUBAR}
29      {/if}
30    </div>
31{else}
32  <div id="imageHeaderBar">
33    <div class="imageNumber">
34      <div class="browsePathBG">&nbsp;</div>
35      <div class="imageNumberTxt">{$PHOTO}</div>
36    </div>
37    <div class="browsePath">
38      <div class="browsePathBG">&nbsp;</div>
39      <h2>
40      {$SECTION_TITLE|cat:$LEVEL_SEPARATOR|cat:$current.TITLE|replace:$LEVEL_SEPARATOR:" &#124; "}
41      </h2>
42    </div>
43{/if}
44  </div> <!-- imageHeaderBar -->
45
46
47  {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
48
49  <div id="imageToolBar">
50    <div id="imageToolBarContainer" class="uiImg">
51        <div class="imageToolBarBg">&nbsp;</div>
52    </div>
53  </div> <!-- imageToolBar -->
54
55  <div id="theImage">
56    {$ELEMENT_CONTENT}
57
58    {if isset($COMMENT_IMG)}
59    <p>{$COMMENT_IMG}</p>
60    {else}
61    <p>&nbsp;</p>
62    {/if}
63
64    {if isset($U_SLIDESHOW_STOP) }
65    <p>
66      [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
67    </p>
68    {/if}
69  </div> <!-- theImage -->
70
71  <div id="theTabsContainer">
72    <div id="theTabs" class="uiImg">
73      {assign var='display_info_panel' value=false}
74      {foreach from=$display_info item=displayitem}
75        {if $displayitem}
76          {assign var='display_info_panel' value=true}
77        {/if}
78      {/foreach}
79
80
81
82        {if count($current.unique_derivatives)>1}
83        <div id="derivativeSwitchBox" class="switchBox">
84        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
85        {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
86        <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
87        <a onclick="gallyPP.changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}', '{$COOKIE_PATH}')">
88          {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
89        </a><br>
90        {/foreach}
91        {if isset($U_ORIGINAL)}
92        <span class="switchCheck" style="visibility:hidden">&#x2714; </span><a onclick="gallyPP.openDisplayHigh('{$U_ORIGINAL}');">{'Original'|@translate}</a>
93        {/if}
94        </div>
95        {/if}
96
97      <div class="tab" id="tabRandomButtons">
98        <div class="randomButtons">
99
100          {if count($current.unique_derivatives)>1}
101            <a id="icon_derivatives" title="{'Photo sizes'|@translate}" rel="nofollow" class="button" ></a>
102          {/if}
103
104          {if isset($U_SLIDESHOW_START)}
105            <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow" id="icon_start_slideshow" class="button" ></a>
106          {/if}
107
108          {if isset($U_METADATA)}
109            <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow" id="icon_metadata" class="button" ></a>
110          {/if}
111
112          {if isset($current.U_DOWNLOAD)}
113            <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" id="icon_save" class="button" ></a>
114          {/if}
115
116          {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
117
118          {if isset($favorite)}
119            <a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'delete this photo from your favorites'|@translate}{else}{'add this photo to your favorites'|@translate}{/if}" id="icon_{if $favorite.IS_FAVORITE}del_{/if}favorite" class="button"></a>
120          {/if}
121          {if isset($U_SET_AS_REPRESENTATIVE)}
122            <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" id="icon_representative" class="button" ></a>
123          {/if}
124          {if isset($U_ADMIN)}
125            <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" id="icon_preferences" class="button"></a>
126          {/if}
127          {if isset($U_CADDIE) }{*caddie management BEGIN*}
128          {footer_script}
129          {literal}function addToCadie(aElement, rootUrl, id)
130          {
131            if (aElement.disabled) return;
132            aElement.disabled=true;
133            var y = new PwgWS(rootUrl);
134            y.callService(
135              "pwg.caddie.add", {image_id: id} ,
136              {
137                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
138                onSuccess: function(result) { aElement.disabled = false; }
139              }
140            );
141          }{/literal}
142          {/footer_script}
143          <a onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'Add to caddie'|@translate}" id="icon_caddie" class="button"></a>
144          {/if}{*caddie management END*}
145          {footer_script}
146            $('div.randomButtons a.button').addClass('sTipOnRight');
147          {/footer_script}
148        </div>
149      </div>
150
151      <div class="tab" id="tabNavigate">
152        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
153      </div>
154
155
156      <ul id="theTabsheets">
157        {if $display_info_panel}
158          <li class="tab" id="tabImageInfos"><a href="#imageInfos">{'Informations'|@translate}</a></li>
159        {/if}
160
161        {if isset($metadata)}
162          {foreach from=$metadata item=meta key=id}
163            <li class="tab" id="tabImageMeta{$id}"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
164          {/foreach}
165        {/if}
166
167        {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
168          <li class="tab" id="tabTheComment">
169            <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
170          </li>
171        {/if}
172
173      </ul>
174
175      <div id="theTabsBg"></div>
176
177
178
179      {if $display_info_panel}
180        <div id="imageInfos" class="tabPanel">
181          <div id="imageInfosContainer">
182          <div class="imageInfosBg">&nbsp;</div>
183
184            <table class="infoTable">
185              <tr  class="emptyrow" style="line-height:0px;">
186                <td colspan="2">&nbsp;</td>
187              <td class='cTitle'>&nbsp;</td>
188              <td class='cNfo' >&nbsp;</td>
189              <td class='cTitle'>&nbsp;</td>
190              <td class='cNfo' >&nbsp;</td>
191              </tr>
192
193              {if $display_info.author or $display_info.created_on or $display_info.posted_on}
194              <tr>
195              {assign var='colspan' value=6}
196                {if $display_info.author}
197                {assign var='colspan' value=`$colspan-2`}
198                  <td class="label">{'Author'|@translate}</td>
199                  <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
200                {/if}
201
202                {if $display_info.created_on}
203                {assign var='colspan' value=`$colspan-2`}
204                  <td class="label">{'Created on'|@translate}</td>
205                  <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
206                {/if}
207
208                {if $display_info.posted_on}
209                  {assign var='colspan' value=`$colspan-2`}
210                  <td class="label">{'Posted on'|@translate}</td>
211                  <td class="value">{$INFO_POSTED_DATE}</td>
212                {/if}
213
214                {if $colspan!=0}
215                  <td colspan="{$colspan}">&nbsp;</td>
216                {/if}
217
218              </tr>
219              {/if}
220
221              {if $display_info.dimensions or $display_info.file or $display_info.filesize}
222              <tr>
223              {assign var='colspan' value=6}
224
225                {if $display_info.dimensions}
226                {assign var='colspan' value=`$colspan-2`}
227                  <td class="label">{'Dimensions'|@translate}</td>
228                  <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS|@replace:"*":"x"}{else}{'N/A'|@translate}{/if}</td>
229                {/if}
230
231                {if $display_info.file}
232                {assign var='colspan' value=`$colspan-2`}
233                  <td class="label">{'File'|@translate}</td>
234                  <td class="value">{$INFO_FILE}</td>
235                {/if}
236
237                {if $display_info.filesize}
238                  {assign var='colspan' value=`$colspan-2`}
239                  <td class="label">{'Filesize'|@translate}</td>
240                  <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
241                {/if}
242
243                {if $colspan!=0}
244                  <td colspan="{$colspan}">&nbsp;</td>
245                {/if}
246              </tr>
247              {/if}
248
249              {if isset($related_tags) and $display_info.tags}
250              <tr class="emptyrow"><td colspan="6">&nbsp;</td></tr>
251                <tr id="infoTags">
252                  <td class="label">{'Tags'|@translate}</td>
253                <td colspan="5" class="value">
254                      {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
255                      <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
256                  </td>
257                </tr>
258              {/if}
259
260              {if isset($related_categories) and $display_info.categories}
261              <tr class="emptyrow"><td colspan="6">&nbsp;</td></tr>
262                <tr id="infoCats">
263                  <td class="label">{'Albums'|@translate}</td>
264                <td colspan="5" class="value">
265                    {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
266                    {$cat}
267                    {/foreach}
268                  </td>
269                </tr>
270              {/if}
271              {if $display_info.visits}
272              <tr class="emptyrow"><td colspan="6">&nbsp;</td><tr>
273                <tr>
274                  <td class="label">{'Visits'|@translate}</td>
275                <td {if !($display_info.privacy_level and isset($available_permission_levels))}colspan="5"{/if} class="value">{$INFO_VISITS}</td>
276
277                  {if $display_info.privacy_level and isset($available_permission_levels)}
278                      <td colspan="4" class="label"><a id="iPrivacyLevelLink">{'Who can see this photo?'|@translate}</a>
279
280                        <div id="privacyLevelBox" class="switchBox">
281                          {foreach from=$available_permission_levels item=label key=level}
282                          <span id="levelCheck{$level}" class="switchCheck" {if $level != $current.level} style="visibility:hidden"{/if}>&#x2714; </span>
283                          <a id="switchLevel{$level}" onclick="gallyPP.setPrivacyLevel('{$ROOT_URL}', {$current.id}, {$level})">{$label}</a><br>
284                          {/foreach}
285                        </div>
286                     </td>
287                  {/if}
288
289                </tr>
290              {/if}
291
292            {if (isset($rate_summary) or isset($rating)) and  $display_info.rating_score}
293              <tr id="rating">
294                  {if isset($rate_summary)}
295                  <td class="label">{'Rating score'|@translate}</td>
296                  <td class="value">
297                    {if $rate_summary.count}
298                    <span id="ratingScore">{$rate_summary.score}</span>
299                    <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
300                    {else}
301                    <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
302                    {/if}
303                    </td>
304                  {else}
305                    <td colspan="2">&nbsp;</td>
306                  {/if}
307
308                  {if isset($rating)}
309                  <td class="label" colspan="4">
310                    <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
311
312                      <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
313                      <div>&nbsp;
314                      {foreach from=$rating.marks item=mark name=rate_loop}
315                      {if !$smarty.foreach.rate_loop.first} | {/if}
316
317                      {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
318                        <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
319                      {else}
320                        <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
321                      {/if}
322
323                      {/foreach}
324
325                      {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
326                      {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
327
328
329                      {footer_script}
330                        var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
331                        _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
332                          onSuccess : function(rating) {ldelim}
333                            var e = document.getElementById("updateRate");
334                            if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
335                            e = document.getElementById("ratingScore");
336                            if (e) e.innerHTML = rating.score;
337                            e = document.getElementById("ratingCount");
338                            if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
339                          {rdelim}{rdelim} );
340                      {/footer_script}
341
342                      </div>
343                      </form>
344                    </td>
345                  {else}
346                  <td colspan="4">&nbsp;</td>
347                  {/if}
348              </tr>
349            {/if}
350
351            </table>
352
353          </div>
354        </div> <!-- imageInfos -->
355      {/if}
356
357      {if isset($metadata)}
358      {foreach from=$metadata item=meta key=id}
359      <div id="imageMeta{$id}" class="imageMeta tabPanel">
360        <div id="imageMetaContainer{$id}">
361          <div class="imageMetaBg">&nbsp;</div>
362
363          {if count($meta.lines)>0 and !array_key_exists('<!--rawContent-->', $meta.lines)}
364            <table id="displaymeta{$id}" class="displaymeta infoTable">
365              {foreach from=$meta.lines item=value key=label name=metaloop}
366                {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
367                  {if !$smarty.foreach.metaloop.first}</tr>{/if}
368                  {if !$smarty.foreach.metaloop.last}<tr>{/if}
369                {/if}
370                <td class="label">{$label|@translate}</td>
371                <td class="value">{$value}</td>
372              {/foreach}
373            </table>
374          {else}
375            {assign var='empty' value='<!--rawContent-->'}
376            {$meta.lines.$empty}
377          {/if}
378        </div>
379      </div> <!-- imageMeta -->
380      {/foreach}
381      {/if}
382
383
384      {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
385      <div id="theComments" class="tabPanel">
386        <div id="theCommentsContainer">
387          <div id='theCommentBG'>&nbsp;</div>
388
389          {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
390
391          {if isset($comment_add) or isset($comments)}
392          <table id="theCommentContainer">
393            <tr style="vertical-align:top;">
394              {if isset($comment_add)}
395              {if isset($comments)}
396              <td width="50%">
397              {else}
398              <td>
399              {/if}
400                <h4>{'Add a comment'|@translate}</h4>
401                <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
402                  <table>
403                    {if $comment_add.SHOW_AUTHOR}
404                    <tr>
405                      <td>{'Author'|@translate}</td>
406                      <td><input type="text" name="author"></td>
407                    </tr>
408                    {/if}
409                    <tr>
410                      <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
411                    </tr>
412                    <tr>
413                      <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}>
414                        <input type="hidden" name="key" value="{$comment_add.KEY}">
415                        <input class="submit" type="submit" value="{'Submit'|@translate}">
416                      </td>
417                    </tr>
418                  </table>
419                </form>
420              </td>
421              {/if}
422
423              {if isset($comments)}
424              {if isset($comment_add)}
425              <td width="50%">
426              {else}
427              <td width="100%">
428              {/if}
429                <div id="theCommentList">
430                  {include file='comment_list.tpl' comment_separator=true}
431                </div>
432              </td>
433              {/if}
434
435            </tr>
436          </table>
437          {/if}
438        </div>
439      </div>
440      {/if} {*comments*}
441
442    </div><!-- theTabs -->
443  </div>
444
445  {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
446
447</div>
448
449<!-- **GBL** <PICTURE< -->
450
Note: See TracBrowser for help on using the repository browser.