Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cb589d23
Commit
cb589d23
authored
Jan 09, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix public project search
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f8f76fdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
app/controllers/search_controller.rb
app/controllers/search_controller.rb
+2
-2
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+3
-2
No files found.
app/controllers/search_controller.rb
View file @
cb589d23
...
@@ -15,7 +15,7 @@ class SearchController < ApplicationController
...
@@ -15,7 +15,7 @@ class SearchController < ApplicationController
@total_results
=
@projects
.
count
+
@merge_requests
.
count
+
@issues
.
count
+
@wiki_pages
.
count
+
@blobs
.
total_count
@total_results
=
@projects
.
count
+
@merge_requests
.
count
+
@issues
.
count
+
@wiki_pages
.
count
+
@blobs
.
total_count
end
end
private
private
def
find_project_ids
(
group_id
,
project_id
)
def
find_project_ids
(
group_id
,
project_id
)
project_ids
=
current_user
.
authorized_projects
.
map
(
&
:id
)
project_ids
=
current_user
.
authorized_projects
.
map
(
&
:id
)
...
@@ -26,7 +26,7 @@ class SearchController < ApplicationController
...
@@ -26,7 +26,7 @@ class SearchController < ApplicationController
project_ids
.
select!
{
|
id
|
group_project_ids
.
include?
(
id
)
}
project_ids
.
select!
{
|
id
|
group_project_ids
.
include?
(
id
)
}
elsif
project_id
.
present?
elsif
project_id
.
present?
@project
=
Project
.
find
(
project_id
)
@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
end
project_ids
project_ids
end
end
...
...
app/views/admin/projects/show.html.haml
View file @
cb589d23
...
@@ -79,13 +79,14 @@
...
@@ -79,13 +79,14 @@
.title
.title
Transfer project
Transfer project
.body
.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
.form-group
=
f
.
label
:namespace_id
,
"Namespace"
=
f
.
label
:namespace_id
,
"Namespace"
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
namespace_select_tag
:namespace_id
,
selected:
params
[
:namespace_id
],
class:
'input-large'
=
namespace_select_tag
:namespace_id
,
selected:
params
[
:namespace_id
],
class:
'input-large'
.form-group
.form-group
.col-sm-2
.col-sm-10
.col-sm-10
=
f
.
submit
'Transfer'
,
class:
'btn btn-primary'
=
f
.
submit
'Transfer'
,
class:
'btn btn-primary'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment