@@ -1,70 +1,72 | |||||
1 | <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %> |
|
1 | <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %> | |
2 |
|
2 | |||
3 | <div class="contextual"> |
|
3 | <div class="contextual"> | |
4 | <%= link_to_if_authorized l(:label_message_new), |
|
4 | <%= link_to_if_authorized l(:label_message_new), | |
5 | {:controller => 'messages', :action => 'new', :board_id => @board}, |
|
5 | {:controller => 'messages', :action => 'new', :board_id => @board}, | |
6 | :class => 'icon icon-add', |
|
6 | :class => 'icon icon-add', | |
7 | :onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %> |
|
7 | :onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %> | |
8 | <%= watcher_tag(@board, User.current) %> |
|
8 | <%= watcher_tag(@board, User.current) %> | |
9 | </div> |
|
9 | </div> | |
10 |
|
10 | |||
11 | <div id="add-message" style="display:none;"> |
|
11 | <div id="add-message" style="display:none;"> | |
|
12 | <% if authorize_for('messages', 'new') %> | |||
12 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> |
|
13 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> | |
13 | <% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %> |
|
14 | <% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %> | |
14 | <%= render :partial => 'messages/form', :locals => {:f => f} %> |
|
15 | <%= render :partial => 'messages/form', :locals => {:f => f} %> | |
15 | <p><%= submit_tag l(:button_create) %> |
|
16 | <p><%= submit_tag l(:button_create) %> | |
16 | <%= link_to_remote l(:label_preview), |
|
17 | <%= link_to_remote l(:label_preview), | |
17 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, |
|
18 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, | |
18 | :method => 'post', |
|
19 | :method => 'post', | |
19 | :update => 'preview', |
|
20 | :update => 'preview', | |
20 | :with => "Form.serialize('message-form')", |
|
21 | :with => "Form.serialize('message-form')", | |
21 | :complete => "Element.scrollTo('preview')" |
|
22 | :complete => "Element.scrollTo('preview')" | |
22 | }, :accesskey => accesskey(:preview) %> | |
|
23 | }, :accesskey => accesskey(:preview) %> | | |
23 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p> |
|
24 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p> | |
24 | <% end %> |
|
25 | <% end %> | |
25 | <div id="preview" class="wiki"></div> |
|
26 | <div id="preview" class="wiki"></div> | |
|
27 | <% end %> | |||
26 | </div> |
|
28 | </div> | |
27 |
|
29 | |||
28 | <h2><%=h @board.name %></h2> |
|
30 | <h2><%=h @board.name %></h2> | |
29 | <p class="subtitle"><%=h @board.description %></p> |
|
31 | <p class="subtitle"><%=h @board.description %></p> | |
30 |
|
32 | |||
31 | <% if @topics.any? %> |
|
33 | <% if @topics.any? %> | |
32 | <table class="list messages"> |
|
34 | <table class="list messages"> | |
33 | <thead><tr> |
|
35 | <thead><tr> | |
34 | <th><%= l(:field_subject) %></th> |
|
36 | <th><%= l(:field_subject) %></th> | |
35 | <th><%= l(:field_author) %></th> |
|
37 | <th><%= l(:field_author) %></th> | |
36 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> |
|
38 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> | |
37 | <%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %> |
|
39 | <%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %> | |
38 | <%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %> |
|
40 | <%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %> | |
39 | </tr></thead> |
|
41 | </tr></thead> | |
40 | <tbody> |
|
42 | <tbody> | |
41 | <% @topics.each do |topic| %> |
|
43 | <% @topics.each do |topic| %> | |
42 | <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"> |
|
44 | <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"> | |
43 | <td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic }, :class => 'icon' %></td> |
|
45 | <td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic }, :class => 'icon' %></td> | |
44 | <td class="author" align="center"><%= topic.author %></td> |
|
46 | <td class="author" align="center"><%= topic.author %></td> | |
45 | <td class="created_on" align="center"><%= format_time(topic.created_on) %></td> |
|
47 | <td class="created_on" align="center"><%= format_time(topic.created_on) %></td> | |
46 | <td class="replies" align="center"><%= topic.replies_count %></td> |
|
48 | <td class="replies" align="center"><%= topic.replies_count %></td> | |
47 | <td class="last_message"> |
|
49 | <td class="last_message"> | |
48 | <% if topic.last_reply %> |
|
50 | <% if topic.last_reply %> | |
49 | <%= authoring topic.last_reply.created_on, topic.last_reply.author %><br /> |
|
51 | <%= authoring topic.last_reply.created_on, topic.last_reply.author %><br /> | |
50 | <%= link_to_message topic.last_reply %> |
|
52 | <%= link_to_message topic.last_reply %> | |
51 | <% end %> |
|
53 | <% end %> | |
52 | </td> |
|
54 | </td> | |
53 | </tr> |
|
55 | </tr> | |
54 | <% end %> |
|
56 | <% end %> | |
55 | </tbody> |
|
57 | </tbody> | |
56 | </table> |
|
58 | </table> | |
57 | <p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p> |
|
59 | <p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p> | |
58 | <% else %> |
|
60 | <% else %> | |
59 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
61 | <p class="nodata"><%= l(:label_no_data) %></p> | |
60 | <% end %> |
|
62 | <% end %> | |
61 |
|
63 | |||
62 | <% other_formats_links do |f| %> |
|
64 | <% other_formats_links do |f| %> | |
63 | <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> |
|
65 | <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> | |
64 | <% end %> |
|
66 | <% end %> | |
65 |
|
67 | |||
66 | <% html_title h(@board.name) %> |
|
68 | <% html_title h(@board.name) %> | |
67 |
|
69 | |||
68 | <% content_for :header_tags do %> |
|
70 | <% content_for :header_tags do %> | |
69 | <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> |
|
71 | <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> | |
70 | <% end %> |
|
72 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now