1 | {if isset( $COMMENT_IMG )} |
---|
2 | <div id="tab-desc" class="image-metadata-tab"> |
---|
3 | {$COMMENT_IMG} |
---|
4 | </div> |
---|
5 | {/if} |
---|
6 | |
---|
7 | <div id="tab-meta" class="image-metadata-tab"> |
---|
8 | <dl id="standard" class="imageInfoTable dl-horizontal"> |
---|
9 | {strip} |
---|
10 | {if $display_info.author and isset($INFO_AUTHOR)} |
---|
11 | <dt id="Author" class="imageInfo">{'Author'|@translate}</dt> |
---|
12 | <dd>{$INFO_AUTHOR}</dd> |
---|
13 | {/if} |
---|
14 | {if $display_info.created_on and isset($INFO_CREATION_DATE)} |
---|
15 | <dt id="datecreate">{'Created on'|@translate}</dt> |
---|
16 | <dd>{$INFO_CREATION_DATE}</dd> |
---|
17 | {/if} |
---|
18 | {if $display_info.posted_on} |
---|
19 | <dt id="datepost">{'Posted on'|@translate}</dt> |
---|
20 | <dd>{$INFO_POSTED_DATE}</dd> |
---|
21 | {/if} |
---|
22 | {if $display_info.dimensions and isset($INFO_DIMENSIONS)} |
---|
23 | <dt id="Dimensions">{'Dimensions'|@translate}</dt> |
---|
24 | <dd>{$INFO_DIMENSIONS}</dd> |
---|
25 | {/if} |
---|
26 | {if $display_info.file} |
---|
27 | <dt id="File">{'File'|@translate}</dt> |
---|
28 | <dd>{$INFO_FILE}</dd> |
---|
29 | {/if} |
---|
30 | {if $display_info.filesize and isset($INFO_FILESIZE)} |
---|
31 | <dt id="Filesize">{'Filesize'|@translate}</dt> |
---|
32 | <dd>{$INFO_FILESIZE}</dd> |
---|
33 | {/if} |
---|
34 | {if $display_info.categories and isset($related_categories)} |
---|
35 | <dt id="Categories">{'Albums'|@translate}</dt> |
---|
36 | <dd> |
---|
37 | <ul> |
---|
38 | {foreach from=$related_categories item=cat} |
---|
39 | <li>{$cat}</li> |
---|
40 | {/foreach} |
---|
41 | </ul> |
---|
42 | </dd> |
---|
43 | {/if} |
---|
44 | {if $display_info.visits} |
---|
45 | <dt id="Visits">{'Visits'|@translate}</dt> |
---|
46 | <dd>{$INFO_VISITS}</dd> |
---|
47 | {/if} |
---|
48 | {if $display_info.rating_score and isset($rate_summary)} |
---|
49 | <dt id="Average">{'Rating score'|@translate}</dt> |
---|
50 | <dd> |
---|
51 | {if $rate_summary.count} |
---|
52 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span> |
---|
53 | {else} |
---|
54 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
55 | {/if} |
---|
56 | </dd> |
---|
57 | {/if} |
---|
58 | |
---|
59 | {if isset($rating)} |
---|
60 | <dt id="rating" > |
---|
61 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
62 | </dt> |
---|
63 | <dd> |
---|
64 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
65 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
66 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
67 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
68 | {else} |
---|
69 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
70 | {/if} |
---|
71 | {/foreach} |
---|
72 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
73 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
74 | {footer_script} |
---|
75 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
76 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
77 | onSuccess : function(rating) {ldelim} |
---|
78 | var e = document.getElementById("updateRate"); |
---|
79 | if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; |
---|
80 | e = document.getElementById("ratingScore"); |
---|
81 | if (e) e.innerHTML = rating.score; |
---|
82 | e = document.getElementById("ratingCount"); |
---|
83 | if (e) {ldelim} |
---|
84 | if (rating.count == 1) {ldelim} |
---|
85 | e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
86 | } else {ldelim} |
---|
87 | e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
88 | } |
---|
89 | {rdelim} |
---|
90 | {rdelim}{rdelim} ); |
---|
91 | {/footer_script} |
---|
92 | {/strip} |
---|
93 | </form> |
---|
94 | </dd> |
---|
95 | {/if} |
---|
96 | |
---|
97 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
98 | <dt id="Privacy">{'Who can see this photo?'|@translate}</dt> |
---|
99 | <dd> |
---|
100 | <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a> |
---|
101 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
102 | {footer_script require='jquery'}{strip} |
---|
103 | function setPrivacyLevel(id, level){ |
---|
104 | (new PwgWS('{$ROOT_URL}')).callService( |
---|
105 | "pwg.images.setPrivacyLevel", { image_id:id, level:level}, |
---|
106 | { |
---|
107 | method: "POST", |
---|
108 | onFailure: function(num, text) { alert(num + " " + text); }, |
---|
109 | onSuccess: function(result) { |
---|
110 | jQuery('#privacyLevelBox .switchCheck').css('visibility','hidden'); |
---|
111 | jQuery('#switchLevel'+level).prev('.switchCheck').css('visibility','visible'); |
---|
112 | jQuery('#privacyLevelLink').text(jQuery('#switchLevel'+level).text()); |
---|
113 | } |
---|
114 | } |
---|
115 | ); |
---|
116 | } |
---|
117 | (SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox"); |
---|
118 | {/strip}{/footer_script} |
---|
119 | <div id="privacyLevelBox" class="switchBox" style="display:none"> |
---|
120 | {foreach from=$available_permission_levels item=label key=level} |
---|
121 | <span class="switchCheck"{if $level != $current.level} style="visibility:hidden"{/if}>✔ </span> |
---|
122 | <a id="switchLevel{$level}" href="javascript:setPrivacyLevel({$current.id},{$level})">{$label}</a><br> |
---|
123 | {/foreach} |
---|
124 | </div> |
---|
125 | </dd> |
---|
126 | {/if} |
---|
127 | {/strip} |
---|
128 | </dl> |
---|
129 | </div> |
---|
130 | |
---|
131 | {if isset($metadata)} |
---|
132 | <div id="tab-exif" class="image-metadata-tab"> |
---|
133 | <dl id="Metadata" class="imageInfoTable dl-horizontal"> |
---|
134 | {foreach from=$metadata item=meta} |
---|
135 | {foreach from=$meta.lines item=value key=label} |
---|
136 | <dt>{$label}</dt> |
---|
137 | <dd>{$value}</dd> |
---|
138 | {/foreach} |
---|
139 | {/foreach} |
---|
140 | </dl> |
---|
141 | </div> |
---|
142 | {/if} |
---|
143 | |
---|
144 | {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))} |
---|
145 | <div id="tab-tags" class="image-metadata-tab"> |
---|
146 | {if ($greydragon.hasUserTags)}<table id="TagsTable"><tr id="Tags" ><td class="label"></td><td class="value">{/if} |
---|
147 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
148 | {if ($greydragon.hasUserTags)}<div class="tags-edit-marker"><span class="fas fa-edit"></span> {'Edit'|@translate}</div></td></tr></table>{/if} |
---|
149 | </div> |
---|
150 | {/if} |
---|
151 | |
---|
152 | {if isset($COMMENT_COUNT)} |
---|
153 | <div id="tab-comment" class="image-metadata-tab"> |
---|
154 | <div id="comments" {if (!isset($comment_add) && ($COMMENT_COUNT == 0))}class="noCommentContent"{else}class="commentContent"{/if}> |
---|
155 | <div id="pictureComments"> |
---|
156 | {if isset($comment_add)} |
---|
157 | <div id="commentAdd"> |
---|
158 | <h4>{'Add a comment'|@translate}</h4> |
---|
159 | <form method="post" action="{$comment_add.F_ACTION}" id="addComment"> |
---|
160 | {if $comment_add.SHOW_AUTHOR} |
---|
161 | <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
162 | <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p> |
---|
163 | {/if} |
---|
164 | {if $comment_add.SHOW_EMAIL} |
---|
165 | <p><label for="email">{'Email address'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
166 | <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p> |
---|
167 | {/if} |
---|
168 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
169 | <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p> |
---|
170 | <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p> |
---|
171 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
172 | <p><input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
173 | <input type="submit" value="{'Submit'|@translate}"></p> |
---|
174 | </form> |
---|
175 | </div> |
---|
176 | {else} |
---|
177 | {if ($COMMENT_COUNT == 0)}<p>{'No Comments Allowed'|@translate}</p>{/if} |
---|
178 | {/if} |
---|
179 | {if isset($comments)} |
---|
180 | <div id="pictureCommentList"> |
---|
181 | {if (($COMMENT_COUNT > 2) || !empty($navbar))} |
---|
182 | <div id="pictureCommentNavBar"> |
---|
183 | {if $COMMENT_COUNT > 2} |
---|
184 | <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a> |
---|
185 | {/if} |
---|
186 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
187 | </div> |
---|
188 | {/if} |
---|
189 | {include file='comment_list.tpl'} |
---|
190 | </div> |
---|
191 | {/if} |
---|
192 | </div> |
---|
193 | </div> |
---|
194 | </div> |
---|
195 | {/if} |
---|
196 | |
---|
197 | {if isset($ppppp_e_mail)} |
---|
198 | <div id="tab-cart" class="image-metadata-tab"> |
---|
199 | {if isset($COMMENT_IMG)} |
---|
200 | {/if} |
---|
201 | </div> |
---|
202 | {/if} |
---|