#1977 项目发布新贴跳转有问题
This commit is contained in:
parent
284625de8f
commit
9060c9acbc
|
@ -30,6 +30,7 @@ class BoardsController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
#modify by nwb
|
#modify by nwb
|
||||||
|
@flag = params[:flag] || false
|
||||||
if @project
|
if @project
|
||||||
@boards = @project.boards.includes(:last_message => :author).all
|
@boards = @project.boards.includes(:last_message => :author).all
|
||||||
@boards = [] << @boards[0] if @boards.any?
|
@boards = [] << @boards[0] if @boards.any?
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div id="add-message" class="add_frame" style="display:none;">
|
<div id="add-message" class="add_frame" style="display:<%= !@flag.nil?&&@flag=='true' ? '' : 'none' %>;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2"><%= l(:label_message_new) %></h2>
|
<h2 class="project_h2"><%= l(:label_message_new) %></h2>
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
<%= link_to "讨论区", project_boards_path(@project), :style => "color:#3CA5C6" %>
|
<%= link_to "讨论区", project_boards_path(@project), :style => "color:#3CA5C6" %>
|
||||||
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
||||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||||
<%= link_to "+发贴", new_board_message_path(@project.boards.first, true), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
|
<%= link_to "+发贴", project_boards_path(@project, :flag => true), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
|
|
Loading…
Reference in New Issue