Skip to content

Commit

Permalink
Changes per feedback from @j-f1
Browse files Browse the repository at this point in the history
1. Restore table column header back to 'Reason' (only for the active
reason table)
2. Remove conditionals to add classes on `<tr> elements of tables
because the reasons are always active or inactive within a table.
  • Loading branch information
serixscorpio committed Oct 13, 2017
1 parent 4f5c72f commit 61cb9c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<table class="table sortable-table" style="margin-top:50px">
<thead>
<tr>
<th>Active Reason</th>
<th>Reason</th>
<th>Number caught</th>
<th class='no-sort'>Last caught</th>
<th>Accuracy</th>
Expand All @@ -17,7 +17,7 @@

<tbody>
<% @active_reasons.each do |reason| %>
<tr class="<%= "active text-muted inactive-reason" if reason.inactive %>">
<tr class="">
<td><%= link_to reason.reason_name, "/reason/#{reason.id}" %></td>
<td data-sort-value="<%= reason.post_count %>"><%= reason.post_count %></td>
<td><%= truncate((reason.last_post_title.nil? ? reason.posts.last.title : reason.last_post_title), :length => 40, :seperator => ' ') %></td>
Expand All @@ -41,7 +41,7 @@

<tbody>
<% @inactive_reasons.each do |reason| %>
<tr class="<%= "active text-muted inactive-reason" if reason.inactive %>">
<tr class="active text-muted inactive-reason">
<td><%= link_to reason.reason_name, "/reason/#{reason.id}" %></td>
<td data-sort-value="<%= reason.post_count %>"><%= reason.post_count %></td>
<td><%= truncate((reason.last_post_title.nil? ? reason.posts.last.title : reason.last_post_title), :length => 40, :seperator => ' ') %></td>
Expand Down

0 comments on commit 61cb9c5

Please sign in to comment.