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
8f68c387
Commit
8f68c387
authored
Aug 25, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard activity as separate page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c1b490d6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
16 deletions
+30
-16
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+1
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+15
-7
app/views/dashboard/activity.html.haml
app/views/dashboard/activity.html.haml
+6
-0
app/views/dashboard/show.html.haml
app/views/dashboard/show.html.haml
+1
-8
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+6
-1
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
8f68c387
...
@@ -51,6 +51,7 @@ class Dispatcher
...
@@ -51,6 +51,7 @@ class Dispatcher
MergeRequests
.
init
()
MergeRequests
.
init
()
when
'dashboard:show'
,
'root:show'
when
'dashboard:show'
,
'root:show'
new
Dashboard
()
new
Dashboard
()
when
'dashboard:activity'
new
Activities
()
new
Activities
()
when
'dashboard:projects:starred'
when
'dashboard:projects:starred'
new
Activities
()
new
Activities
()
...
...
app/controllers/dashboard_controller.rb
View file @
8f68c387
class
DashboardController
<
Dashboard
::
ApplicationController
class
DashboardController
<
Dashboard
::
ApplicationController
before_action
:load_projects
before_action
:load_projects
before_action
:event_filter
,
only: :
show
before_action
:event_filter
,
only: :
activity
respond_to
:html
respond_to
:html
...
@@ -10,13 +10,8 @@ class DashboardController < Dashboard::ApplicationController
...
@@ -10,13 +10,8 @@ class DashboardController < Dashboard::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
json
do
load_events
pager_json
(
"events/_events"
,
@events
.
count
)
end
format
.
atom
do
format
.
atom
do
event_filter
load_events
load_events
render
layout:
false
render
layout:
false
end
end
...
@@ -40,6 +35,19 @@ class DashboardController < Dashboard::ApplicationController
...
@@ -40,6 +35,19 @@ class DashboardController < Dashboard::ApplicationController
end
end
end
end
def
activity
@last_push
=
current_user
.
recent_push
respond_to
do
|
format
|
format
.
html
format
.
json
do
load_events
pager_json
(
"events/_events"
,
@events
.
count
)
end
end
end
protected
protected
def
load_projects
def
load_projects
...
...
app/views/dashboard/activity.html.haml
0 → 100644
View file @
8f68c387
=
content_for
:meta_tags
do
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
dashboard_url
(
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"All activity"
)
%section
.activities
=
render
'activities'
app/views/dashboard/show.html.haml
View file @
8f68c387
...
@@ -5,13 +5,6 @@
...
@@ -5,13 +5,6 @@
=
render
'dashboard/projects_head'
=
render
'dashboard/projects_head'
-
if
@projects
.
any?
-
if
@projects
.
any?
=
render
'shared/show_aside'
=
render
'sidebar'
.dashboard.row
%section
.activities.col-md-8
=
render
'activities'
%aside
.col-md-4
=
render
'sidebar'
-
else
-
else
=
render
"zero_authorized_projects"
=
render
"zero_authorized_projects"
app/views/layouts/nav/_dashboard.html.haml
View file @
8f68c387
%ul
.nav.nav-sidebar
%ul
.nav.nav-sidebar
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
,
'projects#trending'
,
'projects#starred'
,
'projects#index'
],
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
,
'projects#trending'
,
'projects#starred'
,
'projects#index'
],
html_options:
{
class:
'home'
})
do
=
link_to
(
current_user
?
root_path
:
explore_root_path
),
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
link_to
(
current_user
?
root_path
:
explore_root_path
),
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
icon
(
'
dashboard
fw'
)
=
icon
(
'
home
fw'
)
%span
%span
Projects
Projects
=
nav_link
(
path:
'dashboard#activity'
)
do
=
link_to
activity_dashboard_path
,
title:
'Activity'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
%span
Activity
=
nav_link
(
controller: :groups
)
do
=
nav_link
(
controller: :groups
)
do
=
link_to
(
current_user
?
dashboard_groups_path
:
explore_groups_path
),
title:
'Groups'
,
data:
{
placement:
'right'
}
do
=
link_to
(
current_user
?
dashboard_groups_path
:
explore_groups_path
),
title:
'Groups'
,
data:
{
placement:
'right'
}
do
=
icon
(
'group fw'
)
=
icon
(
'group fw'
)
...
...
config/routes.rb
View file @
8f68c387
...
@@ -261,6 +261,7 @@ Gitlab::Application.routes.draw do
...
@@ -261,6 +261,7 @@ Gitlab::Application.routes.draw do
member
do
member
do
get
:issues
get
:issues
get
:merge_requests
get
:merge_requests
get
:activity
end
end
scope
module: :dashboard
do
scope
module: :dashboard
do
...
...
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