index.html.erb 1022 B

1234567891011121314151617181920212223242526272829303132
  1. <div class='table-responsive'>
  2. <table class='table table-striped logs'>
  3. <tr>
  4. <th>Message</th>
  5. <th>When</th>
  6. <th></th>
  7. </tr>
  8. <% @logs.each do |log| %>
  9. <tr>
  10. <td><%= truncate log.message, :length => 200, :omission => "..." %></td>
  11. <td><%= time_ago_in_words log.created_at %> ago</td>
  12. <td>
  13. <div class="btn-group btn-group-xs">
  14. <% if log.inbound_event_id.present? %>
  15. <%= link_to 'Event In', event_path(log.inbound_event), class: "btn btn-default" %>
  16. <% else %>
  17. <%= link_to 'Event In', '#', class: "btn btn-default disabled" %>
  18. <% end %>
  19. <% if log.outbound_event_id.present? %>
  20. <%= link_to 'Event Out', event_path(log.outbound_event), class: "btn btn-default" %>
  21. <% else %>
  22. <%= link_to 'Event Out', '#', class: "btn btn-default disabled" %>
  23. <% end %>
  24. </div>
  25. </td>
  26. </tr>
  27. <% end %>
  28. </table>
  29. </div>