BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b8f48bf4
Commit
b8f48bf4
authored
Jan 06, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle and refactor dashboard projects page filtering
parent
41654267
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
47 deletions
+72
-47
dashboard_helper.rb
app/helpers/dashboard_helper.rb
+2
-0
_projects_filter.html.haml
app/views/dashboard/_projects_filter.html.haml
+68
-23
projects.html.haml
app/views/dashboard/projects.html.haml
+2
-24
No files found.
app/helpers/dashboard_helper.rb
View file @
b8f48bf4
...
...
@@ -4,6 +4,8 @@ module DashboardHelper
sort:
params
[
:sort
],
scope:
params
[
:scope
],
group:
params
[
:group
],
tag:
params
[
:tag
],
visibility_level:
params
[
:visibility_level
],
}
options
=
exist_opts
.
merge
(
options
)
...
...
app/views/dashboard/_projects_filter.html.haml
View file @
b8f48bf4
%fieldset
%ul
.nav.nav-pills.nav-stacked
.dash-projects-filters.append-bottom-20
.pull-left.append-right-20
%ul
.nav.nav-pills.nav-compact
=
nav_tab
:scope
,
nil
do
=
link_to
projects_dashboard_filter_path
(
scope:
nil
)
do
All
%span
.pull-right
=
current_user
.
authorized_projects
.
count
=
nav_tab
:scope
,
'personal'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'personal'
)
do
Personal
%span
.pull-right
=
current_user
.
personal_projects
.
count
=
nav_tab
:scope
,
'joined'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'joined'
)
do
Joined
%span
.pull-right
=
current_user
.
authorized_projects
.
joined
(
current_user
).
count
=
nav_tab
:scope
,
'owned'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'owned'
)
do
Owned
%span
.pull-right
=
current_user
.
owned_projects
.
count
%fieldset
%legend
Visibility
%ul
.nav.nav-pills.nav-stacked.nav-small.visibility-filter
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-globe
%span
.light
Visibility:
-
if
params
[
:visibility_level
].
present?
=
visibility_level_label
(
params
[
:visibility_level
].
to_i
)
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
visibility_level:
nil
)
do
Any
-
Gitlab
::
VisibilityLevel
.
values
.
each
do
|
level
|
%li
{
class:
(
level
.
to_s
==
params
[
:visibility_level
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
visibility_level:
level
)
do
=
visibility_level_icon
(
level
)
=
visibility_level_label
(
level
)
-
if
@groups
.
present?
%fieldset
%legend
Groups
%ul
.nav.nav-pills.nav-stacked.nav-small
-
if
@groups
.
present?
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-group
%span
.light
Group:
-
if
params
[
:group
].
present?
=
Group
.
find_by
(
name:
params
[
:group
]).
name
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
group:
nil
)
do
Any
-
@groups
.
each
do
|
group
|
%li
{
class:
(
group
.
name
==
params
[
:group
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
group:
group
.
name
)
do
%i
.fa.fa-folder-o
=
group
.
name
%small
.pull-right
=
group
.
projects
.
count
-
if
@tags
.
present?
%fieldset
%legend
Tags
%ul
.nav.nav-pills.nav-stacked.nav-small
-
if
@tags
.
present?
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-tags
%span
.light
Tags:
-
if
params
[
:tag
].
present?
=
params
[
:tag
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
tag:
nil
)
do
Any
-
@tags
.
each
do
|
tag
|
%li
{
class:
(
tag
.
name
==
params
[
:tag
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
scope:
params
[
:scope
],
tag:
tag
.
name
)
do
=
link_to
projects_dashboard_filter_path
(
tag:
tag
.
name
)
do
%i
.fa.fa-tag
=
tag
.
name
.pull-right
.dropdown.inline
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%span
.light
sort:
-
if
@sort
.
present?
=
@sort
.
humanize
-
else
Name
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
sort:
nil
)
do
Name
=
link_to
projects_dashboard_filter_path
(
sort:
'newest'
)
do
=
sort_title_recently_created
=
link_to
projects_dashboard_filter_path
(
sort:
'oldest'
)
do
=
sort_title_oldest_created
=
link_to
projects_dashboard_filter_path
(
sort:
'recently_updated'
)
do
=
sort_title_recently_updated
=
link_to
projects_dashboard_filter_path
(
sort:
'last_updated'
)
do
=
sort_title_oldest_updated
app/views/dashboard/projects.html.haml
View file @
b8f48bf4
%h3
.page-title
My Projects
.pull-right
.dropdown.inline
%a
.dropdown-toggle.btn.btn-small
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%span
.light
sort:
-
if
@sort
.
present?
=
@sort
.
humanize
-
else
Name
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
sort:
nil
)
do
Name
=
link_to
projects_dashboard_filter_path
(
sort:
'newest'
)
do
=
sort_title_recently_created
=
link_to
projects_dashboard_filter_path
(
sort:
'oldest'
)
do
=
sort_title_oldest_created
=
link_to
projects_dashboard_filter_path
(
sort:
'recently_updated'
)
do
=
sort_title_recently_updated
=
link_to
projects_dashboard_filter_path
(
sort:
'last_updated'
)
do
=
sort_title_oldest_updated
%p
.light
All projects you have access to are listed here. Public projects are not included here unless you are a member
%hr
.row
.col-md-3.hidden-sm.hidden-xs.side-filters
.side-filters
=
render
"projects_filter"
.col-md-9
.dash-projects
%ul
.bordered-list.my-projects.top-list
-
@projects
.
each
do
|
project
|
%li
.my-project-row
...
...
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