summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-09 10:29:55 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-09 10:29:55 +0200
commitcb589d231aaa9f4cf7a10c41d6fd1ebe34428173 (patch)
treed919740661ecacf712ae6fd9d39146287afa77c1 /app
parentf8f76fdbfd06184c53c4dc3832601f3c07aeba77 (diff)
downloadgitlab-ce-cb589d231aaa9f4cf7a10c41d6fd1ebe34428173.tar.gz
Fix public project search
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/controllers/search_controller.rb4
-rw-r--r--app/views/admin/projects/show.html.haml5
2 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 2bdc9c366f2..407048233e1 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -15,7 +15,7 @@ class SearchController < ApplicationController
@total_results = @projects.count + @merge_requests.count + @issues.count + @wiki_pages.count + @blobs.total_count
end
- private
+ private
def find_project_ids(group_id, project_id)
project_ids = current_user.authorized_projects.map(&:id)
@@ -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
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 786482eee2e..34a91cce163 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -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'