feature 2384: improve average rating calculation (still need to update language files)

git-svn-id: http://piwigo.org/svn/trunk@11827 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices 2011-07-25 18:04:50 +00:00
commit 4e4dc79e51
13 changed files with 115 additions and 101 deletions

View file

@ -415,7 +415,7 @@ jQuery(document).ready(function () {
<li>
<label>
<span class="property">{'Average rate'|@translate}</span>
<span class="property">{'Rating score'|@translate}</span>
<input type="checkbox" name="picture_informations[average_rate]" {if ($display.picture_informations.average_rate)}checked="checked"{/if}>
</label>
</li>

View file

@ -37,6 +37,7 @@
<tr class="throw">
<td>{'File'|@translate}</td>
<td>{'Number of rates'|@translate}</td>
<td>{'Rating score'|@translate}</td>
<td>{'Average rate'|@translate}</td>
<td>{'Sum of rates'|@translate}</td>
<td>{'Rate'|@translate}</td>
@ -48,6 +49,7 @@
<tr valign="top" class="{if $smarty.foreach.image.index is odd}row1{else}row2{/if}">
<td rowspan="{$image.NB_RATES_TOTAL+1}"><a href="{$image.U_URL}"><img src="{$image.U_THUMB}" alt="{$image.FILE}" title="{$image.FILE}"></a></td>
<td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.NB_RATES}/{$image.NB_RATES_TOTAL}</strong></td>
<td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.SCORE_RATE}</strong></td>
<td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.AVG_RATE}</strong></td>
<td rowspan="{$image.NB_RATES_TOTAL+1}" style="border-right: 1px solid;" ><strong>{$image.SUM_RATE}</strong></td>
</tr>