[24173] Add simple override to decide when to show the onboarding modal

pull/4991/head
Oliver Günther 8 years ago
parent 1021be7879
commit 9a0f9555c0
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 6
      app/helpers/homescreen_helper.rb
  2. 2
      app/views/homescreen/index.html.erb
  3. 3
      lib/open_project/configuration.rb

@ -59,4 +59,10 @@ module HomescreenHelper
title: label, title: label,
target: '_blank' target: '_blank'
end end
##
# Determine whether we should render the onboarding modal
def show_onboarding_modal?
return OpenProject::Configuration.onboarding_enabled? && params[:first_time_user]
end
end end

@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details.
</h2> </h2>
</div> </div>
<% if params[:first_time_user] %> <% if show_onboarding_modal? %>
<modal-wrapper initialize="true" modal-params="{ appendClassName: 'onboarding-modal' }"> <modal-wrapper initialize="true" modal-params="{ appendClassName: 'onboarding-modal' }">
<%= render partial: '/onboarding/starting_video_modal' %> <%= render partial: '/onboarding/starting_video_modal' %>
</modal-wrapper> </modal-wrapper>

@ -92,7 +92,8 @@ module OpenProject
'apiv2_enable_basic_auth' => true, 'apiv2_enable_basic_auth' => true,
'onboarding_video_url' => 'https://player.vimeo.com/video/163426858' 'onboarding_video_url' => 'https://player.vimeo.com/video/163426858',
'onboarding_enabled' => true
} }
@config = nil @config = nil

Loading…
Cancel
Save