Commit 8f68c387 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dashboard activity as separate page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c1b490d6
......@@ -51,6 +51,7 @@ class Dispatcher
MergeRequests.init()
when 'dashboard:show', 'root:show'
new Dashboard()
when 'dashboard:activity'
new Activities()
when 'dashboard:projects:starred'
new Activities()
......
class DashboardController < Dashboard::ApplicationController
before_action :load_projects
before_action :event_filter, only: :show
before_action :event_filter, only: :activity
respond_to :html
......@@ -10,13 +10,8 @@ class DashboardController < Dashboard::ApplicationController
respond_to do |format|
format.html
format.json do
load_events
pager_json("events/_events", @events.count)
end
format.atom do
event_filter
load_events
render layout: false
end
......@@ -40,6 +35,19 @@ class DashboardController < Dashboard::ApplicationController
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
def load_projects
......
= 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'
......@@ -5,13 +5,6 @@
= render 'dashboard/projects_head'
- if @projects.any?
= render 'shared/show_aside'
.dashboard.row
%section.activities.col-md-8
= render 'activities'
%aside.col-md-4
= render 'sidebar'
- else
= render "zero_authorized_projects"
%ul.nav.nav-sidebar
= 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
= icon('dashboard fw')
= icon('home fw')
%span
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
= link_to (current_user ? dashboard_groups_path : explore_groups_path), title: 'Groups', data: {placement: 'right'} do
= icon('group fw')
......
......@@ -261,6 +261,7 @@ Gitlab::Application.routes.draw do
member do
get :issues
get :merge_requests
get :activity
end
scope module: :dashboard do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment