Make mobile runtime banner optional (#20637)
* Remove runtime banner * Show/hide runtime banner setting * Update app/views/layouts/application.html.erb * Update app/views/layouts/application.html.erb * Update app/views/layouts/application.html.erb
This commit is contained in:
parent
e386a7ec15
commit
6ef9a83252
3 changed files with 16 additions and 1 deletions
|
|
@ -42,6 +42,9 @@ module Settings
|
|||
setting :display_in_directory, type: :boolean, default: true
|
||||
setting :award_tag_minimum_score, type: :integer, default: 100
|
||||
|
||||
# Mobile App
|
||||
setting :show_mobile_app_banner, type: :boolean, default: true
|
||||
|
||||
# Head and footer content
|
||||
setting :head_content, type: :string, default: ""
|
||||
setting :bottom_of_body_content, type: :string, default: ""
|
||||
|
|
|
|||
|
|
@ -115,6 +115,15 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="crayons-field crayons-field--checkbox">
|
||||
<%= f.check_box :show_mobile_app_banner, checked: Settings::UserExperience.show_mobile_app_banner, class: "crayons-checkbox" %>
|
||||
<div class="mt-0">
|
||||
<%= admin_config_label :show_mobile_app_banner, model: Settings::UserExperience %>
|
||||
<p class="crayons-field__description">
|
||||
Do you want the Forem mobile banner to show on your Forem?
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="crayons-field">
|
||||
<%= admin_config_label :head_content, model: Settings::UserExperience %>
|
||||
<%= admin_config_description Constants::Settings::UserExperience.details[:head_content][:description] %>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@
|
|||
<% end %>
|
||||
<meta name="environment" content="<%= Rails.env %>">
|
||||
<%= render "layouts/styles", qualifier: "main" %>
|
||||
<%= javascript_include_tag "base", "application", "baseInitializers", "Search", "runtimeBanner", "baseTracking", defer: true %>
|
||||
<%= javascript_include_tag "base", "application", "baseInitializers", "Search", "baseTracking", defer: true %>
|
||||
<% if Settings::UserExperience.show_mobile_app_banner %>
|
||||
<%= javascript_include_tag "runtimeBanner", defer: true %>
|
||||
<% end %>
|
||||
<% if user_signed_in? %>
|
||||
<%= javascript_include_tag "onboardingRedirectCheck", "contentDisplayPolicy", defer: true %>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue