Remove group rendering from dashboard page

This commit is contained in:
Dmitriy Zaporozhets 2015-03-10 13:17:16 -07:00
parent c572bdb587
commit 7fd4dc1e11
6 changed files with 6 additions and 46 deletions

View file

@ -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

View file

@ -1,21 +0,0 @@
.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.

View file

@ -1,18 +1,3 @@
%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'

View file

@ -1,3 +1,4 @@
- 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.

View file

@ -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

View file

@ -1,4 +1,4 @@
- if @has_authorized_projects
- if @projects.any?
.dashboard.row
%section.activities.col-md-8
= render 'activities'