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
Boxiang Sun
gitlab-ce
Commits
78680a81
Commit
78680a81
authored
Jun 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filter projects on dashboard
parent
fcccf762
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
8 deletions
+35
-8
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+15
-0
app/assets/stylesheets/sections/dashboard.scss
app/assets/stylesheets/sections/dashboard.scss
+10
-0
app/views/dashboard/_projects.html.haml
app/views/dashboard/_projects.html.haml
+4
-6
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+6
-2
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
78680a81
...
...
@@ -8,6 +8,21 @@ class Dashboard
@
toggleFilter
(
$
(
event
.
currentTarget
))
@
reloadActivities
()
$
(
".dash-projects-filter"
).
keyup
->
terms
=
$
(
this
).
val
()
if
terms
==
""
||
terms
==
undefined
$
(
".dash-projects-list li"
).
show
()
else
$
(
".dash-projects-list li"
).
each
(
index
)
->
name
=
$
(
this
).
find
(
".well-title"
).
text
()
if
name
.
search
(
terms
)
==
-
1
$
(
this
).
hide
()
else
$
(
this
).
show
()
reloadActivities
:
->
$
(
".content_list"
).
html
''
Pager
.
init
20
,
true
...
...
app/assets/stylesheets/sections/dashboard.scss
View file @
78680a81
...
...
@@ -46,3 +46,13 @@
}
}
.dashboard
{
.dash-projects-filter
{
margin
:
0
;
padding
:
4px
6px
;
width
:
202px
;
float
:
left
;
margin-top
:
3px
;
margin-left
:
-2px
;
}
}
app/views/dashboard/_projects.html.haml
View file @
78680a81
.ui-box
%h5
.title
Projects
%span
.light
(
#{
@projects_count
}
)
%h5
.title.clearfix
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name'
,
class:
'dash-projects-filter'
-
if
current_user
.
can_create_project?
%span
.pull-right
=
link_to
new_project_path
,
class:
"btn
btn-small
"
do
=
link_to
new_project_path
,
class:
"btn"
do
%i
.icon-plus
New Project
%ul
.well-list
%ul
.well-list
.dash-projects-list
-
projects
.
each
do
|
project
|
%li
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
...
...
app/views/dashboard/_sidebar.html.haml
View file @
78680a81
%ul
.nav.nav-tabs.dash-sidebar-tabs
%li
.active
=
link_to
'Projects'
,
'#projects'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-projects-tab'
=
link_to
'#projects'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-projects-tab'
do
Projects
%span
.badge
=
@projects_count
%li
=
link_to
'Groups'
,
'#groups'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-groups-tab'
=
link_to
'#groups'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-groups-tab'
do
Groups
%span
.badge
=
@groups
.
count
.tab-content
.tab-pane.active
#projects
...
...
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