Commit a237136fb9a06833f8ded3c224261776fa027199

Authored by Rodrigo Souto
1 parent 3dc53d33

[template-welcome-page] Let template name to be completed on the welcome page partial

app/views/home/welcome.html.erb
... ... @@ -16,5 +16,5 @@
16 16 <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p>
17 17 <p><%= _("Start exploring and have fun!") %></p>
18 18 <% end %>
19   - <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?") % @person_template.name}%>
  19 + <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?")} %>
20 20 </div>
... ...
app/views/memberships/welcome.html.erb
... ... @@ -2,8 +2,8 @@
2 2 <p><%= __("Your community (%s) was successfully created.") % @community.name %></p>
3 3 <p><%= link_to __('You can manage your community now.'), @community.admin_url %></p>
4 4  
5   -<%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a community?")} %>
  5 +<%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a %s?")} %>
6 6  
7   -<% button_bar do%>
  7 +<% button_bar do %>
8 8 <%= button :back, _('Back'), @back_to %>
9 9 <% end %>
... ...
app/views/shared/_template_welcome_page.html.erb
1   -<% if template.welcome_page_content.present? %>
2   - <h1><%= header %></h1>
  1 +<% if template && template.welcome_page_content.present? %>
  2 + <h1><%= header % template.name %></h1>
3 3 <%= template.welcome_page_content.html_safe %>
4 4 <% end %>
... ...