Bläddra i källkod

Add percent of total on top 10 feeds

Alexis Degrugillier 11 år sedan
förälder
incheckning
3d288eb170
3 ändrade filer med 4 tillägg och 0 borttagningar
  1. 1 0
      app/i18n/en.php
  2. 1 0
      app/i18n/fr.php
  3. 2 0
      app/views/stats/index.phtml

+ 1 - 0
app/i18n/en.php

@@ -56,6 +56,7 @@ return array (
 	'stats_entry_per_hour'		=> 'Per hour',
 	'stats_entry_per_day_of_week'	=> 'Per day of week',
 	'stats_entry_per_month'		=> 'Per month',
+	'stats_percent_of_total'	=> '%% of total',
     
 	'last_week'			=> 'Last week',
 	'last_month'			=> 'Last month',

+ 1 - 0
app/i18n/fr.php

@@ -56,6 +56,7 @@ return array (
 	'stats_entry_per_hour'		=> 'Par heure',
 	'stats_entry_per_day_of_week'	=> 'Par jour de la semaine',
 	'stats_entry_per_month'		=> 'Par mois',
+	'stats_percent_of_total'	=> '%% du total',
 
 	'last_week'			=> 'Depuis la semaine dernière',
 	'last_month'			=> 'Depuis le mois dernier',

+ 2 - 0
app/views/stats/index.phtml

@@ -48,6 +48,7 @@
 					<th><?php echo _t ('feed'); ?></th>
 					<th><?php echo _t ('category'); ?></th>
 					<th><?php echo _t ('stats_entry_count'); ?></th>
+					<th><?php echo _t ('stats_percent_of_total'); ?></th>
 				</tr>
 			</thead>
 			<tbody>
@@ -56,6 +57,7 @@
 						<td><a href="<?php echo _url('stats', 'repartition', 'id', $feed['id']); ?>"><?php echo $feed['name']; ?></a></td>
 						<td><?php echo $feed['category']; ?></td>
 						<td class="numeric"><?php echo formatNumber($feed['count']); ?></td>
+						<td class="numeric"><?php echo formatNumber($feed['count'] / $this->repartition['all_feeds']['total'] * 100, 1);?></td>
 					</tr>
 				<?php endforeach;?>
 			</tbody>