From a237136fb9a06833f8ded3c224261776fa027199 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 11 Jun 2014 15:30:13 -0300 Subject: [PATCH] [template-welcome-page] Let template name to be completed on the welcome page partial --- app/views/home/welcome.html.erb | 2 +- app/views/memberships/welcome.html.erb | 4 ++-- app/views/shared/_template_welcome_page.html.erb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/home/welcome.html.erb b/app/views/home/welcome.html.erb index d8a86e0..799929d 100644 --- a/app/views/home/welcome.html.erb +++ b/app/views/home/welcome.html.erb @@ -16,5 +16,5 @@

<%= _("%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 %> - <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?") % @person_template.name}%> + <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?")} %> diff --git a/app/views/memberships/welcome.html.erb b/app/views/memberships/welcome.html.erb index e6c04ab..cb871ef 100644 --- a/app/views/memberships/welcome.html.erb +++ b/app/views/memberships/welcome.html.erb @@ -2,8 +2,8 @@

<%= __("Your community (%s) was successfully created.") % @community.name %>

<%= link_to __('You can manage your community now.'), @community.admin_url %>

-<%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a community?")} %> +<%= render :partial => 'shared/template_welcome_page', :locals => {:template => @community.template, :header => _("What can I do with a %s?")} %> -<% button_bar do%> +<% button_bar do %> <%= button :back, _('Back'), @back_to %> <% end %> diff --git a/app/views/shared/_template_welcome_page.html.erb b/app/views/shared/_template_welcome_page.html.erb index 1a390f3..b868c22 100644 --- a/app/views/shared/_template_welcome_page.html.erb +++ b/app/views/shared/_template_welcome_page.html.erb @@ -1,4 +1,4 @@ -<% if template.welcome_page_content.present? %> -

<%= header %>

+<% if template && template.welcome_page_content.present? %> +

<%= header % template.name %>

<%= template.welcome_page_content.html_safe %> <% end %> -- libgit2 0.21.2