To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / boards / show.html.erb @ 1591:63650ae64bf2
History | View | Annotate | Download (2.67 KB)
| 1 |
<%= board_breadcrumb(@board) %>
|
|---|---|
| 2 |
|
| 3 |
<div class="contextual"> |
| 4 |
<%= link_to l(:label_message_new),
|
| 5 |
new_board_message_path(@board),
|
| 6 |
:class => 'icon icon-add',
|
| 7 |
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
|
| 8 |
<%= watcher_link(@board, User.current) %>
|
| 9 |
</div>
|
| 10 |
|
| 11 |
<div id="add-message" style="display:none;"> |
| 12 |
<% if User.current.allowed_to?(:add_messages, @board.project) %>
|
| 13 |
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h2> |
| 14 |
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
| 15 |
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
| 16 |
<p><%= submit_tag l(:button_create) %> |
| 17 |
<%= preview_link(preview_board_message_path(@board), 'message-form') %> |
|
| 18 |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p> |
| 19 |
<% end %>
|
| 20 |
<div id="preview" class="wiki"></div> |
| 21 |
<% end %>
|
| 22 |
</div>
|
| 23 |
|
| 24 |
<h2><%=h @board.name %></h2> |
| 25 |
<p class="subtitle"><%=h @board.description %></p> |
| 26 |
|
| 27 |
<% if @topics.any? %>
|
| 28 |
<table class="list messages"> |
| 29 |
<thead><tr> |
| 30 |
<th><%= l(:field_subject) %></th> |
| 31 |
<th><%= l(:field_author) %></th> |
| 32 |
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
| 33 |
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
| 34 |
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
| 35 |
</tr></thead> |
| 36 |
<tbody>
|
| 37 |
<% @topics.each do |topic| %>
|
| 38 |
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"> |
| 39 |
<td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td> |
| 40 |
<td class="author"><%= link_to_user(topic.author) %></td> |
| 41 |
<td class="created_on"><%= format_time(topic.created_on) %></td> |
| 42 |
<td class="reply-count"><%= topic.replies_count %></td> |
| 43 |
<td class="last_message"> |
| 44 |
<% if topic.last_reply %>
|
| 45 |
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br /> |
| 46 |
<%= link_to_message topic.last_reply %>
|
| 47 |
<% end %>
|
| 48 |
</td>
|
| 49 |
</tr>
|
| 50 |
<% end %>
|
| 51 |
</tbody>
|
| 52 |
</table>
|
| 53 |
<p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p> |
| 54 |
<% else %>
|
| 55 |
<p class="nodata"><%= l(:label_no_data) %></p> |
| 56 |
<% end %>
|
| 57 |
|
| 58 |
<% other_formats_links do |f| %>
|
| 59 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
| 60 |
<% end %>
|
| 61 |
|
| 62 |
<% html_title @board.name %>
|
| 63 |
|
| 64 |
<% content_for :header_tags do %>
|
| 65 |
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
| 66 |
<% end %>
|