source: branches/2.3/themes/default/template/picture.tpl @ 12480

Revision 12480, 10.5 KB checked in by rvelices, 8 years ago (diff)

feature 2477: Remove unused CSS / html elements from version 2.3 (merge from trunk)

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