moving intranet buttons to environment.rb for easier configuration
[boxroom-stian.git] / app / views / admin_tool / show_log.rhtml
blobd114ea38d8101d4f732b4d99584dfa77389607ff
1   <p class="title">
2   <%if @name.nil?%>
3     Latest system events</p>
4   <%else%>  
5     Latest events for <i><%=@name%></i>
6   <%end%></p>
7 <table class="grid">
8       <th>Time</th>
9         <th>User</th>
10         <th>Action</th>
11         <th>File/Folder</th>
12       </th>
13   
14   <% for usage in @usages %>
15     <% cyc = cycle('even', 'odd') %>    
16     <tr class="<%=cyc%>">
17         <td valign=top><%= usage.download_date_time.to_formatted_s(:short)%></td>
18         <td valign=top><%= usage.user.name if usage.user %></td>
19         <td valign=top><%=usage.action%></td>
20         <td valign=top>
21         <%if !usage.myfile.nil? && !usage.myfile.folder.nil? %>
22           <%= path(usage.myfile.folder, :link_to_self)%>/<%=link_to h(usage.myfile.filename), :controller => 'file', :action => 'download', :id => usage.myfile.id %>
23         <%elsif !usage.folder.nil?%>
24           <%=path(usage.folder,true)%>
25         <%else%>
26           <%=usage.filename%>
27         
28         <%end%>
29 <%unless usage.comment.nil?%><br><i><%=usage.comment %></i><%end%>
30 </td>
31     </tr>
32 <% end %>
33 </table>
34 <%= link_to 'Previous page', { :page => @pages.current.previous } if @pages.current.previous %>
35 <%= link_to 'Next page', { :page => @pages.current.next } if @pages.current.next %>