Changeset 11839 for trunk/themes/default/template/picture.tpl
- Timestamp:
- Jul 26, 2011, 9:04:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/template/picture.tpl
r11827 r11839 197 197 {if $display_info.average_rate and isset($rate_summary)} 198 198 <tr id="Average"> 199 <td class="label">{'Rating '|@translate}</td>200 <td class="value" id="ratingSummary">199 <td class="label">{'Rating score'|@translate}</td> 200 <td class="value"> 201 201 {if $rate_summary.count} 202 {assign var='rate_text' value='%.2f (rated %d times)'|@translate} 203 {$pwg->sprintf($rate_text, $rate_summary.score, $rate_summary.count, $rate_summary.average)} 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> 204 203 {else} 205 {'no rate'|@translate}204 <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> 206 205 {/if} 207 206 </td> … … 229 228 var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; 230 229 _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, 231 updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), 232 ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary"){rdelim} ); 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} ); 233 238 {/footer_script} 234 239 {/strip}
Note: See TracChangeset
for help on using the changeset viewer.