Changeset 13555 for extensions/simple_themes/simple/template/picture.tpl
- Timestamp:
- Mar 14, 2012, 2:50:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/simple_themes/simple/template/picture.tpl
r13554 r13555 6 6 {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} 7 7 <div id="content"> 8 {if isset($MENUBAR)}{$MENUBAR}{/if} 9 8 10 {if isset($errors)} 9 11 <div class="errors"> … … 15 17 </div> 16 18 {/if} 19 17 20 {if isset($infos)} 18 21 <div class="infos"> … … 24 27 </div> 25 28 {/if} 29 30 <div id="theImage"> 31 {$ELEMENT_CONTENT} 32 {if isset($COMMENT_IMG)} 33 <p>{$COMMENT_IMG}</p> 34 {/if} 35 </div> <!-- theImage --> 36 26 37 <div id="imageInfoBar"> 27 38 <div id="imageToolBar"> … … 113 124 <dd>{$INFO_VISITS}</dd> 114 125 {/if} 115 {if $display_info.average_rate} 116 {ifisset($rate_summary)}117 <dt>{'Average rate'|@translate}</dt>118 119 120 {assign var='rate_text' value='%.2f (rated %d times)'|@translate } 121 {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count)}122 {else} 123 {'no rate'|@translate}124 {/if} 125 </dd> 126 {/if} 126 127 {if $display_info.rating_score and isset($rate_summary)} 128 <dt id="Average">{'Rating score'|@translate}</dt> 129 <dd id="ratingSummary"> 130 {if $rate_summary.count} 131 <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> 132 {else} 133 <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> 134 {/if} 135 </dd> 136 {/if} 137 127 138 {if isset($rating)} 128 139 <dt><span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span></dt> … … 131 142 <div> 132 143 {foreach from=$rating.marks item=mark name=rate_loop} 133 {if !$smarty.foreach.rate_loop.first} | {/if}134 144 {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} 135 145 <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" /> … … 138 148 {/if} 139 149 {/foreach} 140 <script type="text/javascript"> 141 makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', 142 image_id: {$current.id}, 143 updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", 144 updateRateElement: document.getElementById("updateRate"), 145 ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", 146 ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} ); 147 </script> 150 {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} 151 {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} 152 {footer_script} 153 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 154 _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, 155 onSuccess : function(rating) {ldelim} 156 var e = document.getElementById("updateRate"); 157 if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; 158 e = document.getElementById("ratingScore"); 159 if (e) e.innerHTML = rating.score; 160 e = document.getElementById("ratingCount"); 161 if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); 162 {rdelim}{rdelim} ); 163 {/footer_script} 164 {/strip} 148 165 </div> 149 166 </form> 150 167 </dd> 151 168 {/if} 152 {/if}153 169 </dl> 154 170 </div> <!-- imageInfos --> 155 171 </div> 156 <div id="theImage">157 {$ELEMENT_CONTENT}158 {if isset($COMMENT_IMG)}159 <p>{$COMMENT_IMG}</p>160 {/if}161 </div> <!-- theImage -->162 172 <div style="clear: both;"></div> 163 173
Note: See TracChangeset
for help on using the changeset viewer.