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

Last change on this file since 12882 was 12881, checked in by rvelices, 13 years ago

revert css name change from previous commit

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