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
133d7822
Commit
133d7822
authored
Apr 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard -> projects -> filtering by project label
parent
edf41005
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
app/assets/stylesheets/gitlab_bootstrap/lists.scss
app/assets/stylesheets/gitlab_bootstrap/lists.scss
+9
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+9
-0
No files found.
app/assets/stylesheets/gitlab_bootstrap/lists.scss
View file @
133d7822
...
...
@@ -69,5 +69,14 @@ ul.bordered-list {
display
:
block
;
margin
:
0px
;
&
:last-child
{
border
:none
}
&
.active
{
background
:
#f9f9f9
;
a
{
font-weight
:
bold
;
}
}
&
.light
{
a
{
color
:
#777
;
}
}
}
}
app/controllers/dashboard_controller.rb
View file @
133d7822
...
...
@@ -34,6 +34,7 @@ class DashboardController < ApplicationController
@projects
end
@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
)
end
...
...
app/helpers/projects_helper.rb
View file @
133d7822
...
...
@@ -3,6 +3,10 @@ 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 @
133d7822
...
...
@@ -20,6 +20,15 @@
=
nav_tab
:scope
,
'joined'
do
=
link_to
"Joined"
,
projects_dashboard_path
(
scope:
'joined'
)
%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
%i
.icon-tag
=
label
.span9
=
form_tag
projects_dashboard_path
,
method:
'get'
do
%fieldset
.dashboard-search-filter
...
...
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