Adds share and comment button on email
This commit is contained in:
BIN
app/assets/images/icon_mailer_comment.png
Normal file
BIN
app/assets/images/icon_mailer_comment.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 251 B |
BIN
app/assets/images/icon_mailer_share.png
Normal file
BIN
app/assets/images/icon_mailer_share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 379 B |
@@ -46,7 +46,7 @@ class Mailer < ApplicationMailer
|
|||||||
@notification = notification
|
@notification = notification
|
||||||
|
|
||||||
with_user(voter) do
|
with_user(voter) do
|
||||||
mail(to: voter.email, subject: @notification.title)
|
mail(to: voter.email, subject: @notification.title + ": " + @notification.proposal.title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,24 @@
|
|||||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
|
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
|
||||||
<%= @notification.body %>
|
<%= @notification.body %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<table style="width: 100%; border-top: 1px solid #DEE0E3; margin-top: 60px;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="padding-bottom: 12px; padding-top: 24px; text-align: right; padding-right: 12px; width: 50%;">
|
||||||
|
<%= link_to "#comments", 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: 200px; display: inline-block;" do %>
|
||||||
|
<%= image_tag('icon_mailer_share.png', style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %>
|
||||||
|
<%= t('mailers.proposal_notification.share') %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td style="padding-bottom: 12px; padding-top: 24px; text-align: left; padding-left: 12px; width: 50%;">
|
||||||
|
<%= link_to "#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: 200px; display: inline-block;" do %>
|
||||||
|
<%= image_tag('icon_mailer_comment.png', style: "border: 0; display: inline-block; width: 100%; max-width: 16px; vertical-align: middle;", alt: "") %>
|
||||||
|
<%= t('mailers.proposal_notification.comment') %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
{ proposal: @proposal, vote_url: vote_proposal_path(@proposal, value: 'yes') } %>
|
{ proposal: @proposal, vote_url: vote_proposal_path(@proposal, value: 'yes') } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sidebar-divider"></div>
|
<div id="social-share" class="sidebar-divider"></div>
|
||||||
<h3><%= t("proposals.show.share") %></h3>
|
<h3><%= t("proposals.show.share") %></h3>
|
||||||
<div class="social-share-full">
|
<div class="social-share-full">
|
||||||
<%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %>
|
<%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %>
|
||||||
|
|||||||
@@ -30,3 +30,6 @@ en:
|
|||||||
sorry: "Sorry for the inconvenience and we again thank you for your invaluable 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"
|
subject: "Your investment project '%{code}' has been marked as unfeasible"
|
||||||
unfeasible_html: "From the Madrid City Council we want to thank you for your participation in the <strong>participatory budgets of the city of Madrid</strong>. We regret to inform you that your proposal <strong>'%{title}'</strong> will be excluded from this participatory process for the following reason:"
|
unfeasible_html: "From the Madrid City Council we want to thank you for your participation in the <strong>participatory budgets of the city of Madrid</strong>. We regret to inform you that your proposal <strong>'%{title}'</strong> will be excluded from this participatory process for the following reason:"
|
||||||
|
proposal_notification:
|
||||||
|
share: Share
|
||||||
|
comment: Comment proposal
|
||||||
@@ -30,3 +30,6 @@ es:
|
|||||||
sorry: "Sentimos las molestias ocasionadas y volvemos a darte las gracias por tu inestimable participación."
|
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"
|
subject: "Tu propuesta de inversión '%{code}' ha sido marcada como inviable"
|
||||||
unfeasible_html: "Desde el Ayuntamiento de Madrid queremos agradecer tu participación en los <strong>Presupuestos Participativos de la ciudad de Madrid</strong>. Lamentamos informarte de que tu propuesta <strong>'%{title}'</strong> quedará excluida de este proceso participativo por el siguiente motivo:"
|
unfeasible_html: "Desde el Ayuntamiento de Madrid queremos agradecer tu participación en los <strong>Presupuestos Participativos de la ciudad de Madrid</strong>. Lamentamos informarte de que tu propuesta <strong>'%{title}'</strong> quedará excluida de este proceso participativo por el siguiente motivo:"
|
||||||
|
proposal_notification:
|
||||||
|
share: Compartir
|
||||||
|
comment: Comentar propuesta
|
||||||
Reference in New Issue
Block a user