Commit d5796975e7f70db0233644309d7b8136ffb3d283
Exists in
spb-stable
and in
3 other branches
Merge pull request #6544 from cirosantilli/show-link-to-public-projects-for-new-users
Show link to public projects for new users.
Showing
2 changed files
with
17 additions
and
0 deletions
Show diff stats
app/controllers/dashboard_controller.rb
@@ -22,6 +22,8 @@ class DashboardController < ApplicationController | @@ -22,6 +22,8 @@ class DashboardController < ApplicationController | ||
22 | 22 | ||
23 | @last_push = current_user.recent_push | 23 | @last_push = current_user.recent_push |
24 | 24 | ||
25 | + @publicish_project_count = Project.publicish(current_user).count | ||
26 | + | ||
25 | respond_to do |format| | 27 | respond_to do |format| |
26 | format.html | 28 | format.html |
27 | format.json { pager_json("events/_events", @events.count) } | 29 | format.json { pager_json("events/_events", @events.count) } |
app/views/dashboard/_zero_authorized_projects.html.haml
@@ -34,3 +34,18 @@ | @@ -34,3 +34,18 @@ | ||
34 | = link_to new_group_path, class: "btn btn-new" do | 34 | = link_to new_group_path, class: "btn btn-new" do |
35 | New group » | 35 | New group » |
36 | 36 | ||
37 | +-if @publicish_project_count > 0 | ||
38 | + %hr | ||
39 | + %div | ||
40 | + .dashboard-intro-icon | ||
41 | + %i.icon-globe | ||
42 | + %div | ||
43 | + %p.slead | ||
44 | + There are | ||
45 | + %strong= @publicish_project_count | ||
46 | + public projects on this server. | ||
47 | + %br | ||
48 | + Public projects are an easy way to allow everyone to have read-only access. | ||
49 | + .link_holder | ||
50 | + = link_to public_projects_path, class: "btn btn-new" do | ||
51 | + Browse public projects » |