source: extensions/Slide/template/picture.tpl @ 26915

Last change on this file since 26915 was 26889, checked in by Miklfe, 10 years ago
File size: 12.1 KB
Line 
1{* Example of resizeable
2{include file='include/autosize.inc.tpl'}
3*}
4
5{if isset($MENUBAR)}{$MENUBAR}{/if}
6
7<div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}>
8{if isset($errors) or not empty($infos)}
9{include file='infos_errors.tpl'}
10{/if}
11{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
12
13<div id="imageHeaderBar">
14        <div class="browsePath">
15                {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span><h2>{$current.TITLE}</h2>
16        </div>
17</div>
18
19<div id="imageToolBar">
20<div class="imageNumber">{$PHOTO}</div>
21{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
22<div class="actionButtons">
23{if isset($current.unique_derivatives) && count($current.unique_derivatives)>1}
24
25{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
26  <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
27</a>
28<div id="derivativeSwitchBox" class="switchBox">
29  <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
30  {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
31  <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
32  <span href="" class="derivative" data-typesave="{$derivative_type}"  data-url="{$derivative->get_url()}" data-typemap="{$derivative->get_type()} " data-cookie="{$COOKIE_PATH}">{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
33  </span><br>
34  {/foreach}
35  {if isset($U_ORIGINAL)}
36    {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
37  <span class="original" href="" rel="nofollow" data-url="{$U_ORIGINAL}" data-winname="xxx" data-features="scrollbars=yes,toolbar=no,status=no,resizable=yes">{'Original'|@translate}</span>
38  {/if}
39</div>
40{/strip}
41{/if}
42{strip}{if isset($U_SLIDESHOW_START)}
43        <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="sameLayer pwg-state-default pwg-button" rel="nofollow">
44                <span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
45        </a>
46{/if}{/strip}
47{strip}{if isset($U_METADATA)}
48        <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button sameLayer" rel="nofollow">
49                <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
50        </a>
51{/if}{/strip}
52{strip}{if isset($current.U_DOWNLOAD)}
53        <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
54                <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'Download'|@translate}</span>
55        </a>
56{/if}{/strip}
57{if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
58{strip}{if isset($favorite)}
59        <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 sameLayer" rel="nofollow">
60                <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span>
61        </a>
62{/if}{/strip}
63{strip}{if isset($U_SET_AS_REPRESENTATIVE)}
64        <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button sameLayer" rel="nofollow">
65                <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span>
66        </a>
67{/if}{/strip}
68{strip}{if isset($U_ADMIN)}
69        <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
70                <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'Edit'|@translate}</span>
71        </a>
72{/if}{/strip}
73{strip}{if isset($U_CADDIE)}{*caddie management BEGIN*}
74{footer_script}
75{literal}function addToCadie(aElement, rootUrl, id)
76{
77if (aElement.disabled) return;
78aElement.disabled=true;
79var y = new PwgWS(rootUrl);
80y.callService(
81        "pwg.caddie.add", {image_id: id} ,
82        {
83                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
84                onSuccess: function(result) { aElement.disabled = false; }
85        }
86        );
87}{/literal}
88{/footer_script}
89        <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">
90                <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span>
91        </a>
92{/if}{/strip}{*caddie management END*}
93</div>
94</div>{*<!-- imageToolBar -->*}
95
96<div id="theImageAndInfos">
97<div id="theImage">
98{$ELEMENT_CONTENT}
99
100{if isset($COMMENT_IMG)}
101<p class="imageComment">{$COMMENT_IMG}</p>
102{/if}
103{if isset($U_SLIDESHOW_STOP)}
104<p>
105        [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
106</p>
107{/if}
108
109</div>{*<!-- no significant white space for elegant-->
110*}<div id="infoSwitcher"></div>{*<!-- no significant white space for elegant-->
111*}<div id="imageInfos">
112{if $DISPLAY_NAV_THUMB}
113        <div class="navThumbs">
114                {if isset($previous)}
115                        <a class="navThumb sameLayer" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
116                                <span class="thumbHover prevThumbHover"></span>
117                                <img src="{$previous.derivatives.square->get_url()}" alt="{$previous.TITLE}">
118                        </a>
119                {/if}
120                {if isset($next)}
121                        <a class="navThumb sameLayer" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
122                                <span class="thumbHover nextThumbHover"></span>
123                                <img src="{$next.derivatives.square->get_url()}" alt="{$next.TITLE}">
124                        </a>
125                {/if}
126        </div>
127{/if}
128
129
130<dl id="standard" class="imageInfoTable">
131{strip}
132        {if $display_info.author and isset($INFO_AUTHOR)}
133        <div id="Author" class="imageInfo">
134                <dt>{'Author'|@translate}</dt>
135                <dd>{$INFO_AUTHOR}</dd>
136        </div>
137        {/if}
138        {if $display_info.created_on and isset($INFO_CREATION_DATE)}
139        <div id="datecreate" class="imageInfo">
140                <dt>{'Created on'|@translate}</dt>
141                <dd>{$INFO_CREATION_DATE}</dd>
142        </div>
143        {/if}
144        {if $display_info.posted_on}
145        <div id="datepost" class="imageInfo">
146                <dt>{'Posted on'|@translate}</dt>
147                <dd>{$INFO_POSTED_DATE}</dd>
148        </div>
149        {/if}
150        {if $display_info.dimensions and isset($INFO_DIMENSIONS)}
151        <div id="Dimensions" class="imageInfo">
152                <dt>{'Dimensions'|@translate}</dt>
153                <dd>{$INFO_DIMENSIONS}</dd>
154        </div>
155        {/if}
156        {if $display_info.file}
157        <div id="File" class="imageInfo">
158                <dt>{'File'|@translate}</dt>
159                <dd>{$INFO_FILE}</dd>
160        </div>
161        {/if}
162        {if $display_info.filesize and isset($INFO_FILESIZE)}
163        <div id="Filesize" class="imageInfo">
164                <dt>{'Filesize'|@translate}</dt>
165                <dd>{$INFO_FILESIZE}</dd>
166        </div>
167        {/if}
168        {if $display_info.tags and isset($related_tags)}
169        <div id="Tags" class="imageInfo">
170                <dt>{'Tags'|@translate}</dt>
171                <dd>
172                {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
173                </dd>
174        </div>
175        {/if}
176        {if $display_info.categories and isset($related_categories)}
177        <div id="Categories" class="imageInfo ">
178                <dt>{'Albums'|@translate}</dt>
179                <dd>
180                        <ul>
181                                {foreach from=$related_categories item=cat}
182                                <li class="related_categories">{$cat}</li>
183                                {/foreach}
184                        </ul>
185                </dd>
186        </div>
187        {/if}
188        {if $display_info.visits}
189        <div id="Visits" class="imageInfo">
190                <dt>{'Visits'|@translate}</dt>
191                <dd>{$INFO_VISITS}</dd>
192        </div>
193        {/if}
194
195{if $display_info.rating_score and isset($rate_summary)}
196        <div id="Average" class="imageInfo">
197                <dt>{'Rating score'|@translate}</dt>
198                <dd>
199                {if $rate_summary.count}
200                  {if $rate_summary.count == 1}
201                    {assign var='rate_text' value='%d rate'|@translate}
202                  {else}
203                    {assign var='rate_text' value='%d rates'|@translate}
204                  {/if}
205                        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$pwg->sprintf($rate_text, $rate_summary.count)})</span>
206                {else}
207                        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
208                {/if}
209                </dd>
210        </div>
211{/if}
212
213{if isset($rating)}
214        <div id="rating" class="imageInfo">
215                <dt>
216                        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
217                </dt>
218                <dd>
219                        <form action="{$rating.F_ACTION}" method="post" id="rateForm" >
220                        {foreach from=$rating.marks item=mark name=rate_loop}
221                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
222                                <input type="button" name="rate" value="{$mark}" class="rateButton rateButtonSelected" title="{$mark}">
223                        {else}
224                                <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
225                        {/if}
226                        {/foreach}
227                        </form>
228                </dd>
229        </div>
230{/if}
231
232{if $display_info.privacy_level and isset($available_permission_levels)}
233        <div id="Privacy" class="imageInfoPri"><div class="relSwitchBox">
234                <dt><span class="noSlide" id="privacyLevelLink">{'Who can see this photo?'|@translate}</span></dt>
235                <dd>
236{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
237
238                        <div id="privacyLevelBox" class="switchBox" style="display:none" >
239                                {foreach from=$available_permission_levels item=label key=level}
240                                        <span id="levelCheck{$level}" class="switchCheck" {if $level != $current.level} style="display:none"{/if}>&#x2714; </span>
241                                        <span id="switchLevel{$level}" , {$current.id}, {$level})" class="noSlide privacy" data-root="{$ROOT_URL}" data-id="{$current.id}" data-level="{$level}" >{$label}</span><br>
242                                {/foreach}
243                        </div>
244
245                </dd>
246        </div></div>
247{/if}
248{/strip}
249</dl>
250
251{if isset($metadata)}
252<dl id="Metadata" class="imageInfoTable">
253{foreach from=$metadata item=meta}
254        <h3>{$meta.TITLE}</h3>
255        {foreach from=$meta.lines item=value key=label}
256                <div class="imageInfo">
257                        <dt>{$label}</dt>
258                        <dd>{$value}</dd>
259                </div>
260        {/foreach}
261{/foreach}
262</dl>
263{/if}
264</div>
265</div>
266
267{if isset($COMMENT_COUNT)}
268<div id="comContent">
269<div id="comments" {if (!isset($comment_add) && ($COMMENT_COUNT == 0))}class="noCommentContent"{else}class="commentContent"{/if}><div id="commentsSwitcher"></div>
270        <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
271
272        <div id="pictureComments">
273                {if isset($comment_add)}
274                <div id="commentAdd" {if isset ($slideEasyCaptcha)}data-now={$smarty.now}{/if}>
275                        <h4>{'Add a comment'|@translate}</h4>
276                        <form method="post" action="{$comment_add.F_ACTION}" id="addComment">
277                                {if $comment_add.SHOW_AUTHOR}
278                                        <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
279                                        <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
280                                {/if}
281                                {if $comment_add.SHOW_EMAIL}
282                                        <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
283                                        <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p>
284                                {/if}
285                                <p><label for="website_url">{'Website'|@translate} :</label></p>
286                                <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
287                                <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p>
288                                <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
289                                <p><input type="hidden" name="key" value="{$comment_add.KEY}">
290                                        <input type="submit" value="{'Submit'|@translate}"></p>
291                        </form>
292                </div>
293                {/if}
294                {if isset($comments)}
295                <div id="pictureCommentList" >
296                        {if (($COMMENT_COUNT > 2) || !empty($navbar))}
297                                <div id="pictureCommentNavBar">
298                                        {if $COMMENT_COUNT > 2}
299                                                <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a>
300                                        {/if}
301                                        {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
302                                </div>
303                        {/if}
304                        {include file='comment_list.tpl'}
305                </div>
306                {/if}
307                <div style="clear:both"></div>
308        </div>
309
310</div>
311</div>
312{/if}{*comments*}
313
314{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
315
316</div>
Note: See TracBrowser for help on using the repository browser.