Code cleanup, use named routes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11072 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ad246e81ad
commit
8eea999ca6
|
@ -11,7 +11,7 @@
|
||||||
<% Board.board_tree(@boards) do |board, level| %>
|
<% Board.board_tree(@boards) do |board, level| %>
|
||||||
<tr class="<%= cycle 'odd', 'even' %>">
|
<tr class="<%= cycle 'odd', 'even' %>">
|
||||||
<td style="padding-left: <%= level * 18 %>px;">
|
<td style="padding-left: <%= level * 18 %>px;">
|
||||||
<%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %><br />
|
<%= link_to h(board.name), project_board_path(board.project, board), :class => "board" %><br />
|
||||||
<%=h board.description %>
|
<%=h board.description %>
|
||||||
</td>
|
</td>
|
||||||
<td class="topic-count"><%= board.topics_count %></td>
|
<td class="topic-count"><%= board.topics_count %></td>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<%= board_breadcrumb(@board) %>
|
<%= board_breadcrumb(@board) %>
|
||||||
|
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized l(:label_message_new),
|
<%= link_to l(:label_message_new),
|
||||||
{:controller => 'messages', :action => 'new', :board_id => @board},
|
new_board_message_path(@board),
|
||||||
:class => 'icon icon-add',
|
:class => 'icon icon-add',
|
||||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' %>
|
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
|
||||||
<%= watcher_tag(@board, User.current) %>
|
<%= watcher_tag(@board, User.current) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="add-message" style="display:none;">
|
<div id="add-message" style="display:none;">
|
||||||
<% if authorize_for('messages', 'new') %>
|
<% if User.current.allowed_to?(:add_messages, @board.project) %>
|
||||||
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2>
|
<h2><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h2>
|
||||||
<%= form_for @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||||
<p><%= submit_tag l(:button_create) %>
|
<p><%= submit_tag l(:button_create) %>
|
||||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> |
|
<%= preview_link(preview_board_message_path(@board), 'message-form') %> |
|
||||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @topics.each do |topic| %>
|
<% @topics.each do |topic| %>
|
||||||
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
<tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
||||||
<td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
|
<td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
||||||
<td class="author"><%= link_to_user(topic.author) %></td>
|
<td class="author"><%= link_to_user(topic.author) %></td>
|
||||||
<td class="created_on"><%= format_time(topic.created_on) %></td>
|
<td class="created_on"><%= format_time(topic.created_on) %></td>
|
||||||
<td class="reply-count"><%= topic.replies_count %></td>
|
<td class="reply-count"><%= topic.replies_count %></td>
|
||||||
|
|
Loading…
Reference in New Issue