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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Hide 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
@projects
=
@projects
.
tagged_with
(
params
[
:label
])
if
params
[
:label
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
@labels
=
Project
.
where
(
id:
@projects
.
map
(
&
:id
)).
tags_on
(
:labels
)
end
# Get authored or assigned open merge requests
...
...
app/helpers/projects_helper.rb
View file @
abff0399
...
...
@@ -3,10 +3,6 @@ module ProjectsHelper
"You are going to remove
#{
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
end
def
projects_labels
Project
.
tag_counts_on
(
:labels
).
map
(
&
:name
)
end
def
link_to_project
project
link_to
project
do
title
=
content_tag
(
:strong
,
project
.
name
)
...
...
app/views/dashboard/projects.html.haml
View file @
abff0399
...
...
@@ -22,11 +22,11 @@
%p
.light
Filter by label:
%ul
.bordered-list
-
projects_
labels
.
each
do
|
label
|
%li
{
class:
(
label
==
params
[
:label
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_path
(
scope:
params
[
:scope
],
label:
label
)
do
-
@
labels
.
each
do
|
label
|
%li
{
class:
(
label
.
name
==
params
[
:label
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_path
(
scope:
params
[
:scope
],
label:
label
.
name
)
do
%i
.icon-tag
=
label
=
label
.
name
.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