diff --git a/app/models/environment.rb b/app/models/environment.rb index 6827d07..5212825 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -280,6 +280,12 @@ class Environment < ActiveRecord::Base settings_items :access_control_allow_origin, :type => Array, :default => [] settings_items :access_control_allow_methods, :type => String + settings_items :signup_welcome_screen_body, :type => String + + def has_custom_welcome_screen? + settings[:signup_welcome_screen_body].present? + end + def news_amount_by_folder=(amount) settings[:news_amount_by_folder] = amount.to_i end diff --git a/app/views/account/signup.rhtml b/app/views/account/signup.rhtml index f0bc7fe..07ffd31 100644 --- a/app/views/account/signup.rhtml +++ b/app/views/account/signup.rhtml @@ -1,17 +1,21 @@ <% if @register_pending %> -
-

<%= _("Welcome to %s!") % environment.name %>

-

<%= _("Thanks for signing up, we're thrilled to have you on our social network!") %>

-

<%= _("Firstly, some tips for getting started:") %>

-

<%= _("Confirm your account!") %>

-

<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>

-

<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>

-

<%= _("What to do next?") %>

-

<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>

-

<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>

-

<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>

-

<%= _("Start exploring and have fun!") %>

-
+
+ <% if environment.has_custom_welcome_screen? %> + <%= environment.settings[:signup_welcome_screen_body].html_safe %> + <% else %> +

<%= _("Welcome to %s!") % environment.name %>

+

<%= _("Thanks for signing up, we're thrilled to have you on our social network!") %>

+

<%= _("Firstly, some tips for getting started:") %>

+

<%= _("Confirm your account!") %>

+

<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>

+

<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>

+

<%= _("What to do next?") %>

+

<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>

+

<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>

+

<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>

+

<%= _("Start exploring and have fun!") %>

+ <% end %> +
<% else %>

<%= _('Sign up for %s!') % environment.name %>

<%= render :partial => 'signup_form' %> diff --git a/app/views/admin_panel/_signup_welcome_screen.rhtml b/app/views/admin_panel/_signup_welcome_screen.rhtml new file mode 100644 index 0000000..26bdb53 --- /dev/null +++ b/app/views/admin_panel/_signup_welcome_screen.rhtml @@ -0,0 +1,5 @@ +
+ <%= _('This text will be showed as a welcome message to users after signup') %>

+
+ +<%= labelled_form_field(_('Body'), text_area(:environment, :signup_welcome_screen_body, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %> diff --git a/app/views/admin_panel/site_info.rhtml b/app/views/admin_panel/site_info.rhtml index 4ab7f2f..33cb352 100644 --- a/app/views/admin_panel/site_info.rhtml +++ b/app/views/admin_panel/site_info.rhtml @@ -12,6 +12,8 @@ :content => (render :partial => 'terms_of_use', :locals => {:f => f})} %> <% tabs << {:title => _('Signup welcome text'), :id => 'signup-welcome-text', :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %> + <% tabs << {:title => _('Signup welcome message'), :id => 'signup-welcome-message', + :content => (render :partial => 'signup_welcome_screen', :locals => {:f => f}) }%> <%= render_tabs(tabs) %> <% button_bar do %> <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> -- libgit2 0.21.2