Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Subscriptions feature starting point #171

Merged
merged 10 commits into from
Dec 19, 2016
Prev Previous commit
Next Next commit
Integrate front-end for subscribable_box module
  • Loading branch information
danguita committed Dec 19, 2016
commit 609463b6e0c878cf3e6e6aae9f1f65cee99c6201
8 changes: 8 additions & 0 deletions app/assets/stylesheets/comp-user-subscriptions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
padding: 1.5rem;
margin-top: 4em;
color: $color_text;
@include border-radius(5px);
h3 {
font-size: 1.3em;
font-weight: 200;
line-height: 1.2em;
margin: 0 0 1.25em 0;
}
form {
input[type=email] {
width: 60%;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@

<% end %>

<%= render("user/subscriptions/subscribable_box",
subscribable: GobiertoBudgetConsultations::Consultation,
title: t(".subscribable_box.title")) %>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 description">
<%= render("user/subscriptions/subscribable_box",
subscribable: GobiertoBudgetConsultations::Consultation,
title: t(".subscribable_box.title")) %>
</div>
</div>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@

<%= @consultation.description.html_safe %>

<%= render("user/subscriptions/subscribable_box",
subscribable: @consultation,
title: t(".subscribable_box.title")) %>

<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 description">
<%= render("user/subscriptions/subscribable_box",
subscribable: @consultation,
title: t(".subscribable_box.title")) %>
</div>
</div>
</div>
6 changes: 3 additions & 3 deletions app/views/user/subscriptions/_subscribable_box.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<%= form_for(user_subscription_form, as: :user_subscription, url: :user_subscriptions) do |f| %>
<%= f.hidden_field :subscribable_type %>
<%= f.hidden_field :subscribable_id %>
<%= f.email_field :user_email, placehlder: t(".placeholders.user_email") %>
<%= f.email_field :user_email, placeholder: t(".form.placeholders.user_email") %>

<%= f.submit t(".submit") %>
<%= f.submit t(".form.submit") %>
<% end %>

<% end %>

<div class="disclaimer">No spam, date de baja cuando quieras</div>
<div class="disclaimer"><%= t(".disclaimer") %></div>
</div>
6 changes: 5 additions & 1 deletion config/locales/user/views/subscriptions/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ ca:
cancel: Cancelar suscripción
subscribable_box:
subscribe: Suscribirme
submit: Suscribirme
disclaimer: No spam. Date de baja cuando quieras.
form:
placeholders:
user_email: Tu correo-e
submit: Suscribirme
6 changes: 5 additions & 1 deletion config/locales/user/views/subscriptions/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ en:
cancel: Cancel subscription
subscribable_box:
subscribe: Subscribe
submit: Subscribe
disclaimer: No spam. Cancel anytime.
form:
placeholders:
user_email: Your e-mail
submit: Subscribe
6 changes: 5 additions & 1 deletion config/locales/user/views/subscriptions/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ es:
cancel: Cancelar suscripción
subscribable_box:
subscribe: Suscribirme
submit: Suscribirme
disclaimer: No spam. Date de baja cuando quieras.
form:
placeholders:
user_email: Tu correo-e
submit: Suscribirme