Commit ee14ac68 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'group-activity-separate-tab' into 'master'

Move group activity feed to separate page for consistency with dashboard
and project pages

Fixes #14161. Part of #13480 

See merge request !3157
parents d7b386ce 90ffb1c0
...@@ -27,6 +27,7 @@ v 8.6.0 (unreleased) ...@@ -27,6 +27,7 @@ v 8.6.0 (unreleased)
- Show labels in dashboard and group milestone views - Show labels in dashboard and group milestone views
- Add main language of a project in the list of projects (Tiago Botelho) - Add main language of a project in the list of projects (Tiago Botelho)
- Add ability to show archived projects on dashboard, explore and group pages - Add ability to show archived projects on dashboard, explore and group pages
- Move group activity to separate page
v 8.5.5 v 8.5.5
- Ensure removing a project removes associated Todo entries - Ensure removing a project removes associated Todo entries
......
...@@ -74,8 +74,9 @@ class Dispatcher ...@@ -74,8 +74,9 @@ class Dispatcher
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
new TreeView() if $('#tree-slider').length new TreeView() if $('#tree-slider').length
when 'groups:show' when 'groups:activity'
new Activities() new Activities()
when 'groups:show'
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
when 'groups:group_members:index' when 'groups:group_members:index'
new GroupMembers() new GroupMembers()
......
...@@ -15,7 +15,7 @@ class GroupsController < Groups::ApplicationController ...@@ -15,7 +15,7 @@ class GroupsController < Groups::ApplicationController
# Load group projects # Load group projects
before_action :load_projects, except: [:index, :new, :create, :projects, :edit, :update, :autocomplete] before_action :load_projects, except: [:index, :new, :create, :projects, :edit, :update, :autocomplete]
before_action :event_filter, only: [:show, :events] before_action :event_filter, only: [:activity]
layout :determine_layout layout :determine_layout
...@@ -62,8 +62,10 @@ class GroupsController < Groups::ApplicationController ...@@ -62,8 +62,10 @@ class GroupsController < Groups::ApplicationController
end end
end end
def events def activity
respond_to do |format| respond_to do |format|
format.html
format.json do format.json do
load_events load_events
pager_json("events/_events", @events.count) pager_json("events/_events", @events.count)
......
.hidden-xs
= render "events/event_last_push", event: @last_push
.nav-block
- if current_user
.controls
= link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'btn rss-btn' do
%i.fa.fa-rss
= render 'shared/event_filter'
.content_list
= spinner
= content_for :meta_tags do
- if current_user
= auto_discovery_link_tag(:atom, group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} activity")
- page_title "Activity"
- header_title group_title(@group, "Activity", activity_group_path(@group))
%section.activities
= render 'activities'
...@@ -30,26 +30,13 @@ ...@@ -30,26 +30,13 @@
%ul.nav-links %ul.nav-links
%li.active %li.active
= link_to "#activity", 'data-toggle' => 'tab' do
Activity
%li
= link_to "#projects", 'data-toggle' => 'tab' do = link_to "#projects", 'data-toggle' => 'tab' do
Projects Projects
- if can?(current_user, :read_group, @group) - if can?(current_user, :read_group, @group)
%div{ class: container_class } %div{ class: container_class }
.tab-content .tab-content
.tab-pane.active#activity .tab-pane.active#projects
.activity-filter-block
- if current_user
= render "events/event_last_push", event: @last_push
= render 'shared/event_filter'
.content_list{data: {href: events_group_path}}
= spinner
.tab-pane#projects
= render "projects", projects: @projects = render "projects", projects: @projects
- else - else
......
...@@ -9,10 +9,15 @@ ...@@ -9,10 +9,15 @@
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: 'Home' do = link_to group_path(@group), title: 'Home' do
= icon('dashboard fw') = icon('group fw')
%span %span
Group Group
- if can?(current_user, :read_group, @group) - if can?(current_user, :read_group, @group)
= nav_link(path: 'groups#activity') do
= link_to activity_group_path(@group), title: 'Activity' do
= icon('dashboard fw')
%span
Activity
- if current_user - if current_user
= nav_link(controller: [:group, :milestones]) do = nav_link(controller: [:group, :milestones]) do
= link_to group_milestones_path(@group), title: 'Milestones' do = link_to group_milestones_path(@group), title: 'Milestones' do
......
...@@ -382,7 +382,7 @@ Rails.application.routes.draw do ...@@ -382,7 +382,7 @@ Rails.application.routes.draw do
get :issues get :issues
get :merge_requests get :merge_requests
get :projects get :projects
get :events get :activity
end end
scope module: :groups do scope module: :groups do
......
...@@ -15,6 +15,10 @@ Feature: Groups ...@@ -15,6 +15,10 @@ Feature: Groups
Scenario: I should see group "Owned" dashboard list Scenario: I should see group "Owned" dashboard list
When I visit group "Owned" page When I visit group "Owned" page
Then I should see group "Owned" projects list Then I should see group "Owned" projects list
@javascript
Scenario: I should see group "Owned" activity feed
When I visit group "Owned" activity page
And I should see projects activity feed And I should see projects activity feed
Scenario: I should see group "Owned" issues list Scenario: I should see group "Owned" issues list
......
...@@ -27,6 +27,10 @@ module SharedPaths ...@@ -27,6 +27,10 @@ module SharedPaths
visit group_path(Group.find_by(name: "Owned")) visit group_path(Group.find_by(name: "Owned"))
end end
step 'I visit group "Owned" activity page' do
visit activity_group_path(Group.find_by(name: "Owned"))
end
step 'I visit group "Owned" issues page' do step 'I visit group "Owned" issues page' do
visit issues_group_path(Group.find_by(name: "Owned")) visit issues_group_path(Group.find_by(name: "Owned"))
end end
......
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