Project

General

Profile

Patch #12664 » _forums.html.erb

 
1
<h3><%=l(:label_message_plural)%></h3>
2

    
3
<% active_msgs = Message.joins(:board).where("#{Board.table_name}.project_id IN (#{@user.projects.collect{|m| m.id}.join(',')})").limit(5).order("id DESC") %>
4
<table class=list boards">
5
  <thead>
6
        <tr><th><%= l(:label_board) %></th><th><%= l(:field_subject) %></th><th><%= l(:field_author) %></th><th><%= l(:field_created_on) %></th></tr>
7
  </thead>
8
  <tbody>
9
        <% active_msgs.each do |active_msgs| %>
10
                <tr class="<%= cycle 'odd', 'even' %>">
11
		<td><%= link_to h(active_msgs.board.name), {:controller => 'boards', :action => 'show', :id => active_msgs.board.id, :project_id => active_msgs.board.project}, :class => "board" %></td>
12
		<td><%= link_to h(active_msgs.subject), { :controller => 'messages', :action => 'show', :board_id => active_msgs.board.id, :id => active_msgs.id, :r => active_msgs, :anchor => "message-#{active_msgs.id}" } %>
13
                <td><%=h active_msgs.author %></td>
14
                <td><%= format_time(active_msgs.created_on) %></td>
15
                </tr>
16
        <% end %>
17
  </tbody>
18
</table>
(1-1/5)