source: trunk/themes/default/template/picture.tpl @ 13115

Last change on this file since 13115 was 13115, checked in by rvelices, 12 years ago

improvement of picture title on picture page, drop boxes on index page ...
sharpening uses a zider scale range

  • Property svn:eol-style set to LF
File size: 10.4 KB
Line 
1{* Example of resizeable
2{include file='include/autosize.inc.tpl'}
3*}
4{if isset($MENUBAR)}
5{$MENUBAR}
6<div id="content" class="contentWithMenu">
7{/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} {$LEVEL_SEPARATOR} <h2>{$current.TITLE}</h2>
16        </div>
17        <div class="imageNumber">{$PHOTO}</div>
18</div>
19
20<div id="imageToolBar">
21<div class="actionButtons">
22{strip}{if isset($U_SLIDESHOW_START)}
23        <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
24                <span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
25        </a>
26{/if}{/strip}
27{strip}{if isset($U_METADATA)}
28        <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
29                <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
30        </a>
31{/if}{/strip}
32{strip}{if isset($current.U_DOWNLOAD)}
33        <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
34                <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'Download'|@translate}</span>
35        </a>
36{/if}{/strip}
37{if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
38{strip}{if isset($favorite)}
39        <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">
40                <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span>
41        </a>
42{/if}{/strip}
43{strip}{if isset($U_SET_AS_REPRESENTATIVE)}
44        <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
45                <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span>
46        </a>
47{/if}{/strip}
48{strip}{if isset($U_ADMIN)}
49        <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
50                <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'Edit'|@translate}</span>
51        </a>
52{/if}{/strip}
53{strip}{if isset($U_CADDIE)}{*caddie management BEGIN*}
54{footer_script}
55{literal}function addToCadie(aElement, rootUrl, id)
56{
57if (aElement.disabled) return;
58aElement.disabled=true;
59var y = new PwgWS(rootUrl);
60y.callService(
61        "pwg.caddie.add", {image_id: id} ,
62        {
63                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
64                onSuccess: function(result) { aElement.disabled = false; }
65        }
66        );
67}{/literal}
68{/footer_script}
69        <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">
70                <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span>
71        </a>
72{/if}{/strip}{*caddie management END*}
73</div>
74
75        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
76</div>{*<!-- imageToolBar -->*}
77
78<div id="theImage">
79{$ELEMENT_CONTENT}
80
81{if isset($COMMENT_IMG)}
82<p class="imageComment">{$COMMENT_IMG}</p>
83{/if}
84
85{if isset($U_SLIDESHOW_STOP)}
86<p>
87        [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
88</p>
89{/if}
90
91</div>
92
93<div id="imageInfos">
94{if $DISPLAY_NAV_THUMB}
95{if isset($previous)}
96<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
97        <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
98</a>
99{/if}
100{if isset($next)}
101<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
102        <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
103</a>
104{/if}
105{/if}
106
107<table id="standard" class="infoTable">
108{strip}
109        {if $display_info.author}
110        <tr id="Author">
111                <td class="label">{'Author'|@translate}</td>
112                <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
113        </tr>
114        {/if}
115        {if $display_info.created_on}
116        <tr id="datecreate">
117                <td class="label">{'Created on'|@translate}</td>
118                <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
119        </tr>
120        {/if}
121        {if $display_info.posted_on}
122        <tr id="datepost">
123                <td class="label">{'Posted on'|@translate}</td>
124                <td class="value">{$INFO_POSTED_DATE}</td>
125        </tr>
126        {/if}
127        {if $display_info.dimensions}
128        <tr id="Dimensions">
129                <td class="label">{'Dimensions'|@translate}</td>
130                <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
131        </tr>
132        {/if}
133        {if $display_info.file}
134        <tr id="File">
135                <td class="label">{'File'|@translate}</td>
136                <td class="value">{$INFO_FILE}</td>
137        </tr>
138        {/if}
139        {if $display_info.filesize}
140        <tr id="Filesize">
141                <td class="label">{'Filesize'|@translate}</td>
142                <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
143        </tr>
144        {/if}
145        {if $display_info.tags}
146        <tr id="Tags">
147                <td class="label">{'Tags'|@translate}</td>
148                <td class="value">
149                        {if isset($related_tags)}
150                                {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
151                        {/if}
152                </td>
153        </tr>
154        {/if}
155        {if $display_info.categories}
156        <tr id="Categories">
157                <td class="label">{'Albums'|@translate}</td>
158                <td class="value">
159                        {if isset($related_categories)}
160                        <ul>
161                                {foreach from=$related_categories item=cat}
162                                <li>{$cat}</li>
163                                {/foreach}
164                        </ul>
165                        {/if}
166                </td>
167        </tr>
168        {/if}
169        {if $display_info.visits}
170        <tr id="Visits">
171                <td class="label">{'Visits'|@translate}</td>
172                <td class="value">{$INFO_VISITS}</td>
173        </tr>
174        {/if}
175
176{if $display_info.rating_score and isset($rate_summary)}
177        <tr id="Average">
178                <td class="label">{'Rating score'|@translate}</td>
179                <td class="value">
180                {if $rate_summary.count}
181                        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
182                {else}
183                        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
184                {/if}
185                </td>
186        </tr>
187{/if}
188
189{if isset($rating)}
190        <tr id="rating">
191                <td class="label">
192                        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
193                </td>
194                <td class="value">
195                        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
196                        <div>
197                        {foreach from=$rating.marks item=mark name=rate_loop}
198                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
199                                <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
200                        {else}
201                                <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
202                        {/if}
203                        {/foreach}
204                        {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
205                        {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
206                        {footer_script}
207                                var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
208                                _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
209                                        onSuccess : function(rating) {ldelim}
210                                                var e = document.getElementById("updateRate");
211                                                if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
212                                                e = document.getElementById("ratingScore");
213                                                if (e) e.innerHTML = rating.score;
214                                                e = document.getElementById("ratingCount");
215                                                if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
216                                        {rdelim}{rdelim} );
217                        {/footer_script}
218                        {/strip}
219                        </div>
220                        </form>
221                </td>
222        </tr>
223{/if}
224
225{if $display_info.privacy_level and isset($available_permission_levels)}
226        <tr id="Privacy">
227                <td class="label">{'Who can see this photo?'|@translate}</td>
228                <td class="value">
229{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
230{footer_script}
231{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
232{
233selectElement.disabled = true;
234var y = new PwgWS(rootUrl);
235y.callService(
236        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
237        {
238                method: "POST",
239                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
240                onSuccess: function(result) { selectElement.disabled = false; }
241        }
242        );
243}{/literal}
244{/footer_script}
245        <select onchange="setPrivacyLevel(this, '{$ROOT_URL}', {$current.id}, this.options[selectedIndex].value)">
246                {foreach from=$available_permission_levels item=label key=level}
247                <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option>
248                {/foreach}
249        </select>
250        </td></tr>
251{/if}
252{/strip}
253</table>
254
255{if isset($metadata)}
256<table id="Metadata" class="infoTable2">
257{foreach from=$metadata item=meta}
258        <tr>
259                <th colspan="2">{$meta.TITLE}</th>
260        </tr>
261        {foreach from=$meta.lines item=value key=label}
262        <tr>
263                <td class="label">{$label}</td>
264                <td class="value">{$value}</td>
265        </tr>
266        {/foreach}
267{/foreach}
268</table>
269{/if}
270</div>
271
272{if isset($COMMENT_COUNT)}
273<div id="comments">
274        {if $COMMENT_COUNT > 0}
275                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
276        {if $COMMENT_COUNT > 2}
277                {'Sort order'|@translate}: <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow">{$COMMENTS_ORDER_TITLE}</a>
278        {/if}
279        {/if}
280        {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
281
282        {if isset($comments)}
283                {include file='comment_list.tpl'}
284        {/if}
285
286        {if isset($comment_add)}
287        <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
288        <fieldset>
289                <legend>{'Add a comment'|@translate}</legend>
290                {if $comment_add.SHOW_AUTHOR}
291                <label>{'Author'|@translate}<input type="text" name="author"></label>
292                {/if}
293                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
294                <input type="hidden" name="key" value="{$comment_add.KEY}">
295                <input type="submit" value="{'Submit'|@translate}">
296        </fieldset>
297        </form>
298        {/if}
299</div>
300{/if}{*comments*}
301
302{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
303
304{if isset($MENUBAR)}
305</div>
306{/if}
Note: See TracBrowser for help on using the repository browser.