summaryrefslogtreecommitdiff
path: root/app/views/dashboard
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-10 11:57:14 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-10 11:57:14 +0200
commit8812d9dee2340ba33d1272ed6ea0736c8eb371d0 (patch)
tree89998e16978a95d8dd0bad16df47c99db54fdde8 /app/views/dashboard
parent96c627edd8ed3a74a28200d77d3fc42abe9fb19b (diff)
downloadgitlab-ce-8812d9dee2340ba33d1272ed6ea0736c8eb371d0.tar.gz
Move groups and teams to tabs on dashboard. Remember tab with cookie
Diffstat (limited to 'app/views/dashboard')
-rw-r--r--app/views/dashboard/_groups.html.haml3
-rw-r--r--app/views/dashboard/_sidebar.html.haml28
-rw-r--r--app/views/dashboard/_teams.html.haml7
3 files changed, 28 insertions, 10 deletions
diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml
index ba8d3029eaf..89158f4d166 100644
--- a/app/views/dashboard/_groups.html.haml
+++ b/app/views/dashboard/_groups.html.haml
@@ -16,3 +16,6 @@
%span.pull-right.light
- if group.owner == current_user
%i.icon-wrench
+ - if groups.blank?
+ %li
+ %h3.nothing_here_message You have no groups yet.
diff --git a/app/views/dashboard/_sidebar.html.haml b/app/views/dashboard/_sidebar.html.haml
index 7c6daf6ec31..876a5b61297 100644
--- a/app/views/dashboard/_sidebar.html.haml
+++ b/app/views/dashboard/_sidebar.html.haml
@@ -1,13 +1,25 @@
-- if @teams.present?
- = render "teams", teams: @teams
-- if @groups.present?
- = render "groups", groups: @groups
-= render "projects", projects: @projects
-%div
+%ul.nav.nav-tabs.dash-sidebar-tabs
+ %li.active
+ = link_to 'Projects', '#projects', 'data-toggle' => 'tab', id: 'sidebar-projects-tab'
+ %li
+ = link_to 'Groups', '#groups', 'data-toggle' => 'tab', id: 'sidebar-groups-tab'
+ %li
+ = link_to 'Teams', '#teams', 'data-toggle' => 'tab', id: 'sidebar-teams-tab'
+
+.tab-content
+ .tab-pane.active#projects
+ = render "projects", projects: @projects
+ .tab-pane#groups
+ = render "groups", groups: @groups
+ .tab-pane#teams
+ = render "teams", teams: @teams
+
+.prepend-top-20
%span.rss-icon
= link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
- = image_tag "rss_ui.png", title: "feed"
- %strong News Feed
+ %strong
+ %i.icon-rss
+ News Feed
%hr
.gitlab-promo
diff --git a/app/views/dashboard/_teams.html.haml b/app/views/dashboard/_teams.html.haml
index f56115856a7..5c28f964cb6 100644
--- a/app/views/dashboard/_teams.html.haml
+++ b/app/views/dashboard/_teams.html.haml
@@ -2,13 +2,13 @@
%h5.title
Teams
%small
- (#{@teams.count})
+ (#{teams.count})
%span.pull-right
= link_to new_team_path, class: "btn btn-tiny info" do
%i.icon-plus
New Team
%ul.well-list
- - @teams.each do |team|
+ - teams.each do |team|
%li
= link_to team_path(id: team.path), class: dom_class(team) do
%strong.well-title= truncate(team.name, length: 35)
@@ -18,3 +18,6 @@
- tm = current_user.user_team_user_relationships.find_by_user_team_id(team.id)
- if tm
= tm.access_human
+ - if teams.blank?
+ %li
+ %h3.nothing_here_message You have no teams yet.