summaryrefslogtreecommitdiffstats
path: root/app/views/boards/index.html.erb
blob: ee43b3427e32265533d396661e04c0d335d51f77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<div class="contextual">
  <%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
              {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
              :class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
</div>

<h2><%= l(:label_board_plural) %></h2>

<table class="list boards">
  <thead><tr>
    <th><%= l(:label_board) %></th>
    <th><%= l(:label_topic_plural) %></th>
    <th><%= l(:label_message_plural) %></th>
    <th><%= l(:label_message_last) %></th>
  </tr></thead>
  <tbody>
<% Board.board_tree(@boards) do |board, level| %>
  <% if level > 0 %>
    <tr class="board idnt idnt-<%= level %>">
  <% else %>
    <tr class="board">
  <% end %>
    <td class="name">
      <%= link_to icon_with_label('comment', board.name), project_board_path(board.project, board), :class => "board icon icon-comment" %>
      <p class="description"><%= board.description %></p>
    </td>
    <td class="topic-count"><%= board.topics_count %></td>
    <td class="message-count"><%= board.messages_count %></td>
    <td class="last-message">
      <% if board.last_message %>
      <%= authoring board.last_message.created_on, board.last_message.author %><br />
      <%= link_to_message board.last_message %>
      <% end %>
    </td>
  </tr>
<% end %>
  </tbody>
</table>

<% other_formats_links do |f| %>
  <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_messages => 1, :key => User.current.atom_key} %>
<% end %>

<% content_for :header_tags do %>
  <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :show_messages => 1, :key => User.current.atom_key}) %>
<% end %>

<% html_title l(:label_board_plural) %>