Merge branch 'proposal-notifications' of github.com:AyuntamientoMadrid/participacion into proposal-notifications
This commit is contained in:
@@ -192,7 +192,7 @@ $header-color: inherit;
|
||||
$header-lineheight: 1.4;
|
||||
$header-margin-bottom: 0.5rem;
|
||||
$header-text-rendering: optimizeLegibility;
|
||||
$small-font-size: 80%;
|
||||
$small-font-size: rem-calc(14);
|
||||
$header-small-font-color: $medium-gray;
|
||||
$paragraph-lineheight: 1.6;
|
||||
$paragraph-margin-bottom: 1rem;
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
<%= @notification.body %>
|
||||
</p>
|
||||
|
||||
<table style="width: 100%; border-top: 1px solid #DEE0E3; margin-top: 60px;">
|
||||
<table style="width: 100%; border-top: 1px solid #DEE0E3; margin-top: 36px;">
|
||||
<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 %>
|
||||
<%= 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: 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.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 %>
|
||||
<%= 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: 160px; 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 %>
|
||||
|
||||
51
app/views/mailer/proposal_notification_digest.html.erb
Normal file
51
app/views/mailer/proposal_notification_digest.html.erb
Normal file
@@ -0,0 +1,51 @@
|
||||
<td>
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding-left: 10px;">
|
||||
<h1 style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;">
|
||||
<%= t('mailers.proposal_notification_digest.title') %>
|
||||
</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- EACH PROPOSAL NOTIFICATION DO -->
|
||||
<table style="width: 100%; border-top: 1px solid #DEE0E3; padding-top: 12px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding-bottom: 20px; padding-left: 10px;">
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 20px;font-weight: bold;line-height: 24px; margin: 0;">
|
||||
<%= @notification.title %>
|
||||
</p>
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px; margin-top: 0; color: #cccccc;">
|
||||
<%= @notification.proposal.title %> • <%= @notification.proposal.created_at.to_date %> • <%= @notification.proposal.author.name %>
|
||||
</p>
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
|
||||
<%= @notification.body %>
|
||||
</p>
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding-bottom: 12px;">
|
||||
<%= 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: 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.proposal_notification_digest.share') %>
|
||||
<% end %>
|
||||
|
||||
<%= 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: 160px; display: inline-block; margin-left: 12px;" 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_digest.comment') %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- END -->
|
||||
</td>
|
||||
@@ -2,10 +2,14 @@
|
||||
<div class="activity row margin-top">
|
||||
<div class="small-12 column">
|
||||
|
||||
<% if @user != current_user %>
|
||||
<% if @user != current_user %> <!-- AND RECEIVE PRIVATE MESSAGES == TRUE -->
|
||||
<%= link_to t("users.show.send_private_message"),
|
||||
new_user_direct_message_path(@user),
|
||||
class: "button hollow float-right" %>
|
||||
<!-- ELSE -->
|
||||
<div class="callout primary float-right">
|
||||
<%= t("users.show.no_private_messages") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h2 class="inline-block">
|
||||
|
||||
@@ -530,6 +530,7 @@ en:
|
||||
one: 1 Spending proposal
|
||||
other: "%{count} Spending proposals"
|
||||
no_activity: User has no public activity
|
||||
no_private_messages: "This user doesn't accept private messages."
|
||||
private_activity: This user decided to keep the activity list private
|
||||
send_private_message: "Send private message"
|
||||
proposals:
|
||||
|
||||
@@ -530,6 +530,7 @@ es:
|
||||
one: 1 Propuesta de inversión
|
||||
other: "%{count} Propuestas de inversión"
|
||||
no_activity: Usuario sin actividad pública
|
||||
no_private_messages: "Este usuario no acepta mensajes privados."
|
||||
private_activity: Este usuario ha decidido mantener en privado su lista de actividades
|
||||
send_private_message: "Enviar un mensaje privado"
|
||||
proposals:
|
||||
|
||||
@@ -33,5 +33,9 @@ en:
|
||||
proposal_notification:
|
||||
share: Share
|
||||
comment: Comment proposal
|
||||
proposal_notification_digest:
|
||||
title: You received the following notifications
|
||||
share: Share
|
||||
comment: Comment proposal
|
||||
direct_message:
|
||||
reply: Reply to %{sender}
|
||||
@@ -33,5 +33,9 @@ es:
|
||||
proposal_notification:
|
||||
share: Compartir
|
||||
comment: Comentar propuesta
|
||||
proposal_notification_digest:
|
||||
title: Has recibido las siguientes notificaciones
|
||||
share: Compartir
|
||||
comment: Comentar propuesta
|
||||
direct_message:
|
||||
reply: Responder a %{sender}
|
||||
Reference in New Issue
Block a user