<table class="table task-table">
  <thead>
    <tr>
      <th></th>
      <th></th>
      <th>Task name</th>
      <th>Time used</th>
      <th>Days Left</th>
      <% if current_user.admin? %>
        <th>User</th>
      <% end %>
      <th colspan="3" class="col-md-3"></th>
    </tr>
  </thead>

  <tbody>
    <% tasks.each do |task| %>
      <% if task.overdue? %>
        <tr class="priority<%= task.priority %> overdue">
      <% else %>
      <tr>
      <% end %>
        <td class="swatch priority<%= task.priority %>"></td>
	<td>
	  <% if task.archived? %>
	    <input type="checkbox" id="task-<%= task.id %>" checked />
	  <% else %>
	    <input type="checkbox" id="task-<%= task.id %>" />
	  <% end %>
	</td>
        <td><%= task.explicit_name %></td>
        <td><%= task.percent_time_used.round %>%</td>
        <td><%= days_left(task.days_left) %>
        <% if current_user.admin? %>
          <td><%= task.user.username %></td>
        <% end %>
        <td>
        <td>
          <div class="btn-container">
            <%= edit_btn edit_task_path(task) %>
            <%= delete_btn task %>
          </div>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<table class="table task-table">
  <thead>
    <tr>
      <th></th>
      <th></th>
      <th>Task name</th>
      <th>Time used</th>
      <th>Days Left</th>
      <% if current_user.admin? %>
        <th>User</th>
      <% end %>
      <th colspan="3" class="col-md-3"></th>
    </tr>
  </thead>

  <tbody>
    <% tasks.each do |task| %>
      <% if task.overdue? %>
        <tr class="priority<%= task.priority %> overdue">
      <% else %>
        <tr>
      <% end %>
        <td class="swatch priority<%= task.priority %>"></td>
	<td>
	  <% if task.archived? %>
	    <input type="checkbox" id="task-<%= task.id %>" checked />
	  <% else %>
	    <input type="checkbox" id="task-<%= task.id %>" />
	  <% end %>
	</td>
        <td><%= task.explicit_name %></td>
        <td><%= task.percent_time_used.round %>%</td>
        <td><%= days_left(task.days_left) %>
        <% if current_user.admin? %>
          <td><%= task.user.username %></td>
        <% end %>
        <td>
        <td>
          <div class="btn-container">
            <%= edit_btn edit_task_path(task) %>
            <%= delete_btn task %>
          </div>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

Indent conditional task table row tag
Indent conditional task table row tag
