Merge pull request #524 from warpc/522-fix_group_project_fork

[refs #522] Fix checking already existing project for fork
This commit is contained in:
Vladimir Sharshov 2012-06-14 11:59:53 -07:00
commit 76979c6b83
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
- if owner.projects.exists? :name => @project.name - if owner.own_projects.exists? :name => @project.name
- is_group = owner.class == Group ? "(#{t 'activerecord.models.group'})" : '' - is_group = owner.class == Group ? "(#{t 'activerecord.models.group'})" : ''
%p.center %p.center
=t 'layout.projects.already_exists' =t 'layout.projects.already_exists'
=link_to "#{owner.uname}/#{@project.name} #{is_group}", project_path(owner.projects.by_name(@project.name).first) =link_to "#{owner.uname}/#{@project.name} #{is_group}", project_path(owner, @project.name)
- else - else
= form_for @project, :url => fork_project_path(@project), :html => { :class => :form, :multipart => true, :method => :post } do |f| = form_for @project, :url => fork_project_path(@project), :html => { :class => :form, :multipart => true, :method => :post } do |f|
= hidden_field_tag :group, owner.id if owner.class == Group = hidden_field_tag :group, owner.id if owner.class == Group