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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
abff0399
Commit
abff0399
authored
May 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project labels scope
parent
de12eba2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+2
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-4
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+4
-4
No files found.
app/controllers/dashboard_controller.rb
View file @
abff0399
...
@@ -37,6 +37,8 @@ class DashboardController < ApplicationController
...
@@ -37,6 +37,8 @@ class DashboardController < ApplicationController
@projects
=
@projects
.
tagged_with
(
params
[
:label
])
if
params
[
:label
].
present?
@projects
=
@projects
.
tagged_with
(
params
[
:label
])
if
params
[
:label
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
@labels
=
Project
.
where
(
id:
@projects
.
map
(
&
:id
)).
tags_on
(
:labels
)
end
end
# Get authored or assigned open merge requests
# Get authored or assigned open merge requests
...
...
app/helpers/projects_helper.rb
View file @
abff0399
...
@@ -3,10 +3,6 @@ module ProjectsHelper
...
@@ -3,10 +3,6 @@ module ProjectsHelper
"You are going to remove
#{
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
"You are going to remove
#{
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
end
end
def
projects_labels
Project
.
tag_counts_on
(
:labels
).
map
(
&
:name
)
end
def
link_to_project
project
def
link_to_project
project
link_to
project
do
link_to
project
do
title
=
content_tag
(
:strong
,
project
.
name
)
title
=
content_tag
(
:strong
,
project
.
name
)
...
...
app/views/dashboard/projects.html.haml
View file @
abff0399
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
%p
.light
Filter by label:
%p
.light
Filter by label:
%ul
.bordered-list
%ul
.bordered-list
-
projects_
labels
.
each
do
|
label
|
-
@
labels
.
each
do
|
label
|
%li
{
class:
(
label
==
params
[
:label
])
?
'active'
:
'light'
}
%li
{
class:
(
label
.
name
==
params
[
:label
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_path
(
scope:
params
[
:scope
],
label:
label
)
do
=
link_to
projects_dashboard_path
(
scope:
params
[
:scope
],
label:
label
.
name
)
do
%i
.icon-tag
%i
.icon-tag
=
label
=
label
.
name
.span9
.span9
...
...
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