From 0ef316de911252aa9c6df2c5b07cd3f205071601 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 2 Jun 2016 13:36:41 +0200 Subject: [PATCH] Improves styles for proposal notifications --- .../mailer/proposal_notification.html.erb | 11 ++++++-- app/views/proposal_notifications/new.html.erb | 28 +++++++++++++------ .../proposal_notifications/show.html.erb | 13 +++++++-- config/locales/en.yml | 5 +++- config/locales/es.yml | 5 +++- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/app/views/mailer/proposal_notification.html.erb b/app/views/mailer/proposal_notification.html.erb index 30e8d8bc6..59489840c 100644 --- a/app/views/mailer/proposal_notification.html.erb +++ b/app/views/mailer/proposal_notification.html.erb @@ -1,2 +1,9 @@ -
<%= @notification.proposal.title %>
-
<%= @notification.body %>
+ +

+ <%= @notification.proposal.title %> +

+ +

+ <%= @notification.body %> +

+ diff --git a/app/views/proposal_notifications/new.html.erb b/app/views/proposal_notifications/new.html.erb index 728b022a1..60f7e64e4 100644 --- a/app/views/proposal_notifications/new.html.erb +++ b/app/views/proposal_notifications/new.html.erb @@ -1,13 +1,23 @@ -<%= form_for @notification do |f| %> - <%= render "shared/errors", resource: @notification %> +
+
+ <%= render 'shared/back_link' %> - <%= f.label :title, t("proposal_notifications.new.title_label") %> - <%= f.text_field :title, label: false %> +

<%= t("proposal_notifications.new.title") %>

- <%= f.label :body, t("proposal_notifications.new.body_label") %> - <%= f.text_area :body, label: false %> + <%= form_for @notification do |f| %> + <%= render "shared/errors", resource: @notification %> - <%= f.hidden_field :proposal_id, value: @proposal.id %> + <%= f.label :title, t("proposal_notifications.new.title_label") %> + <%= f.text_field :title, label: false %> - <%= f.submit t("proposal_notifications.new.submit_button") %> -<% end %> \ No newline at end of file + <%= f.label :body, t("proposal_notifications.new.body_label") %> + <%= f.text_area :body, label: false, rows: "3" %> + + <%= f.hidden_field :proposal_id, value: @proposal.id %> + +
+ <%= f.submit t("proposal_notifications.new.submit_button"), class: "button expanded" %> +
+ <% end %> +
+
diff --git a/app/views/proposal_notifications/show.html.erb b/app/views/proposal_notifications/show.html.erb index e3c50e8cc..379b361fb 100644 --- a/app/views/proposal_notifications/show.html.erb +++ b/app/views/proposal_notifications/show.html.erb @@ -1,2 +1,11 @@ -
<%= @notification.title %>
-
<%= @notification.body %>
\ No newline at end of file +
+
+ <%= link_to user_path(current_user), class: "back" do %> + + <%= t("proposal_notifications.show.back") %> + <% end %> + +

<%= @notification.title %>

+

<%= @notification.body %>

+
+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 40407f3fc..40b32f712 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -363,9 +363,12 @@ en: submit_button: Save changes proposal_notifications: new: + title: "Send message" title_label: "Title" body_label: "Message" - submit_button: "Send" + submit_button: "Send message" + show: + back: "Go back to my activity" shared: advanced_search: author_type: 'By author category' diff --git a/config/locales/es.yml b/config/locales/es.yml index 4c26d7561..5dc388853 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -363,9 +363,12 @@ es: submit_button: Guardar cambios proposal_notifications: new: + title: "Enviar mensaje" title_label: "Título" body_label: "Mensaje" - submit_button: "Enviar" + submit_button: "Enviar mensaje" + show: + back: "Volver a mi actividad" shared: advanced_search: author_type: 'Por categoría de autor'