2008-03-27 21:41:42 +03:00
|
|
|
<%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %>
|
|
|
|
|
2007-05-13 21:09:56 +04:00
|
|
|
<div class="contextual">
|
2007-09-24 23:54:48 +04:00
|
|
|
<%= link_to_if_authorized l(:label_message_new),
|
|
|
|
{:controller => 'messages', :action => 'new', :board_id => @board},
|
|
|
|
:class => 'icon icon-add',
|
2009-01-22 19:34:54 +03:00
|
|
|
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
|
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;">
|
2009-05-26 00:38:59 +04:00
|
|
|
<% if authorize_for('messages', 'new') %>
|
2007-09-24 23:54:48 +04:00
|
|
|
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2>
|
2008-03-07 20:49:44 +03:00
|
|
|
<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @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) %>
|
2008-03-07 20:49:44 +03:00
|
|
|
<%= link_to_remote l(:label_preview),
|
|
|
|
{ :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
|
|
|
|
:method => 'post',
|
|
|
|
:update => 'preview',
|
|
|
|
:with => "Form.serialize('message-form')",
|
|
|
|
:complete => "Element.scrollTo('preview')"
|
|
|
|
}, :accesskey => accesskey(:preview) %> |
|
2007-09-24 23:54:48 +04:00
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
|
|
|
|
<% 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)) %>
|
2007-05-13 21:09:56 +04:00
|
|
|
</tr></thead>
|
|
|
|
<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' : '' %>">
|
2010-02-14 14:52:12 +03:00
|
|
|
<td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
|
2007-11-24 15:25:07 +03:00
|
|
|
<td class="author" align="center"><%= topic.author %></td>
|
|
|
|
<td class="created_on" align="center"><%= format_time(topic.created_on) %></td>
|
|
|
|
<td class="replies" align="center"><%= topic.replies_count %></td>
|
|
|
|
<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| %>
|
|
|
|
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
|
|
<% end %>
|
|
|
|
|
2008-06-29 13:08:58 +04:00
|
|
|
<% html_title h(@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 %>
|