source: extensions/greydragon/template/picture.tpl @ 31733

Last change on this file since 31733 was 31733, checked in by SergeD, 7 years ago

version 1.2.28 - see changelog for details

File size: 8.8 KB
Line 
1{include file='include/colorbox.inc.tpl'}
2{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
3{combine_script id='picture-js' load='async' require='jquery,jquery.colorbox' path='themes/greydragon/js/theme.photo.js'}
4{assign var=overlay_mode value="off"}
5{if $greydragon.p_pict_tab_mode == "txt-with-overlay" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$overlay_mode="on"}{/if}
6{assign var=ico_mode value="off"}
7{if $greydragon.p_pict_tab_mode == "ico-tab-open" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$ico_mode="on"}{/if}
8                                                                                           
9{if isset($MENUBAR)}{$MENUBAR}{/if}
10
11<div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}>
12{if isset($errors) or not empty($infos)}
13{include file='infos_errors.tpl'}
14{/if}
15
16{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
17
18<div id="imageHeaderBar">
19  <div class="browsePath">
20    {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span><h2>{$current.TITLE}</h2>
21  </div>
22</div>
23
24<div id="imageToolBar">
25<div class="imageNumber">{$PHOTO}</div>
26{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
27
28<div class="actionButtons">
29{if isset($current.unique_derivatives) && count($current.unique_derivatives)>1}
30{footer_script require='jquery'}{literal}
31function changeImgSrc(url,typeSave,typeMap) {
32  var theImg = document.getElementById("theMainImage");
33  if (theImg)
34  {
35    theImg.removeAttribute("width");theImg.removeAttribute("height");
36    theImg.src = url;
37    theImg.useMap = "#map"+typeMap;
38  }
39  jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
40  jQuery('#derivativeChecked'+typeMap).css('visibility','visible');
41  document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
42}
43(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");
44{/literal}{/footer_script}
45
46{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
47  <span class="pwg-icon pwg-icon-sizes"></span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
48</a>
49<div id="derivativeSwitchBox" class="switchBox">
50  <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
51  {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
52  <span class="switchCheck" id="derivativeChecked{$derivative->get_type()}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
53  <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">
54    {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
55  </a><br>
56  {/foreach}
57  {if isset($U_ORIGINAL)}
58    {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
59  <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
60  {/if}
61</div>
62{/strip}
63{/if}
64{strip}{if isset($U_SLIDESHOW_START)}
65  <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
66    <span class="pwg-icon pwg-icon-slideshow"></span><span class="pwg-button-text">{'slideshow'|@translate}</span>
67  </a>
68{/if}{/strip}
69{strip}{if isset($current.U_DOWNLOAD)}
70  <a id="downloadSwitchLink" href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
71    <span class="pwg-icon pwg-icon-save"></span><span class="pwg-button-text">{'Download'|@translate}</span>
72  </a>
73{/if}{/strip}
74{if isset($PLUGIN_PICTURE_BUTTONS)}{foreach from=$PLUGIN_PICTURE_BUTTONS item=button}{$button}{/foreach}{/if}
75{if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
76{strip}{if isset($favorite)}
77  <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}" class="pwg-state-default pwg-button" rel="nofollow">
78    <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"></span><span class="pwg-button-text">{'Favorites'|@translate}</span>
79  </a>
80{/if}{/strip}
81{strip}{if isset($U_SET_AS_REPRESENTATIVE)}
82  <a id="cmdSetRepresentative" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
83    <span class="pwg-icon pwg-icon-representative"></span><span class="pwg-button-text">{'representative'|@translate}</span>
84  </a>
85{/if}{/strip}
86{strip}{if isset($U_PHOTO_ADMIN)}
87  <a id="cmdEditPhoto" href="{$U_PHOTO_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
88    <span class="pwg-icon pwg-icon-edit"></span><span class="pwg-button-text">{'Edit'|@translate}</span>
89  </a>
90{/if}{/strip}
91{strip}{if isset($U_CADDIE)}{*caddie management BEGIN*}
92{footer_script}
93{literal}function addToCadie(aElement, rootUrl, id) {
94  if (aElement.disabled) return;
95  aElement.disabled=true;
96  var y = new PwgWS(rootUrl);
97  y.callService("pwg.caddie.add", {image_id: id}, { onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, onSuccess: function(result) { aElement.disabled = false; }});
98}{/literal}
99{/footer_script}
100  <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'Add to caddie'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
101    <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span>
102  </a>
103{/if}{/strip}{*caddie management END*}
104</div>
105</div>{*<!-- imageToolBar -->*}
106
107<div id="theImageAndInfos"{if $DISPLAY_NAV_THUMB} class="nav-thumb-margin"{/if}>
108<div id="theImage">
109{$ELEMENT_CONTENT}
110
111{if isset($U_SLIDESHOW_STOP)}
112<p>
113  [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
114</p>
115{/if}
116
117{if $DISPLAY_NAV_THUMB}
118<div id="imageInfos">
119  <div class="navThumbs">
120    {if isset($previous)}
121      <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}" rel="prev">
122        <span class="thumbHover prevThumbHover"></span>
123        <img src="{$previous.derivatives.square->get_url()}" alt="{$previous.TITLE_ESC}">
124      </a>
125    {elseif isset($U_UP)}
126      <a class="navThumb" id="linkPrev" href="{$U_UP}" title="{'Thumbnails'|@translate}">
127        <div class="thumbHover">{'First Page'|@translate}<br><br>{'Go back to the album'|@translate}</div>
128      </a>
129    {/if}
130    {if isset($next)}
131      <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE_ESC}" rel="next">
132        <span class="thumbHover nextThumbHover"></span>
133        <img src="{$next.derivatives.square->get_url()}" alt="{$next.TITLE_ESC}">
134      </a>
135    {elseif isset($U_UP)}
136      <a class="navThumb" id="linkNext"  href="{$U_UP}"  title="{'Thumbnails'|@translate}">
137        <div class="thumbHover">{'Last Page'|@translate}<br><br>{'Go back to the album'|@translate}</div>
138      </a>
139    {/if}
140  </div>
141</div>
142{/if}
143
144</div>
145
146{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "on"}
147<div id="image-metadata-ico">
148  <ul class="image-metadata-ico">
149    {include file='picture_tab_ico.tpl'}
150    {*GD_META_ICO*}
151  </ul>
152</div>
153{/if}
154
155</div>
156
157{assign var=def_tab value="{$greydragon.p_pict_tab_default}"}
158{if !isset($metadata) && $def_tab == 'exif'}{$def_tab="desc"}{/if}
159{if !isset($COMMENT_COUNT) && $def_tab == 'comments'}{$def_tab="desc"}{/if}
160{if !isset( $COMMENT_IMG ) && $def_tab == 'desc'}{$def_tab="info"}{/if}
161{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "off"}
162<ul class="image-metadata"> 
163  {include file='picture_tab_txt.tpl'}
164  {*GD_META_TXT*}
165  <li id="image-metadata-toggle" class="glyphicon {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close"}glyphicon-chevron-down{else}glyphicon-chevron-up{/if}" ></li>
166</ul>
167{/if}
168{if $greydragon.p_pict_tab_mode !== "hide"}
169<div class="image-metadata-tabs{if $overlay_mode=="on"} overlay{/if}" {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $overlay_mode=="on"}style="display: none;"{/if}> 
170  {include file='picture_tab_content.tpl'}
171  {*GD_META_CONTENT*}
172</div>
173{/if}
174</div>
175{* if isset($greydragon.image_preload)}
176<div id="image_urls" style="display:none;">
177  {foreach from=$U_IMGNEXT item=u_img key=id}
178    {if isset($u_img)}<div class="next{$id} preload">{$u_img}</div>{/if}
179  {/foreach}
180</div>
181{ /if *}
182
183{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.