Commit 43548e507b1013a7a9f4365862670a6e90dce4af
1 parent
3cec04fc
Exists in
master
and in
22 other branches
Display default welcome page on administration
When the administrator filled the welcome_message the default welcome message displayed below was displaying the message written by the user instead of the default welcome message.
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
app/views/admin_panel/_signup_welcome_screen.html.erb
@@ -8,4 +8,4 @@ | @@ -8,4 +8,4 @@ | ||
8 | <%= _('If this content is left blank, the following page will be displayed to the user:') %><br/><br/> | 8 | <%= _('If this content is left blank, the following page will be displayed to the user:') %><br/><br/> |
9 | </div> | 9 | </div> |
10 | <p> | 10 | <p> |
11 | -<%= render :file => 'home/welcome' %> | 11 | +<%= render :file => 'home/welcome', :locals => {:default_message => true} %> |
app/views/home/welcome.html.erb
1 | +<% default_message = defined?(default_message) ? default_message : false %> | ||
2 | + | ||
1 | <div id='thanks-for-signing'> | 3 | <div id='thanks-for-signing'> |
2 | <h1><%= _("Welcome to %s!") % environment.name %></h1> | 4 | <h1><%= _("Welcome to %s!") % environment.name %></h1> |
3 | - <% if environment.has_custom_welcome_screen? %> | 5 | + <% if environment.has_custom_welcome_screen? && !default_message %> |
4 | <%= environment.settings[:signup_welcome_screen_body].html_safe %> | 6 | <%= environment.settings[:signup_welcome_screen_body].html_safe %> |
5 | <% else %> | 7 | <% else %> |
6 | <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | 8 | <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> |