diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index af3c6b194..fad11d0f0 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -95,7 +95,8 @@
<%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %> <% if browser.device.mobile? %> - + <% end %> @@ -104,11 +105,23 @@ <% else %>
- <%= t("budgets.investments.show.title") %> + + <%= t("budgets.investments.show.title") %> +
+
+ <% end %> + +

<%= t("budgets.investments.show.share") %>

+ - <% end %> - +
diff --git a/app/views/mailer/budget_investment_created.html.erb b/app/views/mailer/budget_investment_created.html.erb index ba3674d0d..59af63dd1 100644 --- a/app/views/mailer/budget_investment_created.html.erb +++ b/app/views/mailer/budget_investment_created.html.erb @@ -1,16 +1,42 @@ -Hola <%= @investment.author.name %> + -Muchas gracias por crear tu proyecto <%= @investment.title %> para los Presupuestos Participativos de <%= @investment.budget.name %> de Madrid. +

+ <%= t("mailers.budget_investment_created.title") %> +

-Te informaremos de cómo avanza el proceso, que también puedes seguir en -<%= link_to budgets_url, budgets_url %> +

+ <%= t("mailers.budget_investment_created.intro_html", + author: @investment.author.name).html_safe %> +

-Atentamente, +

+ <%= t("mailers.budget_investment_created.text_html", + investment: @investment.title, + budget: @investment.budget.name).html_safe %> +

-Área de Participación Ciudadana, Transparencia -y Gobierno Abierto del Ayuntamiento de Madrid +

+ <%= t("mailers.budget_investment_created.follow_html", + link: link_to(t("mailers.budget_investment_created.follow_link"), budgets_url)).html_safe %> +

-
- <%= social_share_button_tag("#{@investment.title} #{setting['twitter_hashtag']}", - url: budget_investment_url(@investment.budget, @investment)) %> -
\ No newline at end of file + + + + + + +
+ <%= link_to budget_investment_url(@investment.budget, @investment, anchor: "social-share"), style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 160px; display: inline-block;" do %> + <%= image_tag('icon_mailer_share.png', style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> + <%= t('mailers.budget_investment_created.share') %> + <% end %> +
+ +

+ <%= t("mailers.budget_investment_created.sincerely") %> +
+ + <%= t("mailers.budget_investment_created.signatory") %> + +

diff --git a/config/locales/mailers.en.yml b/config/locales/mailers.en.yml index 34578d739..49143f354 100755 --- a/config/locales/mailers.en.yml +++ b/config/locales/mailers.en.yml @@ -64,14 +64,22 @@ en: button: Complete registration subject: "Invitation to %{org_name}" budget_investment_created: - subject: "Thank you for creating a proposal!" + subject: "Thank you for creating an investment!" + title: "Thank you for creating an investment!" + intro_html: "Hi %{author}," + text_html: "Thank you for creating your investment %{investment} for Participatory Budgets %{budget}." + follow_html: "We will inform you about how the process progresses, which you can also follow on %{link}." + follow_link: "Participatory Budgets" + sincerely: "Sincerely," + signatory: "DEPARTMENT OF PUBLIC PARTICIPATION" + share: "Comparte tu proyecto" budget_investment_unfeasible: hi: "Dear user," - new_html: "For all these, we invite you to elaborate a new proposal that ajusts to the conditions of this process. You can do it following this link: %{url}." + new_html: "For all these, we invite you to elaborate a new investment that ajusts to the conditions of this process. You can do it following this link: %{url}." new_href: "new investment project" - reconsider_html: "If you believe that the rejected proposal meets the requirements to be an investment proposal, you can communicate this, within 48 hours, responding to the email address examples@consul.es. Including the code %{code} in the subject of the email." + reconsider_html: "If you believe that the rejected investment meets the requirements to be an investment project, you can communicate this, within 48 hours, responding to the email address examples@consul.es. Including the code %{code} in the subject of the email." sincerely: "Sincerely" signatory: "DEPARTMENT OF PUBLIC PARTICIPATION" sorry: "Sorry for the inconvenience and we again thank you for your invaluable participation." subject: "Your investment project '%{code}' has been marked as unfeasible" - unfeasible_html: "From the City Council we want to thank you for your participation in the participatory budgets. We regret to inform you that your proposal '%{title}' will be excluded from this participatory process for the following reason:" \ No newline at end of file + unfeasible_html: "From the City Council we want to thank you for your participation in the participatory budgets. We regret to inform you that your investment '%{title}' will be excluded from this participatory process for the following reason:" \ No newline at end of file diff --git a/config/locales/mailers.es.yml b/config/locales/mailers.es.yml index f17240c85..82a03d8de 100644 --- a/config/locales/mailers.es.yml +++ b/config/locales/mailers.es.yml @@ -54,14 +54,22 @@ es: button: Completar registro subject: "Invitación a %{org_name}" budget_investment_created: - subject: "¡Gracias por crear una propuesta!" + subject: "¡Gracias por crear un proyecto!" + title: "¡Gracias por crear un proyecto!" + intro_html: "Hola %{author}," + text_html: "Muchas gracias por crear tu proyecto %{investment} para los Presupuestos Participativos %{budget}." + follow_html: "Te informaremos de cómo avanza el proceso, que también puedes seguir en la página de %{link}." + follow_link: "Presupuestos participativos" + sincerely: "Atentamente," + signatory: "DIRECCIÓN GENERAL DE PARTICIPACIÓN CIUDADANA" + share: "Comparte tu proyecto" budget_investment_unfeasible: hi: "Estimado usuario," - new_html: "Por todo ello, te invitamos a que elabores una nueva propuesta que se ajuste a las condiciones de este proceso. Esto lo puedes hacer en este enlace: %{url}." + new_html: "Por todo ello, te invitamos a que elabores un nuevo proyecto de gasto que se ajuste a las condiciones de este proceso. Esto lo puedes hacer en este enlace: %{url}." new_href: "nueva propuesta de inversión" - reconsider_html: "Si consideras que la propuesta rechazada cumple los requisitos para mantenerla como propuesta de inversión, podrás comunicarlo, en el plazo de 48 horas, al correo example@consul.es, indicando necesariamente para su tramitación el código %{code} como asunto del correo, correspondiente a tu propuesta." + reconsider_html: "Si consideras que el proyecto rechazado cumple los requisitos para mantenerlo como proyecto de gasto, podrás comunicarlo, en el plazo de 48 horas, al correo example@consul.es, indicando necesariamente para su tramitación el código %{code} como asunto del correo, correspondiente a tu proyecto." sincerely: "Atentamente" signatory: "DIRECCIÓN GENERAL DE PARTICIPACIÓN CIUDADANA" sorry: "Sentimos las molestias ocasionadas y volvemos a darte las gracias por tu inestimable participación." subject: "Tu propuesta de inversión '%{code}' ha sido marcada como inviable" - unfeasible_html: "Desde el Ayuntamiento queremos agradecer tu participación en los Presupuestos Participativos. Lamentamos informarte de que tu propuesta '%{title}' quedará excluida de este proceso participativo por el siguiente motivo:" \ No newline at end of file + unfeasible_html: "Desde el Ayuntamiento queremos agradecer tu participación en los Presupuestos Participativos. Lamentamos informarte de que tu proyecto '%{title}' quedará excluido de este proceso participativo por el siguiente motivo:" \ No newline at end of file diff --git a/spec/features/emails_spec.rb b/spec/features/emails_spec.rb index 4a8933648..b3e52370d 100644 --- a/spec/features/emails_spec.rb +++ b/spec/features/emails_spec.rb @@ -288,7 +288,7 @@ feature 'Emails' do email = open_last_email investment = Budget::Investment.last - expect(email).to have_subject("Thank you for creating a proposal!") + expect(email).to have_subject("Thank you for creating an investment!") expect(email).to deliver_to(investment.author.email) expect(email).to have_body_text(author.name) expect(email).to have_body_text(investment.title)