diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-17 15:43:30 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-17 15:43:30 +0200 |
commit | d5796975e7f70db0233644309d7b8136ffb3d283 (patch) | |
tree | fe3720bd857d3aacef2404ac1955289df2d8d1fc | |
parent | 0f204c3222e741e1dbd732f30a676c81a45abaa4 (diff) | |
parent | 548f070f0e36f76c3afb285668aaa460a6fb73cc (diff) | |
download | gitlab-ce-d5796975e7f70db0233644309d7b8136ffb3d283.tar.gz |
Merge pull request #6544 from cirosantilli/show-link-to-public-projects-for-new-users
Show link to public projects for new users.
-rw-r--r-- | app/controllers/dashboard_controller.rb | 2 | ||||
-rw-r--r-- | app/views/dashboard/_zero_authorized_projects.html.haml | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index a74e97ac253..233b91680f6 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -22,6 +22,8 @@ class DashboardController < ApplicationController @last_push = current_user.recent_push + @publicish_project_count = Project.publicish(current_user).count + respond_to do |format| format.html format.json { pager_json("events/_events", @events.count) } diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/_zero_authorized_projects.html.haml index bb62a1c24fc..e0993293eab 100644 --- a/app/views/dashboard/_zero_authorized_projects.html.haml +++ b/app/views/dashboard/_zero_authorized_projects.html.haml @@ -34,3 +34,18 @@ = link_to new_group_path, class: "btn btn-new" do New group » +-if @publicish_project_count > 0 + %hr + %div + .dashboard-intro-icon + %i.icon-globe + %div + %p.slead + There are + %strong= @publicish_project_count + public projects on this server. + %br + Public projects are an easy way to allow everyone to have read-only access. + .link_holder + = link_to public_projects_path, class: "btn btn-new" do + Browse public projects » |