<%= link_to_if_authorized l(:label_message_new),
{:controller => '/messages', :action => 'new', :board_id => @board},
:class => 'icon icon-add',
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
<%= watcher_link(@board, User.current) %>
<% if authorize_for('messages', 'new') %>
<%= link_to h(@board.name), :controller => '/boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %>
<%= form_for Message.new,
:url => board_topics_path(@board),
:html => { :multipart => true,
:id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<%= link_to l(:label_preview),
preview_board_topics_path(@board, @message),
:class => 'preview',
:id => 'message-form-preview' %>
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %>
<% end %>
<% end %>
<%=h @board.name %>
<%=h @board.description %>
<% if @topics.any? %>
<%= l(:field_subject) %> |
<%= l(:field_author) %> |
<%= 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)) %>
<% @topics.each do |topic| %>
<%= image_tag('locked.png', :alt => l(:label_board_locked)) if topic.locked? %><%= image_tag 'bullet_go.png', :alt => l(:label_board_sticky) if topic.sticky? %><%= link_to h(topic.subject), { :controller => '/messages', :action => 'show', :board_id => @board, :id => topic } %> |
<%= link_to_user(topic.author) %> |
<%= format_time(topic.created_on) %> |
<%= topic.replies_count %> |
<% if topic.last_reply %>
<%= authoring topic.last_reply.created_on, topic.last_reply.author %>
<%= link_to_message topic.last_reply %>
<% end %>
|
<% end %>
<% else %>
<%= l(:label_no_data) %>
<% end %>
<%= other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>
<% html_title h(@board.name) %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
<% end %>