beast rev 2066
[beast-modified.git] / vendor / plugins / exception_logger / views / logged_exceptions / _exceptions.rhtml
blob10c80a4a73f0ffc33705800ae1e6c8f4ae97ae8a
1 <div id="exceptions">
2 <div class="pages">
3   <%= link_to_remote 'Delete Visible', :url => { :action => 'destroy_all' }, :with => "ExceptionLogger.deleteAll()" %>
4 <% if @exception_pages.page_count > 1 %>
5 :: Pages: <strong><%= pagination_remote_links @exception_pages, :params => { :action => :index } %></strong>
6 <% end %>
7 </div>
9 <h1>Exceptions <%= "<span>(filtered)</span>" if filtered? %> </h1>
11 <table cellspacing="0">
13   <thead style="display:none;">
14     <tr>
15       <th>Exception</th>
16       <th>Date</th>
17     </tr>
18   </thead>
20   <tbody>
21   <% exceptions.each do |exc| -%>
22     <tr id="exception-<%= exc.id %>" class="<%= cycle("eor", "") %> exception">
23       <td>
24 <div class="expclass">
26 <%= link_to_remote "#{exc.exception_class} in #{exc.controller_action}", :url => { :action => 'show', :id => exc } %></div>
27 <span class="message"><%=h exc.message %></span>
29 </td>
30       <td nowrap=nowrap class="time">
31 <% 
32 if Date.today == exc.created_at.to_date 
33         if exc.created_at > Time.now - 4.hours
34         %>
35                 <%= time_ago_in_words(exc.created_at).gsub(/about /,"~ ") %> ago
36         <% else %>
37                 Today, <%= exc.created_at.strftime("%l:%M %p") %>
38         <% end %>
39 <% else %>
40 <%= exc.created_at.strftime("%b %d, %Y") %>
41 <% end %>
42 </td>
43       <td><%= link_to_remote 'Delete', {:url => { :action => 'destroy', :id => exc }} , :class => "util" %></td>
45     </tr>
46   <% end -%>
47   </tbody>
49 </table>
51 <% if @exception_pages.page_count > 1 %>
52 <div class="pages pages-bottom">
53 Pages: <strong><%= pagination_remote_links @exception_pages, :params => { :action => :index } %></strong>
54 </div>
55 <% end %>
58 </div> <!-- #exceptions -->