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
Tatuya Kamada
gitlab-ce
Commits
a2efc277
Commit
a2efc277
authored
Dec 06, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/project_visibility_filter' of /home/git/repositories/gitlab/gitlabhq
parents
a767c133
3b20c890
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
app/assets/stylesheets/sections/dashboard.scss
app/assets/stylesheets/sections/dashboard.scss
+18
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-0
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+10
-4
No files found.
app/assets/stylesheets/sections/dashboard.scss
View file @
a2efc277
...
...
@@ -100,3 +100,21 @@
padding
:
2px
5px
;
}
}
.project-access-icon
{
margin-left
:
10px
;
float
:
left
;
margin-right
:
15px
;
font-size
:
20px
;
margin-bottom
:
15px
;
border
:
1px
solid
#EEE
;
padding
:
8px
12px
;
border-radius
:
50px
;
background
:
#f5f5f5
;
width
:
16px
;
text-align
:
center
;
i
{
color
:
#BBB
;
}
}
app/controllers/dashboard_controller.rb
View file @
a2efc277
...
...
@@ -40,6 +40,7 @@ class DashboardController < ApplicationController
end
@projects
=
@projects
.
where
(
namespace_id:
Group
.
find_by_name
(
params
[
:group
]))
if
params
[
:group
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
includes
(
:namespace
).
sorted_by_activity
@labels
=
current_user
.
authorized_projects
.
tags_on
(
:labels
)
...
...
app/views/dashboard/projects.html.haml
View file @
a2efc277
...
...
@@ -26,6 +26,14 @@
%span
.pull-right
=
current_user
.
owned_projects
.
count
%fieldset
%legend
Visibility
%ul
.bordered-list.visibility-filter
-
Gitlab
::
VisibilityLevel
.
values
.
each
do
|
level
|
%li
{
class:
(
level
.
to_s
==
params
[
:visibility_level
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_path
(
visibility_level:
level
)
do
=
visibility_level_icon
(
level
)
=
visibility_level_label
(
level
)
-
if
@groups
.
present?
%fieldset
...
...
@@ -56,12 +64,10 @@
-
@projects
.
each
do
|
project
|
%li
.my-project-row
%h4
.project-title
.project-access-icon
=
visibility_level_icon
(
project
.
visibility_level
)
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
=
project
.
name_with_namespace
-
unless
project
.
private?
%small
.access-icon
=
visibility_level_icon
(
project
.
visibility_level
)
=
visibility_level_label
(
project
.
visibility_level
)
-
if
current_user
.
can_leave_project?
(
project
)
.pull-right
...
...
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