Commit eb5dddac208945b2318d3a432b3a5fae5a2147b5
1 parent
d0561132
Exists in
staging
and in
42 other branches
added welcome screen tab as a option in noosfero admin page
Showing
4 changed files
with
30 additions
and
13 deletions
Show diff stats
app/models/environment.rb
| @@ -280,6 +280,12 @@ class Environment < ActiveRecord::Base | @@ -280,6 +280,12 @@ class Environment < ActiveRecord::Base | ||
| 280 | settings_items :access_control_allow_origin, :type => Array, :default => [] | 280 | settings_items :access_control_allow_origin, :type => Array, :default => [] |
| 281 | settings_items :access_control_allow_methods, :type => String | 281 | settings_items :access_control_allow_methods, :type => String |
| 282 | 282 | ||
| 283 | + settings_items :signup_welcome_screen_body, :type => String | ||
| 284 | + | ||
| 285 | + def has_custom_welcome_screen? | ||
| 286 | + settings[:signup_welcome_screen_body].present? | ||
| 287 | + end | ||
| 288 | + | ||
| 283 | def news_amount_by_folder=(amount) | 289 | def news_amount_by_folder=(amount) |
| 284 | settings[:news_amount_by_folder] = amount.to_i | 290 | settings[:news_amount_by_folder] = amount.to_i |
| 285 | end | 291 | end |
app/views/account/signup.rhtml
| 1 | <% if @register_pending %> | 1 | <% if @register_pending %> |
| 2 | -<div id='thanks-for-signing'> | ||
| 3 | - <h1><%= _("Welcome to %s!") % environment.name %></h1> | ||
| 4 | - <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | ||
| 5 | - <p><%= _("Firstly, some tips for getting started:") %></p> | ||
| 6 | - <h4><%= _("Confirm your account!") %></h4> | ||
| 7 | - <p><%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %></p> | ||
| 8 | - <p><%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | ||
| 9 | - <h4><%= _("What to do next?") %></h4> | ||
| 10 | - <p><%= _("%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') %></p> | ||
| 11 | - <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | ||
| 12 | - <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p> | ||
| 13 | - <p><%= _("Start exploring and have fun!") %></p> | ||
| 14 | -</div> | 2 | + <div id='thanks-for-signing'> |
| 3 | + <% if environment.has_custom_welcome_screen? %> | ||
| 4 | + <%= environment.settings[:signup_welcome_screen_body].html_safe %> | ||
| 5 | + <% else %> | ||
| 6 | + <h1><%= _("Welcome to %s!") % environment.name %></h1> | ||
| 7 | + <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | ||
| 8 | + <p><%= _("Firstly, some tips for getting started:") %></p> | ||
| 9 | + <h4><%= _("Confirm your account!") %></h4> | ||
| 10 | + <p><%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %></p> | ||
| 11 | + <p><%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | ||
| 12 | + <h4><%= _("What to do next?") %></h4> | ||
| 13 | + <p><%= _("%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') %></p> | ||
| 14 | + <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | ||
| 15 | + <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p> | ||
| 16 | + <p><%= _("Start exploring and have fun!") %></p> | ||
| 17 | + <% end %> | ||
| 18 | + </div> | ||
| 15 | <% else %> | 19 | <% else %> |
| 16 | <h1><%= _('Sign up for %s!') % environment.name %></h1> | 20 | <h1><%= _('Sign up for %s!') % environment.name %></h1> |
| 17 | <%= render :partial => 'signup_form' %> | 21 | <%= render :partial => 'signup_form' %> |
| @@ -0,0 +1,5 @@ | @@ -0,0 +1,5 @@ | ||
| 1 | +<div class='description'> | ||
| 2 | + <%= _('This text will be showed as a welcome message to users after signup') %><br/><br/> | ||
| 3 | +</div> | ||
| 4 | + | ||
| 5 | +<%= labelled_form_field(_('Body'), text_area(:environment, :signup_welcome_screen_body, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %> |
app/views/admin_panel/site_info.rhtml
| @@ -12,6 +12,8 @@ | @@ -12,6 +12,8 @@ | ||
| 12 | :content => (render :partial => 'terms_of_use', :locals => {:f => f})} %> | 12 | :content => (render :partial => 'terms_of_use', :locals => {:f => f})} %> |
| 13 | <% tabs << {:title => _('Signup welcome text'), :id => 'signup-welcome-text', | 13 | <% tabs << {:title => _('Signup welcome text'), :id => 'signup-welcome-text', |
| 14 | :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %> | 14 | :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %> |
| 15 | + <% tabs << {:title => _('Signup welcome message'), :id => 'signup-welcome-message', | ||
| 16 | + :content => (render :partial => 'signup_welcome_screen', :locals => {:f => f}) }%> | ||
| 15 | <%= render_tabs(tabs) %> | 17 | <%= render_tabs(tabs) %> |
| 16 | <% button_bar do %> | 18 | <% button_bar do %> |
| 17 | <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> | 19 | <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> |