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

Fix bug getting started message when navigate to personal projects w/o them exist

parent 87e0429f
...@@ -7,6 +7,8 @@ class DashboardController < ApplicationController ...@@ -7,6 +7,8 @@ class DashboardController < ApplicationController
def index def index
@groups = current_user.authorized_groups @groups = current_user.authorized_groups
@has_authorized_projects = @projects.count > 0
@projects = case params[:scope] @projects = case params[:scope]
when 'personal' then when 'personal' then
@projects.personal(current_user) @projects.personal(current_user)
......
= render "events/event_last_push", event: @last_push
.event_filter
= event_filter_link EventFilter.push, 'Push events'
= event_filter_link EventFilter.merged, 'Merge events'
= event_filter_link EventFilter.comments, 'Comments'
= event_filter_link EventFilter.team, 'Team'
- if @events.any?
.content_list= render @events
- else
%p.nothing_here_message Projects activity will be displayed here
.loading.hide
...@@ -30,4 +30,7 @@ ...@@ -30,4 +30,7 @@
%span.last_activity %span.last_activity
%strong Last activity: %strong Last activity:
%span= project_last_activity(project) %span= project_last_activity(project)
- if projects.blank?
%li.wll
%h3.nothing_here_message There are no projects here.
.bottom= paginate projects, theme: "gitlab" .bottom= paginate projects, theme: "gitlab"
- if @groups.present?
= render "groups", groups: @groups
= render "projects", projects: @projects
%div
%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
%hr
.gitlab-promo
= link_to "Homepage", "http://gitlabhq.com"
= link_to "Blog", "http://blog.gitlabhq.com"
= link_to "@gitlabhq", "https://twitter.com/gitlabhq"
%h3.nothing_here_message
There are no projects you have access to.
%br
- if current_user.can_create_project?
You can create up to
= current_user.projects_limit
projects. Click on button below to add a new one
.link_holder
= link_to new_project_path, class: "btn primary" do
New Project »
- else
If you will be added to project - it will be displayed here
- if @projects.any? - if @has_authorized_projects
.projects .projects
.activities.span8 .activities.span8
= render "events/event_last_push", event: @last_push = render 'activities'
.event_filter
= event_filter_link EventFilter.push, 'Push events'
= event_filter_link EventFilter.merged, 'Merge events'
= event_filter_link EventFilter.comments, 'Comments'
= event_filter_link EventFilter.team, 'Team'
- if @events.any?
.content_list= render @events
- else
%p.nothing_here_message Projects activity will be displayed here
.loading.hide
.side .side
- if @groups.present? = render 'sidebar'
= render "groups", groups: @groups
= render "projects", projects: @projects
%div
%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
%hr
.gitlab-promo
= link_to "Homepage", "http://gitlabhq.com"
= link_to "Blog", "http://blog.gitlabhq.com"
= link_to "@gitlabhq", "https://twitter.com/gitlabhq"
- else - else
%h3.nothing_here_message There are no projects you have access to. = render "zero_authorized_projects"
%br
%h4.nothing_here_message
- if current_user.can_create_project?
You can create up to
= current_user.projects_limit
projects. Click on button below to add a new one
.link_holder
= link_to new_project_path, class: "btn primary" do
New Project »
- else
If you will be added to project - it will be displayed here
:javascript :javascript
$(function(){ Pager.init(20); }); $(function(){ Pager.init(20); });
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