##// END OF EJS Templates
Code cleanup, use named routes....
Jean-Philippe Lang -
r10842:8eea999ca676
parent child
Show More
@@ -1,38 +1,38
1 1 <h2><%= l(:label_board_plural) %></h2>
2 2
3 3 <table class="list boards">
4 4 <thead><tr>
5 5 <th><%= l(:label_board) %></th>
6 6 <th><%= l(:label_topic_plural) %></th>
7 7 <th><%= l(:label_message_plural) %></th>
8 8 <th><%= l(:label_message_last) %></th>
9 9 </tr></thead>
10 10 <tbody>
11 11 <% Board.board_tree(@boards) do |board, level| %>
12 12 <tr class="<%= cycle 'odd', 'even' %>">
13 13 <td style="padding-left: <%= level * 18 %>px;">
14 <%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
14 <%= link_to h(board.name), project_board_path(board.project, board), :class => "board" %><br />
15 15 <%=h board.description %>
16 16 </td>
17 17 <td class="topic-count"><%= board.topics_count %></td>
18 18 <td class="message-count"><%= board.messages_count %></td>
19 19 <td class="last-message">
20 20 <% if board.last_message %>
21 21 <%= authoring board.last_message.created_on, board.last_message.author %><br />
22 22 <%= link_to_message board.last_message %>
23 23 <% end %>
24 24 </td>
25 25 </tr>
26 26 <% end %>
27 27 </tbody>
28 28 </table>
29 29
30 30 <% other_formats_links do |f| %>
31 31 <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_messages => 1, :key => User.current.rss_key} %>
32 32 <% end %>
33 33
34 34 <% content_for :header_tags do %>
35 35 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :show_messages => 1, :key => User.current.rss_key}) %>
36 36 <% end %>
37 37
38 38 <% html_title l(:label_board_plural) %>
@@ -1,66 +1,66
1 1 <%= board_breadcrumb(@board) %>
2 2
3 3 <div class="contextual">
4 <%= link_to_if_authorized l(:label_message_new),
5 {:controller => 'messages', :action => 'new', :board_id => @board},
6 :class => 'icon icon-add',
7 :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' %>
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 8 <%= watcher_tag(@board, User.current) %>
9 9 </div>
10 10
11 11 <div id="add-message" style="display:none;">
12 <% if authorize_for('messages', 'new') %>
13 <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h2>
14 <%= form_for @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
12 <% if User.current.allowed_to?(:add_messages, @board.project) %>
13 <h2><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h2>
14 <%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
15 15 <%= render :partial => 'messages/form', :locals => {:f => f} %>
16 16 <p><%= submit_tag l(:button_create) %>
17 <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> |
17 <%= preview_link(preview_board_message_path(@board), 'message-form') %> |
18 18 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
19 19 <% end %>
20 20 <div id="preview" class="wiki"></div>
21 21 <% end %>
22 22 </div>
23 23
24 24 <h2><%=h @board.name %></h2>
25 25 <p class="subtitle"><%=h @board.description %></p>
26 26
27 27 <% if @topics.any? %>
28 28 <table class="list messages">
29 29 <thead><tr>
30 30 <th><%= l(:field_subject) %></th>
31 31 <th><%= l(:field_author) %></th>
32 32 <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
33 33 <%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
34 34 <%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
35 35 </tr></thead>
36 36 <tbody>
37 37 <% @topics.each do |topic| %>
38 38 <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
39 <td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
39 <td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
40 40 <td class="author"><%= link_to_user(topic.author) %></td>
41 41 <td class="created_on"><%= format_time(topic.created_on) %></td>
42 42 <td class="reply-count"><%= topic.replies_count %></td>
43 43 <td class="last_message">
44 44 <% if topic.last_reply %>
45 45 <%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
46 46 <%= link_to_message topic.last_reply %>
47 47 <% end %>
48 48 </td>
49 49 </tr>
50 50 <% end %>
51 51 </tbody>
52 52 </table>
53 53 <p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p>
54 54 <% else %>
55 55 <p class="nodata"><%= l(:label_no_data) %></p>
56 56 <% end %>
57 57
58 58 <% other_formats_links do |f| %>
59 59 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
60 60 <% end %>
61 61
62 62 <% html_title @board.name %>
63 63
64 64 <% content_for :header_tags do %>
65 65 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
66 66 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now