Remove group rendering from dashboard page
This commit is contained in:
parent
c572bdb587
commit
7fd4dc1e11
6 changed files with 6 additions and 46 deletions
|
@ -5,15 +5,9 @@ class DashboardController < ApplicationController
|
||||||
before_filter :event_filter, only: :show
|
before_filter :event_filter, only: :show
|
||||||
|
|
||||||
def 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)
|
@projects = @projects.includes(:namespace)
|
||||||
@last_push = current_user.recent_push
|
@last_push = current_user.recent_push
|
||||||
|
|
||||||
@publicish_project_count = Project.publicish(current_user).count
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
||||||
|
|
|
@ -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.
|
|
|
@ -1,18 +1,3 @@
|
||||||
%ul.nav.nav-tabs.dash-sidebar-tabs
|
= render "dashboard/projects", projects: @projects
|
||||||
%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
|
|
||||||
|
|
||||||
.prepend-top-20
|
.prepend-top-20
|
||||||
= render 'shared/promo'
|
= render 'shared/promo'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
- publicish_project_count = Project.publicish(current_user).count
|
||||||
%h3.page-title Welcome to GitLab!
|
%h3.page-title Welcome to GitLab!
|
||||||
%p.light Self hosted Git management application.
|
%p.light Self hosted Git management application.
|
||||||
%hr
|
%hr
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
%i.fa.fa-plus
|
%i.fa.fa-plus
|
||||||
New Group
|
New Group
|
||||||
|
|
||||||
-if @publicish_project_count > 0
|
-if publicish_project_count > 0
|
||||||
%hr
|
%hr
|
||||||
%div
|
%div
|
||||||
.dashboard-intro-icon
|
.dashboard-intro-icon
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
.dashboard-intro-text
|
.dashboard-intro-text
|
||||||
%p.slead
|
%p.slead
|
||||||
There are
|
There are
|
||||||
%strong= @publicish_project_count
|
%strong= publicish_project_count
|
||||||
public projects on this server.
|
public projects on this server.
|
||||||
%br
|
%br
|
||||||
Public projects are an easy way to allow everyone to have read-only access.
|
Public projects are an easy way to allow everyone to have read-only access.
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
%i.fa.fa-sign-out
|
%i.fa.fa-sign-out
|
||||||
Leave
|
Leave
|
||||||
|
|
||||||
|
= image_tag group_icon(group.path), class: "avatar s40 avatar-tile"
|
||||||
= link_to group, class: 'group-name' do
|
= link_to group, class: 'group-name' do
|
||||||
%strong= group.name
|
%strong= group.name
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- if @has_authorized_projects
|
- if @projects.any?
|
||||||
.dashboard.row
|
.dashboard.row
|
||||||
%section.activities.col-md-8
|
%section.activities.col-md-8
|
||||||
= render 'activities'
|
= render 'activities'
|
||||||
|
|
Loading…
Reference in a new issue