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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d36ee319
Commit
d36ee319
authored
Mar 09, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add starred projects page to dashboard
parent
e89ffd54
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
3 deletions
+68
-3
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+3
-0
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+27
-0
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+2
-2
app/views/dashboard/projects/starred.html.haml
app/views/dashboard/projects/starred.html.haml
+23
-0
app/views/events/_events.html.haml
app/views/events/_events.html.haml
+1
-1
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+5
-0
config/routes.rb
config/routes.rb
+6
-0
No files found.
CHANGELOG
View file @
d36ee319
...
...
@@ -33,6 +33,7 @@ v 7.9.0 (unreleased)
- Send notifications and leave system comments when bulk updating issues.
- Automatically link commit ranges to compare page: sha1...sha4 or sha1..sha4 (includes sha1 in comparison)
- Move groups page from profile to dashboard
- Starred projects page at dashboard
v 7.8.2
- Fix service migration issue when upgrading from versions prior to 7.3
...
...
app/assets/javascripts/dispatcher.js.coffee
View file @
d36ee319
...
...
@@ -55,6 +55,9 @@ class Dispatcher
when
'dashboard:show'
new
Dashboard
()
new
Activities
()
when
'dashboard:projects:starred'
new
Activities
()
new
ProjectsList
()
when
'projects:commit:show'
new
Commit
()
new
Diff
()
...
...
app/controllers/dashboard/projects_controller.rb
0 → 100644
View file @
d36ee319
class
Dashboard::ProjectsController
<
ApplicationController
before_filter
:event_filter
def
starred
@projects
=
current_user
.
starred_projects
@projects
=
@projects
.
includes
(
:namespace
,
:forked_from_project
,
:tags
)
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@groups
=
[]
respond_to
do
|
format
|
format
.
html
format
.
json
do
load_events
pager_json
(
"events/_events"
,
@events
.
count
)
end
end
end
private
def
load_events
@events
=
Event
.
in_projects
(
@projects
.
pluck
(
:id
))
@events
=
@event_filter
.
apply_filter
(
@events
).
with_associations
@events
=
@events
.
limit
(
20
).
offset
(
params
[
:offset
]
||
0
)
end
end
app/views/dashboard/_sidebar.html.haml
View file @
d36ee319
...
...
@@ -10,9 +10,9 @@
.tab-content
.tab-pane.active
#projects
=
render
"projects"
,
projects:
@projects
=
render
"
dashboard/
projects"
,
projects:
@projects
.tab-pane
#groups
=
render
"groups"
,
groups:
@groups
=
render
"
dashboard/
groups"
,
groups:
@groups
.prepend-top-20
=
render
'shared/promo'
app/views/dashboard/projects/starred.html.haml
0 → 100644
View file @
d36ee319
-
if
@projects
.
any?
.dashboard.row
%section
.activities.col-md-8
=
render
'dashboard/activities'
%aside
.col-md-4
.panel.panel-default
.panel-heading.clearfix
.input-group
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name'
,
class:
'projects-list-filter form-control'
-
if
current_user
.
can_create_project?
.input-group-addon.dash-new-project
=
link_to
new_project_path
do
%strong
New project
=
render
'shared/projects_list'
,
projects:
@projects
,
projects_limit:
20
,
stars:
true
,
avatar:
false
=
link_to
'#aside'
,
class:
'show-aside'
do
%i
.fa.fa-angle-left
-
else
%h3
You dont have starred projects yet
%p
.slead
Visit project page and press on star icon and it will appear on this page.
app/views/events/_events.html.haml
View file @
d36ee319
=
render
@events
=
render
partial:
'events/event'
,
collection:
@events
app/views/layouts/nav/_dashboard.html.haml
View file @
d36ee319
...
...
@@ -9,6 +9,11 @@
%i
.fa.fa-cube
%span
Projects
=
nav_link
(
path:
'projects#starred'
)
do
=
link_to
starred_dashboard_projects_path
,
title:
'Starred Projects'
do
%i
.fa.fa-star
%span
Starred Projects
=
nav_link
(
controller: :groups
)
do
=
link_to
dashboard_groups_path
,
title:
'Groups'
do
%i
.fa.fa-group
...
...
config/routes.rb
View file @
d36ee319
...
...
@@ -221,6 +221,12 @@ Gitlab::Application.routes.draw do
delete
:leave
end
end
resources
:projects
,
only:
[]
do
collection
do
get
:starred
end
end
end
end
...
...
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