trugul-bot/views/index.erb

41 lines
1.4 KiB
Text
Raw Normal View History

2015-04-23 16:09:59 -04:00
<div class="col-md-9">
2015-04-26 10:17:53 -04:00
<div class="pull-right">
<%= will_paginate @raids, renderer: BootstrapPagination::Sinatra %>
</div>
2015-04-23 16:09:59 -04:00
<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
2015-04-26 10:17:53 -04:00
<div>
<%= will_paginate @raids, renderer: BootstrapPagination::Sinatra %>
</div>
2015-04-23 16:09:59 -04:00
</div>
<div class="col-md-3">
2015-04-26 10:25:02 -04:00
<div class="well well-lg text-center"><strong><%= Time.now.utc.strftime('%H:%M on %m-%d-%Y') %></strong></div>
2015-04-23 16:09:59 -04:00
<ul class="list-group">
2015-04-26 11:42:19 -04:00
<% @top20.each do |leader| %>
<li class="list-group-item"><%= leader.leader %><span class="pull-right"><small><%= leader.last_action.strftime('%H:%M on %m-%d-%Y') if leader.last_action %></small></li>
2015-04-23 16:09:59 -04:00
<% end %>
</div>