Skip to content

Commit

Permalink
Issue #526 adding duration , removing letter e
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Mamdouh authored and Muhammad Mamdouh committed May 14, 2014
1 parent dae6692 commit 6c5b5ba
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tutor/app/views/contests/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
style="width:180px;display:inline"><%= flash[:notice] %></div>
<% end %>

<h1> Your Contests </h1>

<table class="table table-striped table-bordered table-responsive">
<% unless @contests.blank? %>
<% if @contests %>
<tr>
<td>Contests</td>
<td>start date</td>
<td>start time</td>
<td>Start date</td>
<td>Start time</td>
<td>Duration</td>
<td>Actions</td>
</tr>
<% @contests.each do |contest| %>
Expand All @@ -24,6 +27,9 @@
<td>
<h4><%= contest.start_time %></h4>
</td>
<td>
<h4><%= contest.end_time.to_i - contest.start_time.to_i / (60*60) %></h4>
</td>
<% if current_lecturer || current_teaching_assistant %>
<td>
<h4><%= link_to "Edit", "/edit/"+contest.id.to_s %></h4>
Expand All @@ -34,7 +40,7 @@
:id => contest.id,:method => :get, class:
"btn btn-success" %></h4>
</td>
<% end %>e
<% end %>
</tr>
<% end %>
<% else %>
Expand Down

0 comments on commit 6c5b5ba

Please sign in to comment.