diff --git a/app/views/boards/index.html.erb b/app/views/boards/index.html.erb
index 3caa08d3c..f859e822b 100644
--- a/app/views/boards/index.html.erb
+++ b/app/views/boards/index.html.erb
@@ -11,7 +11,7 @@
<% Board.board_tree(@boards) do |board, level| %>
- <%= link_to h(board.name), {:action => 'show', :id => board}, :class => "board" %>
+ <%= link_to h(board.name), project_board_path(board.project, board), :class => "board" %>
<%=h board.description %>
|
<%= board.topics_count %> |
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 784c58a52..1a006a6ad 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -1,20 +1,20 @@
<%= board_breadcrumb(@board) %>
-<%= link_to_if_authorized l(:label_message_new),
- {:controller => 'messages', :action => 'new', :board_id => @board},
- :class => 'icon icon-add',
- :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' %>
+<%= link_to l(:label_message_new),
+ new_board_message_path(@board),
+ :class => 'icon icon-add',
+ :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
<%= watcher_tag(@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, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+<% if User.current.allowed_to?(:add_messages, @board.project) %>
+
<%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %>
+<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<%= 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;' %>
<% end %>
@@ -36,7 +36,7 @@
<% @topics.each do |topic| %>
- <%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %> |
+ <%= link_to h(topic.subject), board_message_path(@board, topic) %> |
<%= link_to_user(topic.author) %> |
<%= format_time(topic.created_on) %> |
<%= topic.replies_count %> |