Commit cb589d23 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix public project search

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f8f76fdb
......@@ -26,7 +26,7 @@ class SearchController < ApplicationController
project_ids.select! { |id| group_project_ids.include?(id) }
elsif project_id.present?
@project = Project.find(project_id)
project_ids = @project.public ? [@project.id] : project_ids.select { |id| id == project_id.to_i }
project_ids = @project.public? ? [@project.id] : project_ids.select { |id| id == project_id.to_i }
end
project_ids
end
......
......@@ -79,13 +79,14 @@
.title
Transfer project
.body
= form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
= form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
.form-group
= f.label :namespace_id, "Namespace"
= f.label :namespace_id, "Namespace", class: 'control-label'
.col-sm-10
= namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'
.form-group
.col-sm-2
.col-sm-10
= f.submit 'Transfer', class: 'btn btn-primary'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment