From 3f3bb6267887968164e3e9ac00cf91cfc7a8d8df Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 7 Mar 2015 14:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E9=97=BB=E3=80=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=8C=89=E9=92=AE=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 2 +- app/views/news/_project_news.html.erb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 25903f588..9a3b79051 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -45,7 +45,7 @@ <%= link_to @topic_count,:controller => 'boards',:action => 'index' %> 个贴子 - <% if @project.enabled_modules.where("name = 'boards'").count > 0 %> + <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <%= link_to l(:label_message_new), new_board_message_path(@board), diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index b18c2abd8..4d20c62f7 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -70,11 +70,11 @@ <%= label_tips %> -<% if @project.enabled_modules.where("name = 'news'").count > 0 %> -<%= link_to(btn_tips, - new_project_news_path(@project), - :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> +<% if @project.enabled_modules.where("name = 'news'").count > 0 && User.current.member_of?(@project) %> + <%= link_to(btn_tips, + new_project_news_path(@project), + :class => 'icon icon-add', + :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> <% end %> <% if @project && User.current.allowed_to?(:manage_news, @project) %>