Skip to content
Snippets Groups Projects
Commit 2221ed87 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Add Group > Activity page and in the group nav bar

parent d3a51414
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -74,7 +74,7 @@ class Dispatcher
shortcut_handler = new ShortcutsNavigation()
when 'projects:show'
shortcut_handler = new ShortcutsNavigation()
when 'groups:show'
when 'groups:activity'
new Activities()
shortcut_handler = new ShortcutsNavigation()
when 'groups:group_members:index'
Loading
Loading
Loading
Loading
@@ -2,17 +2,17 @@ class GroupsController < Groups::ApplicationController
include IssuesAction
include MergeRequestsAction
 
skip_before_action :authenticate_user!, only: [:show, :projects, :issues, :merge_requests]
skip_before_action :authenticate_user!, only: [:activity, :issues, :merge_requests]
respond_to :html
before_action :find_group, except: [:new, :create]
 
# Authorize
before_action :authorize_read_group!, except: [:show, :new, :create, :autocomplete]
before_action :authorize_read_group!, except: [:activity, :new, :create, :autocomplete]
before_action :authorize_admin_group!, only: [:edit, :update, :destroy]
before_action :authorize_create_group!, only: [:new, :create]
 
before_action :find_projects, only: [:show, :issues, :merge_requests]
before_action :event_filter, only: :show
before_action :find_projects, only: [:activity, :issues, :merge_requests]
before_action :event_filter, only: :activity
 
layout :determine_layout
 
Loading
Loading
@@ -36,7 +36,7 @@ class GroupsController < Groups::ApplicationController
end
end
 
def show
def activity
@last_push = current_user.recent_push if current_user
 
respond_to do |format|
Loading
Loading
Loading
Loading
@@ -22,7 +22,7 @@
= markdown(@group.description, pipeline: :description)
 
%ul.nav-links
= nav_link(page: group_path(@group)) do
= link_to 'Activity', group_path(@group)
= nav_link(page: group_projects_path(@group)) do
= nav_link(path: 'groups#activity') do
= link_to 'Activity', activity_group_path(@group)
= nav_link(path: 'groups/projects#index') do
= link_to 'Projects', group_projects_path(@group)
Loading
Loading
@@ -12,4 +12,4 @@
= link_to group_projects_path(@group, scope: 'starred', sort: @sort), title: "Starred projects from the '#{@group.name}' group", data: {placement: 'right'} do
Starred
 
= render 'shared/projects/controls'
= render 'shared/projects/controls', disable_dropdown_filters: true
- header_title group_title(@group, "Activity", activity_group_path(@group))
= 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")
Loading
Loading
- @disable_dropdown_filters = true
= render 'groups/header'
%div{class: container_class}
.tab-content
.tab-pane.active
- if can?(current_user, :read_group, @group) && @projects.any?
= render 'groups/projects_head'
= render 'groups/projects', projects: @projects
- else
.nothing-here-block No projects to see
- header_title group_title(@group, "Projects", group_projects_path(@group))
= render 'groups/header'
%div{class: container_class}
.tab-content
.tab-pane.active
- if can?(current_user, :read_group, @group) && @projects.any?
= render 'groups/projects_head'
= render 'groups/projects', projects: @projects
- else
.nothing-here-block No projects to see
Loading
Loading
@@ -7,11 +7,16 @@
 
%li.separate-item
 
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: 'Home' do
= nav_link(path: 'groups#activity', html_options: {class: 'home'}) do
= link_to activity_group_path(@group), title: 'Home' do
= icon('dashboard fw')
%span
Group
Activity
= nav_link(path: 'groups/projects#index') do
= link_to group_projects_path(@group), title: 'Projects' do
= icon('cube fw')
%span
Projects
- if can?(current_user, :read_group, @group)
- if current_user
= nav_link(controller: [:group, :milestones]) do
Loading
Loading
Loading
Loading
@@ -3,10 +3,9 @@
.form-group.hidden-xs.hidden-sm= search_field_tag :filter_projects, nil, placeholder: 'Filter by name...', class: 'projects-list-filter form-control', spellcheck: false
 
- unless defined?(disable_projects) && disable_projects
.form-group.prepend-left-10.hidden-xs= render 'shared/projects/dropdown'
.form-group.prepend-left-10.hidden-xs= render 'shared/projects/dropdown', disable_filters: defined?(disable_dropdown_filters) && disable_dropdown_filters
 
- if current_user && current_user.can_create_project?
.form-group.prepend-left-10
= link_to new_project_path, class: 'btn btn-green' do
%i.fa.fa-plus
New Project
= icon('plus', text: 'New Project')
Loading
Loading
@@ -9,7 +9,7 @@
%li= link_to_sort sort_title_stars, sort_value_stars, @sort
%li= link_to_sort sort_title_name, sort_value_name, @sort
 
- if current_user && !@disable_dropdown_filters
- unless !current_user || (defined?(disable_filters) && disable_filters)
%hr
%li= link_to_filter 'Owned by anyone', 'all', @filter
%li= link_to_filter 'Owned by me', 'personal', @filter
Loading
Loading
@@ -344,6 +344,8 @@ Rails.application.routes.draw do
#
resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
member do
get :show, to: :activity
get :activity
get :issues
get :merge_requests
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment