summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/_dashboard.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/nav/_dashboard.html.haml')
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml59
1 files changed, 28 insertions, 31 deletions
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index a77d39acb8c..8f010196d1a 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -1,46 +1,43 @@
%ul.nav.nav-sidebar
- = nav_link(path: ['dashboard#show', 'root#show', 'projects#starred'], html_options: {class: 'home'}) do
- = link_to root_path, title: 'Home', class: 'shortcuts-activity', data: {placement: 'right'} do
+ = nav_link(path: ['dashboard#show', 'root#show', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do
+ = link_to (current_user ? root_path : explore_root_path), title: 'Home', class: 'shortcuts-activity', data: {placement: 'right'} do
= icon('dashboard fw')
%span
Projects
- -#= nav_link(path: 'projects#starred') do
- -#= link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do
- -#= icon('star fw')
- -#%span
- -#Starred Projects
= nav_link(controller: :groups) do
- = link_to dashboard_groups_path, title: 'Groups', data: {placement: 'right'} do
+ = link_to (current_user ? dashboard_groups_path : explore_groups_path), title: 'Groups', data: {placement: 'right'} do
= icon('group fw')
%span
Groups
- = nav_link(controller: :milestones) do
- = link_to dashboard_milestones_path, title: 'Milestones', data: {placement: 'right'} do
- = icon('clock-o fw')
- %span
- Milestones
- = nav_link(path: 'dashboard#issues') do
- = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'shortcuts-issues', data: {placement: 'right'} do
- = icon('exclamation-circle fw')
- %span
- Issues
- %span.count= current_user.assigned_issues.opened.count
- = nav_link(path: 'dashboard#merge_requests') do
- = link_to assigned_mrs_dashboard_path, title: 'Merge Requests', class: 'shortcuts-merge_requests', data: {placement: 'right'} do
- = icon('tasks fw')
- %span
- Merge Requests
- %span.count= current_user.assigned_merge_requests.opened.count
+ - if current_user
+ = nav_link(controller: :milestones) do
+ = link_to dashboard_milestones_path, title: 'Milestones', data: {placement: 'right'} do
+ = icon('clock-o fw')
+ %span
+ Milestones
+ = nav_link(path: 'dashboard#issues') do
+ = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'shortcuts-issues', data: {placement: 'right'} do
+ = icon('exclamation-circle fw')
+ %span
+ Issues
+ %span.count= current_user.assigned_issues.opened.count
+ = nav_link(path: 'dashboard#merge_requests') do
+ = link_to assigned_mrs_dashboard_path, title: 'Merge Requests', class: 'shortcuts-merge_requests', data: {placement: 'right'} do
+ = icon('tasks fw')
+ %span
+ Merge Requests
+ %span.count= current_user.assigned_merge_requests.opened.count
= nav_link(controller: :snippets) do
- = link_to user_snippets_path(current_user), title: 'Your snippets', data: {placement: 'right'} do
+ = link_to (current_user ? user_snippets_path(current_user) : snippets_path), title: 'Your snippets', data: {placement: 'right'} do
= icon('dashboard fw')
%span
Snippets
- = nav_link(controller: :profile) do
- = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
- = icon('user fw')
- %span
- Profile
+ - if current_user
+ = nav_link(controller: :profile) do
+ = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
+ = icon('user fw')
+ %span
+ Profile
= nav_link(controller: :help) do
= link_to help_path, title: 'Help', data: {placement: 'right'} do
= icon('question-circle fw')