layout the table of shame
This commit is contained in:
parent
8f55d915e8
commit
eb2c85aa9f
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
// Place all the styles related to the pages controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
.shame-percentage { text-align: right }
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
%h2 Cute Little Statistics
|
||||
%p None here yet.
|
||||
%h2 Wall of Shame
|
||||
%table
|
||||
%table.pure-table
|
||||
%thead
|
||||
%th People who should be ashamed
|
||||
%th Part of total debt to Zeus
|
||||
%th Shame on
|
||||
%th Contribution to Zeus' lack of money
|
||||
%tbody
|
||||
- @statistics.shameful_users.each do |user|
|
||||
%tr
|
||||
%td= "Shame on #{user.name}"
|
||||
%td.shameful-person= user.name
|
||||
// Won't divide by zero because there won't be any users with
|
||||
// a shameful debt if the total debt is zero.
|
||||
%td= "#{100 * user.balance / @statistics.total_debt}%"
|
||||
%td.shame-percentage= "#{100 * user.balance / @statistics.total_debt}%"
|
||||
|
|
Loading…
Reference in a new issue