From 6279041361d2615077a3796d34159b5d800f0fd8 Mon Sep 17 00:00:00 2001 From: xianbo Date: Thu, 14 Nov 2013 20:15:08 +0800 Subject: [PATCH] fix links --- app/views/users/_my_course.html.erb | 2 +- app/views/users/user_projects.html.erb | 2 +- app/views/users/watch_projects.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/users/_my_course.html.erb b/app/views/users/_my_course.html.erb index 0d2dfa50c..ad489a981 100644 --- a/app/views/users/_my_course.html.erb +++ b/app/views/users/_my_course.html.erb @@ -11,7 +11,7 @@

<% end %> <% else %> -

<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %>

+

<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %>

<%= render :partial => 'course_form' %> <% end %> diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index acf205d71..8803867df 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -2,7 +2,7 @@

温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~

<% if @user == User.current %> - <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> + <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> <% end %>
<%= watch_projects @state %> diff --git a/app/views/users/watch_projects.html.erb b/app/views/users/watch_projects.html.erb index c3bd8d3fb..137fc21fb 100644 --- a/app/views/users/watch_projects.html.erb +++ b/app/views/users/watch_projects.html.erb @@ -1,6 +1,6 @@

温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~

<% if @user == User.current %> - <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> + <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> <% end %> <%= watch_projects @state%> <% if @watch_projects.nil?&&watch_projects.project.nil? %>