More bossfight
This commit is contained in:
parent
e205cda124
commit
6069583960
2 changed files with 7 additions and 4 deletions
2
app.rb
2
app.rb
|
@ -35,7 +35,7 @@ get '/bossfight/?:username' do
|
|||
@username = params['username'] ? params['username'] : 'mafiaman'
|
||||
user_raids = Raid.for_user(@username)
|
||||
@first_negative = user_raids.first_negative
|
||||
@soldiers_lost_to_date = user_raids.soldiers_lost_to_date(@first_negative.created_at)
|
||||
@soldiers_killed = user_raids.soldiers_lost_to_date(@first_negative.created_at)
|
||||
@contributers = user_raids.contributors(@first_negative.created_at)
|
||||
|
||||
erb :bossfight
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
<h2>Bossfight: <%= @username %></h2>
|
||||
|
||||
<div class="col-md-3">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item text-right">
|
||||
<span class="pull-left"><strong>Target:</strong></span>
|
||||
<%= @username %>
|
||||
</li>
|
||||
<li class="list-group-item text-right">
|
||||
<span class="pull-left"><strong>Kill Date:</strong></span>
|
||||
<%= @first_negative.created_at.strftime('%H:%M on %m-%d-%Y') if @first_negative %>
|
||||
</li>
|
||||
<li class="list-group-item text-right">
|
||||
<span class="pull-left"><strong>Killing Blow:</strong></span>
|
||||
<%= @first_negative.attacker if @first_negative %>
|
||||
</li>
|
||||
<li class="list-group-item text-right">
|
||||
<span class="pull-left"><strong>Soliders Killed:</strong></span>
|
||||
<%= readable_number(@soldiers_lost_to_date) if @soliders_lost_to_date %>
|
||||
<%= readable_number(@soldiers_killed) if @soldiers_killed %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue