diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index f6ec09b2a..03581d0c2 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -27,7 +27,7 @@ class BoardsController < ApplicationController include SortHelper helper :watchers helper :project_score - + helper :attachments def index #modify by nwb @flag = params[:flag] || false diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 431577f9a..6e2da4bb0 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -93,10 +93,27 @@ class MessagesController < ApplicationController end call_hook(:controller_messages_new_after_save, { :params => params, :message => @message}) render_attachment_warning_if_needed(@message) - redirect_to board_message_url(@board, @message) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@board, @message) + end else - layout_file = @project ? 'base_projects' : 'base_courses' - render :action => 'new', :layout => layout_file + if params[:is_board] + if @project + redirect_to project_boards_path(@project, :flag => true) + elsif @course + redirect_to course_boards_path(@course, :flag => true) + end + else + layout_file = @project ? 'base_projects' : 'base_courses' + render :action => 'new', :layout => layout_file + end + end else respond_to do |format| @@ -111,7 +128,15 @@ class MessagesController < ApplicationController # Reply to a topic def reply if params[:reply][:content] == "" - (redirect_to board_message_url(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return) + if params[:is_board] + if @project + (redirect_to project_boards_path(@project), :notice => l(:label_reply_empty);return) + elsif @course + (redirect_to course_boards_path(@course), :notice => l(:label_reply_empty);return) + end + else + (redirect_to board_message_url(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return) + end end @quote = params[:quote][:quote] @reply = Message.new @@ -132,7 +157,15 @@ class MessagesController < ApplicationController else #render file: 'messages#show', layout: 'base_courses' end - redirect_to board_message_url(@board, @topic, :r => @reply) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@board, @topic, :r => @reply) + end end @@ -144,13 +177,22 @@ class MessagesController < ApplicationController else (render_403; return false) unless @message.course_editable_by?(User.current) end + @message.safe_attributes = params[:message] if request.post? && @message.save attachments = Attachment.attach_files(@message, params[:attachments]) render_attachment_warning_if_needed(@message) flash[:notice] = l(:notice_successful_update) @message.reload - redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + end elsif request.get? respond_to do |format| format.html { @@ -172,16 +214,20 @@ class MessagesController < ApplicationController @message.destroy # modify by nwb if @project - if @message.parent - redirect_to board_message_url(@board, @message.parent, :r => r) - else + if params[:is_board] redirect_to project_boards_url(@project) + else + redirect_to board_message_url(@board, @topic, :r => @reply) end elsif @course - if @message.parent - redirect_to board_message_url(@board, @message.parent, :r => r) + if params[:is_board] + redirect_to course_boards_url(@course) else - redirect_to course_board_url(@course, @board) + if @message.parent + redirect_to board_message_url(@board, @message.parent, :r => r) + else + redirect_to course_board_url(@course, @board) + end end end end diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index 1e81aaf65..7b07426aa 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -1,4 +1,4 @@ - + <% if defined?(container) && container && container.saved_attachments %> <% if isReply %> <% container.saved_attachments.each_with_index do |attachment, i| %> @@ -38,12 +38,12 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> -<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> +<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"file#{container.id}.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', + :id => "file#{container.id}", :class => 'file_selector', :multiple => true, - :onchange => 'addInputFiles(this);', + :onchange => "addInputFiles_board(this, '#{container.id}');", :style => 'display:none', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index 9778d3242..66d9a0e80 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -1,4 +1,4 @@ - + <% if defined?(container) && container && container.saved_attachments %> <% if isReply %> <% container.saved_attachments.each_with_index do |attachment, i| %> @@ -38,12 +38,12 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> + <%= button_tag "文件浏览", :type=>"button", :onclick=>"file#{container.id}.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', + :id => "file#{container.id}", :class => 'file_selector', :multiple => true, - :onchange => 'addInputFiles(this);', + :onchange => "addInputFiles_board(this, '#{container.id}');", :style => 'display:none', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index 94ba51529..fba80127b 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -1,8 +1,8 @@ <%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> - <%= render :partial => 'form_course', :locals => {:f => f} %> + <%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
  • - <%= link_to l(:button_cancel), course_boards_path(@course), :class => 'grey_btn fr ml10' %> + <%= l(:button_cancel) %> <%= l(:button_submit)%>
  • diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index e4db6bef1..ce3dd2091 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -1,28 +1,26 @@ - +
    -

    <%= l(:label_board_plural) %>

    -
    +

    + <% if User.current.language == "zh"%> + <%= h @board.name %> + <% else %> + <%= l(:project_module_boards) %> + <% end %> +

    + <%= l(:label_message_new) %> +
    + + +
    +
    +
    +
      + <%= render :partial => 'course_new' %> +
    +
    <% if !User.current.logged?%>
    @@ -31,44 +29,159 @@
    <% end %> -
    -

    - <%= l(:label_totle) %> - <%= @topic_count %> - <%= l(:label_course_momes_count) %> -

    - <%= link_to l(:label_message_new), - new_board_message_path(@board), - :class => 'problem_new_btn fl c_dorange' if User.current.logged? %> -
    -
    -<% if @topics.any? %> - <% @topics.each do |topic| %> -
    - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %> -
    - <%= link_to h(topic.subject), board_message_path(@board, topic),title: topic.subject.to_s,:class => "problem_tit fl fb c_dblue" %> - <% if topic.sticky? %> - 置顶 - <% end %> -
    -

    由<%= link_to topic.author,user_path(topic.author),:class => "problem_name" %>添加于<%= format_time(topic.created_on) %>

    -
    - <%=link_to (l(:label_reply) + topic.replies_count.to_s), board_message_path(@board, topic),:class => "talk_btn fr c_white" %> +

    讨论区共有<%= @topic_count %>个帖子

    + <% if @topics.any? %> + <% @topics.each do |topic| %> +
    + <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> +
    + <% author = topic.author.to_s + ":" %> + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %> -
    -
    - <% end %> -<% else %> -

    - <%= l(:label_no_data) %> -

    -<% end %> +

      <%= h(topic.subject) %>

    + <% if topic.course_editable_by?(User.current) %> + <%= l(:button_edit) %> + <% end %> + <% if topic.sticky? %> + <%= l(:label_board_sticky)%> + <% end %> + <%= link_to( + l(:button_delete), + {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :class => 'talk_edit fr', + :style => ' margin-right: 10px;' + ) if topic.destroyable_by?(User.current) %> + + +
    + +

    + <%= topic.content %> +

    + <% if topic.content.size > 300 %> +

    + + + + + +

    + <% end %> + <%= link_to_attachments_course topic, :author => false %> + + <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> + +
    + <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %> + +
    + + +
    + +
    + <% reply = Message.new(:subject => "RE: #{@message.subject}")%> + <% if !topic.locked? && authorize_for('messages', 'reply') %> + +
    + + <% end %> + <% replies_all = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").offset(2). + all %> + <% replies_show = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").limit(2). + all %> + <% unless replies_show.empty? %> + <% reply_count = 0 %> +
    +
      + <% replies_show.each do |message| %> + +
    • + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> +
      + <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> +
      +

      <%= textAreailizable message,:content,:attachments => message.attachments %>

      + +
      + <%= format_time(message.created_on) %> + <%= link_to( + + l(:button_delete), + {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :class => ' c_dblue fr' + ) if message.course_destroyable_by?(User.current) %> +
      +
      + +
    • + <% end %> +
    +
    + + <%if replies_all.first %> + + <% end %> + <% end %> +
    + <% end %> + <% else %> +

    <%= l(:label_no_data) %>

    + <% end %>
      <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
    <%# other_formats_links do |f| %> -<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> + <%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> <%# end %> <% html_title @board.name %> diff --git a/app/views/boards/_edit.html.erb b/app/views/boards/_edit.html.erb index c41f723de..15358c03a 100644 --- a/app/views/boards/_edit.html.erb +++ b/app/views/boards/_edit.html.erb @@ -11,9 +11,10 @@ :method => :post} } do |f| %> <%= render :partial => 'form_project', - :locals => {:f => f, :replying => !topic.parent.nil?} %> - <%= l(:button_submit)%> - <%= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %> + :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> + <%= l(:button_submit)%> + <%= l(:button_cancel) %> + <%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %>
    <% end %> @@ -29,7 +30,7 @@ :method => :post} } do |f| %> <%= render :partial => 'form_course', - :locals => {:f => f, :replying => !topic.parent.nil?} %> + :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> <%= l(:button_submit)%> <%= link_to l(:button_cancel), board_message_url(topic.board,topic.root, :r => (topic.parent_id &&topic.id)), :class => "blue_btn grey_btn fl c_white" %> diff --git a/app/views/boards/_form_course.html.erb b/app/views/boards/_form_course.html.erb index 5cd2d8a2f..09ee1c3b4 100644 --- a/app/views/boards/_form_course.html.erb +++ b/app/views/boards/_form_course.html.erb @@ -51,7 +51,7 @@
  • <% unless replying %>
    - <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %> + <%= render :partial => 'attachments/form_course', :locals => {:container => topic,:isReply => @isReply} %>
    <% end %>
  • diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb index b42cabbeb..3ecffa3e2 100644 --- a/app/views/boards/_form_project.html.erb +++ b/app/views/boards/_form_project.html.erb @@ -51,7 +51,7 @@
  • <% unless replying %>
    - <%= render :partial => 'attachments/form_project', :locals => {:container => @message,:isReply => @isReply} %> + <%= render :partial => 'attachments/form_project', :locals => {:container => topic,:isReply => @isReply} %>
    <% end %>
  • diff --git a/app/views/boards/_project_new_topic.html.erb b/app/views/boards/_project_new_topic.html.erb index 371007a72..3f7c569e1 100644 --- a/app/views/boards/_project_new_topic.html.erb +++ b/app/views/boards/_project_new_topic.html.erb @@ -1,8 +1,9 @@ <%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> - <%= render :partial => 'form_project', :locals => {:f => f} %> + <%= render :partial => 'form_project', :locals => {:f => f, :topic => @message} %>
  • - <%= link_to l(:button_cancel), project_boards_path(@project), :class => 'grey_btn fr ml10' %> + <%= l(:button_cancel) %> + <%= l(:button_submit)%>
  • diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index af568bbff..150acbabd 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -1,59 +1,190 @@ -
    -

    +
    +

    <% if User.current.language == "zh"%> <%= h @board.name %> <% else %> <%= l(:project_module_boards) %> <% end %> +

    + <%= l(:label_message_new) %> +
    <% if !User.current.logged? %>
    - <%= l(:label_user_login_project_board) %> - <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> + <%= l(:label_user_login_project_board) %> + <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
    <% end %> - -
    -
    <%= l(:label_project_board_count , :count => @topic_count)%>
    - <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - <%= link_to l(:project_module_boards_post), new_board_message_path(@board), - :class => 'problem_new_btn fl c_dorange', - :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> - <% end %> -
    -
    - + +
    +
    +
    +
      + <%= render :partial => 'project_new_topic' %> +
    +
    + + +

    讨论区共有<%= @topic_count %>个帖子

    <% if @topics.any? %> - <% @topics.each do |topic| %> -
    - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %> -
    - <%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> - <% if topic.sticky? %> - <%= l(:label_board_sticky)%> + <% @topics.each do |topic| %> +
    + <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> +
    + <% author = topic.author.to_s + ":" %> + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %> + +

      <%= h(topic.subject) %>

    + <% if topic.editable_by?(User.current) %> + <%= l(:button_edit) %> + <% end %> + <% if topic.sticky? %> + <%= l(:label_board_sticky)%> + <% end %> + <%= link_to( + l(:button_delete), + {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :class => 'talk_edit fr', + :style => ' margin-right: 10px;' + ) if topic.destroyable_by?(User.current) %> + + +
    + +

    + <%= topic.content %> +

    + <% if topic.content.size > 300 %> +

    + + + + + +

    + <% end %> + <%= link_to_attachments_course topic, :author => false %> + + <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> + +
    + <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %> + +
    + + +
    + + +
    + <% reply = Message.new(:subject => "RE: #{@message.subject}")%> + <% if !topic.locked? && authorize_for('messages', 'reply') %> + +
    + <% end %> -
    - <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> -  <%= l(:label_post_by_time)%><%= format_time topic.created_on %> -
    - <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %> -
    -
    - <% end %> -<% else %> -

    <%= l(:label_no_data) %>

    -<% end %> + <% replies_all = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").offset(2). + all %> + <% replies_show = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC").limit(2). + all %> + <% unless replies_show.empty? %> + <% reply_count = 0 %> +
    +
      + <% replies_show.each do |message| %> + +
    • + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> +
      + <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> +
      +

      <%= textAreailizable message,:content,:attachments => message.attachments %>

      + +
      + <%= format_time(message.created_on) %> + <%= link_to( + + l(:button_delete), + {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :class => ' c_dblue fr' + ) if message.course_destroyable_by?(User.current) %> +
      +
      + +
    • + <% end %> +
    +
    + + <%if replies_all.first %> + + <% end %> + <% end %> +
    + <% end %> + <% else %> +

    <%= l(:label_no_data) %>

    + <% end %>
      - <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %> -
    - + <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %> + + <%# other_formats_links do |f| %> -<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> + <%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> <%# end %> <% html_title @board.name %> @@ -61,3 +192,33 @@ <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> <% end %> +
    + \ No newline at end of file diff --git a/app/views/files/_project_file_list.html.erb b/app/views/files/_project_file_list.html.erb index 3dd5134d7..e11e4416b 100644 --- a/app/views/files/_project_file_list.html.erb +++ b/app/views/files/_project_file_list.html.erb @@ -20,20 +20,16 @@
    <%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %> <% if User.current.logged? %> - <% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %> + + + <% if project.is_public? %> <%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> - - <% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %> + <% if (Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %> <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %> - <% else %> - <% end %> - <% else %> - <%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> <% end %> - <% else %> <% end %>
    diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb index 63c3051aa..e31c5008f 100644 --- a/app/views/homework_attach/edit.html.erb +++ b/app/views/homework_attach/edit.html.erb @@ -42,7 +42,7 @@
    • - 修改作业 + 修改作品
    • 成员 diff --git a/app/views/layouts/_base_development_group.html.erb b/app/views/layouts/_base_development_group.html.erb index 24f975f66..7a5cd6c57 100644 --- a/app/views/layouts/_base_development_group.html.erb +++ b/app/views/layouts/_base_development_group.html.erb @@ -23,7 +23,7 @@ (<%= @project.boards.first.topics.count %>) <% end %> <% if User.current.member_of?(@project) %> - <%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %> + <%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %> <% end %>
    <% end%> diff --git a/app/views/layouts/_base_friend_group.html.erb b/app/views/layouts/_base_friend_group.html.erb index 16ccc09e5..71d375501 100644 --- a/app/views/layouts/_base_friend_group.html.erb +++ b/app/views/layouts/_base_friend_group.html.erb @@ -12,7 +12,7 @@ (<%= @project.boards.first.topics.count %>) <% end %> <% if User.current.member_of?(@project) %> - <%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %> + <%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %> <% end %>

    <% end%> diff --git a/app/views/layouts/_base_research_team.html.erb b/app/views/layouts/_base_research_team.html.erb index a214e8c20..f228f0439 100644 --- a/app/views/layouts/_base_research_team.html.erb +++ b/app/views/layouts/_base_research_team.html.erb @@ -23,7 +23,7 @@ (<%= @project.boards.first.topics.count %>) <% end %> <% if User.current.member_of?(@project) %> - <%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %> + <%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %> <% end %> <% end%> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 2a26ff59f..6923b17c2 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -133,7 +133,7 @@