<h3>
  Flag logs
  <% if @individual_post.present? %>
    for <%= link_to @individual_post.title, "/post/#{@individual_post.id}" %>
  <% end %>
</h3>

<% if @individual_post.nil? %>
  <%= line_chart FlagLog.group_by_day(:created_at, :range => 1.month.ago.to_date..Time.now).count %>
<% end %>

<table class="table">
  <tr>
    <th>User</th>
    <th>Post</th>
    <th>Result</th>
  </tr>

  <% @flag_logs.each do |log| %>
    <tr>
      <td><%= log.user.try(:username) %></td>
      <%= render "posts/post", :post => log.post, :wrap_in_tr => false %>
      <td class='<%= "success" if log.success %>'><%= log.success ? "Success" : "Fail" %><%= " (dry run)" if log.is_dry_run %><%= " - #{log.error_message}" if log.error_message.present? %></td>
    </tr>
  <% end %>
</table>

<div class="text-center">
  <%= will_paginate @flag_logs, renderer: BootstrapPagination::Rails %>
</div>

<h3>
  Flag logs
  <% if @individual_post.present? %>
    for <%= link_to @individual_post.title, "/post/#{@individual_post.id}" %>
  <% end %>
</h3>

<% if @individual_post.nil? %>
  <%= line_chart FlagLog.group_by_day(:created_at, :range => 1.month.ago.to_date..Time.now).count %>
<% end %>

<table class="table">
  <tr>
    <th>User</th>
    <th>Post</th>
    <th>Result</th>
  </tr>

  <% @flag_logs.each do |log| %>
    <tr>
      <td><%= log.user.try(:username) %></td>
      <%= render "posts/post", :post => log.post, :wrap_in_tr => false %>
      <td class='<%= "success" if log.success %>' title="<%= log.error_message %>"><%= log.success ? "Success" : "Fail" %><%= " (dry run)" if log.is_dry_run %></td>
    </tr>
  <% end %>
</table>

<div class="text-center">
  <%= will_paginate @flag_logs, renderer: BootstrapPagination::Rails %>
</div>

Move flag log error message to tooltip
Move flag log error message to tooltip
