From c10eeb1c01eb09bd0c2ae3feb9f75ddd3b54927d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 16 Sep 2014 11:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=A6=96=E9=A1=B5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 8 ++----- app/views/welcome/index.html.erb | 39 +++++++++++++++++++------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index dfacff864..5ae2b0864 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -152,9 +152,9 @@ module ProjectsHelper tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)} end # Ended by young - - + + def parent_project_select_tag(project) selected = project.parent @@ -175,18 +175,15 @@ module ProjectsHelper render_project_nested_lists(projects) do |project| #Modified by young if project.try(:project_type) == Project::ProjectType_course - # modified by longjun # never use unless and else # unless project.is_public == 1 - if project.is_public != 1 s = "#{l(:lable_private)}".html_safe else s = "".html_safe end # end longjun - # modified by Longjun s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}").html_safe @@ -194,7 +191,6 @@ module ProjectsHelper else # modified by longjun # unless project.is_public - if !project.is_public # end longjun s = "#{l(:lable_private)}".html_safe diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 83d1fef28..025f24ab1 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -56,8 +56,15 @@