Commit d5796975e7f70db0233644309d7b8136ffb3d283

Authored by Dmitriy Zaporozhets
2 parents 0f204c32 548f070f

Merge pull request #6544 from cirosantilli/show-link-to-public-projects-for-new-users

Show link to public projects for new users.
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 »
... ...