2012-07-31 21:17:52 +04:00
|
|
|
<%= board_breadcrumb(@board) %>
|
2008-03-27 21:41:42 +03:00
|
|
|
|
2007-05-13 21:09:56 +04:00
|
|
|
<div class="contextual">
|
2012-12-22 19:57:07 +04:00
|
|
|
<%= link_to l(:label_message_new),
|
|
|
|
new_board_message_path(@board),
|
|
|
|
:class => 'icon icon-add',
|
|
|
|
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
|
2007-08-29 20:52:35 +04:00
|
|
|
<%= watcher_tag(@board, User.current) %>
|
2007-05-13 21:09:56 +04:00
|
|
|
</div>
|
|
|
|
|
2007-09-24 23:54:48 +04:00
|
|
|
<div id="add-message" style="display:none;">
|
2012-12-22 19:57:07 +04:00
|
|
|
<% if User.current.allowed_to?(:add_messages, @board.project) %>
|
|
|
|
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h2>
|
|
|
|
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
2007-09-24 23:54:48 +04:00
|
|
|
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
|
|
|
<p><%= submit_tag l(:button_create) %>
|
2012-12-22 19:57:07 +04:00
|
|
|
<%= preview_link(preview_board_message_path(@board), 'message-form') %> |
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
2007-09-24 23:54:48 +04:00
|
|
|
<% end %>
|
2008-03-07 20:49:44 +03:00
|
|
|
<div id="preview" class="wiki"></div>
|
2009-05-26 00:38:59 +04:00
|
|
|
<% end %>
|
2007-09-24 23:54:48 +04:00
|
|
|
</div>
|
|
|
|
|
2007-05-13 21:09:56 +04:00
|
|
|
<h2><%=h @board.name %></h2>
|
2008-10-25 08:46:21 +04:00
|
|
|
<p class="subtitle"><%=h @board.description %></p>
|
2007-05-13 21:09:56 +04:00
|
|
|
|
2007-09-22 17:17:49 +04:00
|
|
|
<% if @topics.any? %>
|
2007-11-24 15:25:07 +03:00
|
|
|
<table class="list messages">
|
2007-05-13 21:09:56 +04:00
|
|
|
<thead><tr>
|
|
|
|
<th><%= l(:field_subject) %></th>
|
|
|
|
<th><%= l(:field_author) %></th>
|
2008-12-24 13:03:13 +03:00
|
|
|
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
|
|
|
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
|
|
|
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
2011-09-17 06:55:14 +04:00
|
|
|
</tr></thead>
|
2007-05-13 21:09:56 +04:00
|
|
|
<tbody>
|
|
|
|
<% @topics.each do |topic| %>
|
2007-11-24 15:25:07 +03:00
|
|
|
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
2012-12-22 19:57:07 +04:00
|
|
|
<td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
2012-07-29 15:28:22 +04:00
|
|
|
<td class="author"><%= link_to_user(topic.author) %></td>
|
|
|
|
<td class="created_on"><%= format_time(topic.created_on) %></td>
|
|
|
|
<td class="reply-count"><%= topic.replies_count %></td>
|
2007-11-24 15:25:07 +03:00
|
|
|
<td class="last_message">
|
2007-05-13 21:09:56 +04:00
|
|
|
<% if topic.last_reply %>
|
2007-11-24 15:25:07 +03:00
|
|
|
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
|
2007-05-13 21:09:56 +04:00
|
|
|
<%= link_to_message topic.last_reply %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2007-12-29 14:36:30 +03:00
|
|
|
<p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p>
|
2007-09-22 17:17:49 +04:00
|
|
|
<% else %>
|
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
|
|
<% end %>
|
2008-06-29 13:08:58 +04:00
|
|
|
|
2009-04-24 20:51:07 +04:00
|
|
|
<% other_formats_links do |f| %>
|
2011-09-17 12:43:14 +04:00
|
|
|
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
2009-04-24 20:51:07 +04:00
|
|
|
<% end %>
|
|
|
|
|
2011-10-02 22:45:17 +04:00
|
|
|
<% html_title @board.name %>
|
2009-04-24 20:51:07 +04:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
|
|
|
<% end %>
|