Commit 7fd4dc1e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove group rendering from dashboard page

parent c572bdb5
......@@ -5,15 +5,9 @@ class DashboardController < ApplicationController
before_filter :event_filter, only: :show
def show
@projects_limit = 20
@groups = current_user.authorized_groups.order_name_asc
@has_authorized_projects = @projects.count > 0
@projects_count = @projects.count
@projects = @projects.includes(:namespace)
@last_push = current_user.recent_push
@publicish_project_count = Project.publicish(current_user).count
respond_to do |format|
format.html
......
.panel.panel-default
.panel-heading.clearfix
.input-group
= search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_group?
.input-group-addon.dash-new-group
= link_to new_group_path, class: "" do
%strong New group
%ul.well-list.dash-list
- groups.each do |group|
%li.group-row
= link_to group_path(id: group.path), class: dom_class(group) do
.dash-project-avatar
= image_tag group_icon(group.path), class: "avatar s40"
%span.group-name.filter-title
= truncate(group.name, length: 35)
%span.arrow
%i.fa.fa-angle-right
- if groups.blank?
%li
.nothing-here-block You have no groups yet.
%ul.nav.nav-tabs.dash-sidebar-tabs
%li.active
= link_to '#projects', 'data-toggle' => 'tab', id: 'sidebar-projects-tab' do
Projects
%span.badge= @projects_count
%li
= link_to '#groups', 'data-toggle' => 'tab', id: 'sidebar-groups-tab' do
Groups
%span.badge= @groups.count
.tab-content
.tab-pane.active#projects
= render "dashboard/projects", projects: @projects
.tab-pane#groups
= render "dashboard/groups", groups: @groups
= render "dashboard/projects", projects: @projects
.prepend-top-20
= render 'shared/promo'
- publicish_project_count = Project.publicish(current_user).count
%h3.page-title Welcome to GitLab!
%p.light Self hosted Git management application.
%hr
......@@ -35,7 +36,7 @@
%i.fa.fa-plus
New Group
-if @publicish_project_count > 0
-if publicish_project_count > 0
%hr
%div
.dashboard-intro-icon
......@@ -43,7 +44,7 @@
.dashboard-intro-text
%p.slead
There are
%strong= @publicish_project_count
%strong= publicish_project_count
public projects on this server.
%br
Public projects are an easy way to allow everyone to have read-only access.
......
......@@ -27,6 +27,7 @@
%i.fa.fa-sign-out
Leave
= image_tag group_icon(group.path), class: "avatar s40 avatar-tile"
= link_to group, class: 'group-name' do
%strong= group.name
......
- if @has_authorized_projects
- if @projects.any?
.dashboard.row
%section.activities.col-md-8
= render 'activities'
......
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