Commit cb43d88ada0e11e528c583b7015660898513782f
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of github.com:gitlabhq/gitlabhq
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 | 22 | |
| 23 | 23 | @last_push = current_user.recent_push |
| 24 | 24 | |
| 25 | + @publicish_project_count = Project.publicish(current_user).count | |
| 26 | + | |
| 25 | 27 | respond_to do |format| |
| 26 | 28 | format.html |
| 27 | 29 | format.json { pager_json("events/_events", @events.count) } | ... | ... |
app/views/dashboard/_zero_authorized_projects.html.haml
| ... | ... | @@ -34,3 +34,18 @@ |
| 34 | 34 | = link_to new_group_path, class: "btn btn-new" do |
| 35 | 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 » | ... | ... |