trugul-bot/views/index.erb

34 lines
1.1 KiB
Text
Raw Normal View History

2015-04-23 16:09:59 -04:00
<div class="col-md-9">
<table class="table table-striped table-hover table-bordered table-condensed">
<thead>
<tr>
<td>Attacker</td>
<td>Defender</td>
<td>Soldiers</td>
<td>Money</td>
<td>Time</td>
</tr>
</thead>
<tbody>
<% @raids.each do |raid| %>
<tr>
<td style="<%= player_style(raid.attacker) %>"><%= raid.attacker %></td>
<td style="<%= player_style(raid.defender) %>"><%= raid.defender %></td>
<td class="text-right"><%= readable_number(raid.soldiers) %></td>
2015-04-25 13:12:28 -04:00
<td class="text-right" style="<%=money_style(raid.money)%>"><%= readable_number(raid.money) %></td>
2015-04-23 16:09:59 -04:00
<td class="text-right"><%= raid.created_at.strftime('%H:%M on %m-%d-%Y') %></td>
</tr>
<% end %>
</tbody>
</table>
2015-04-26 09:42:23 -04:00
<%= paginate @raids %>
2015-04-23 16:09:59 -04:00
</div>
<div class="col-md-3">
<ul class="list-group">
2015-04-23 16:57:54 -04:00
<% @top20.each do |user| %>
2015-04-23 22:11:07 -04:00
<li class="list-group-item"><%= user[:user] %><span class="pull-right"><small><%= user[:date].strftime('%H:%M on %m-%d-%Y') if user[:date] %></small></li>
2015-04-23 16:09:59 -04:00
<% end %>
</div>