From 208f2e898da8e2d8c357d7afc1ec4bf6a064b0b5 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 16:35:10 +0100 Subject: [PATCH 1/9] removes duplicated i18n key --- config/locales/en/general.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index f7dd1e6cd..272cf4d72 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -282,7 +282,8 @@ en: sign_up: Sign up with Facebook name: Facebook finish_signup: - title: Add your email address + title: "Additional details" + username_warning: "Due to a change in the way we interact with social networks, it is possible that your username now appears as 'already in use'. If that is your case, please choose a different username." google_oauth2: sign_in: Sign in with Google sign_up: Sign up with Google @@ -294,9 +295,6 @@ en: info_sign_in: "Sign in with:" info_sign_up: "Sign up with:" or_fill: "Or fill the following form:" - finish_signup: - title: "Additional details" - username_warning: "Due to a change in the way we interact with social networks, it is possible that your username now appears as 'already in use'. If that is your case, please choose a different username." proposals: create: form: From 4f3c75c2057644f27f394e54bd41fd91c847bca5 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 16:49:13 +0100 Subject: [PATCH 2/9] changes public interest label and improves account show layout --- app/views/account/show.html.erb | 9 +++++---- config/locales/en/general.yml | 2 +- config/locales/es/general.yml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index 8bc09f050..81b25e5e0 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -14,7 +14,7 @@ <%= render "shared/errors", resource: @account %>
-
+

<%= t("account.show.personal")%>

@@ -112,10 +112,10 @@
<% end %> - <%= f.submit t("account.show.save_changes_submit"), class: "button" %> + <%= f.submit t("account.show.save_changes_submit"), class: "button margin-top" %>
-
+

<%= t("account.show.user_permission_title") %>

<%= t("account.show.user_permission_info") %>

@@ -143,7 +143,8 @@

<%= t("account.show.user_permission_verify_info") %> -
+

+

<%= t("account.show.user_permission_verify") %>

diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 272cf4d72..f65857fc6 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -12,7 +12,7 @@ en: personal: Personal details phone_number_label: Phone number public_activity_label: Keep my list of activities public - public_interests_label: Keep my interests public + public_interests_label: Keep the labels of the elements I follow public public_interests_my_title_list: Tags of elements you follow public_interests_user_title_list: Tags of elements this user follows save_changes_submit: Save changes diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index f444c7423..7185512d3 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -12,7 +12,7 @@ es: personal: Datos personales phone_number_label: Teléfono public_activity_label: Mostrar públicamente mi lista de actividades - public_interests_label: Mostrar públicamente mis intereses + public_interests_label: Mostrar públicamente las etiquetas de los elementos que sigo public_interests_my_title_list: Etiquetas de los elementos que sigues public_interests_user_title_list: Etiquetas de los elementos que sigue este usuario save_changes_submit: Guardar cambios From 8ff4303d201fd135903493ba2089beb35e400955 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 17:14:43 +0100 Subject: [PATCH 3/9] changes image admin title label and improves image fields layout --- app/assets/stylesheets/layout.scss | 8 ++++++++ app/views/images/_image_fields.html.erb | 2 +- config/locales/en/images.yml | 2 +- config/locales/es/images.yml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d8763591a..b49c5d17d 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -21,6 +21,7 @@ // 19. Recommended Section Home // 20. Documents // 21. Related content +// 22. Images // // 01. Global styles @@ -2445,3 +2446,10 @@ table { margin-top: $line-height / 2; } } + +// 22. Images +// ----------------- + +.images .button { + margin-top: $line-height / 2; +} \ No newline at end of file diff --git a/app/views/images/_image_fields.html.erb b/app/views/images/_image_fields.html.erb index 092402706..7fbfb0f01 100644 --- a/app/views/images/_image_fields.html.erb +++ b/app/views/images/_image_fields.html.erb @@ -3,7 +3,7 @@ <%= f.hidden_field :user_id, value: current_user.id %> <%= f.hidden_field :cached_attachment %> -
+
<%= f.text_field :title, placeholder: t("images.form.title_placeholder") %>
diff --git a/config/locales/en/images.yml b/config/locales/en/images.yml index 375da86a4..63132647d 100644 --- a/config/locales/en/images.yml +++ b/config/locales/en/images.yml @@ -9,7 +9,7 @@ en: note: "You can upload one image of following content types: %{accepted_content_types}, up to %{max_file_size} MB." add_new_image: Add image title_placeholder: Add a descriptive title for the image - admin_title: "Main image of the poll" + admin_title: "Image" admin_alt_text: "Alternative text for the image" actions: destroy: diff --git a/config/locales/es/images.yml b/config/locales/es/images.yml index f18d9636f..290de6563 100644 --- a/config/locales/es/images.yml +++ b/config/locales/es/images.yml @@ -8,7 +8,7 @@ es: delete_button: Eliminar imagen note: 'Puedes subir una imagen en los formatos: %{accepted_content_types}, y de hasta %{max_file_size} MB por archivo.' add_new_image: Añadir imagen - admin_title: "Imagen principal de la votación" + admin_title: "Imagen" admin_alt_text: "Texto alternativo para la imagen" actions: destroy: From 8bff974584fcd9004d8a6e5d4e07d684408b39a9 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 17:51:30 +0100 Subject: [PATCH 4/9] changes milestones date label --- app/views/admin/budget_investment_milestones/_form.html.erb | 3 ++- config/locales/en/admin.yml | 1 + config/locales/es/admin.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/admin/budget_investment_milestones/_form.html.erb b/app/views/admin/budget_investment_milestones/_form.html.erb index 6a39394d7..2b2af4b50 100644 --- a/app/views/admin/budget_investment_milestones/_form.html.erb +++ b/app/views/admin/budget_investment_milestones/_form.html.erb @@ -2,13 +2,14 @@ <%= f.hidden_field :title, value: l(Time.current, format: :datetime), maxlength: Budget::Investment::Milestone.title_max_length %> <%= f.text_area :description, rows: 5 %> + <%= f.label :publication_date, t("admin.milestones.new.date") %> <%= f.text_field :publication_date, value: @milestone.publication_date.present? ? l(@milestone.publication_date.to_date) : nil, + label: false, class: "js-calendar-full" %> <%= render 'images/admin_image', imageable: @milestone, f: f %> -
<%= render 'documents/nested_documents', documentable: @milestone, f: f %>
diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 071d9c6a4..9fee8e5dd 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -202,6 +202,7 @@ en: documents: "Documents" new: creating: Create milestone + date: Date edit: title: Edit milestone create: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 688d878e1..34eb7d8cc 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -202,6 +202,7 @@ es: documents: "Documentos" new: creating: Crear hito + date: Fecha edit: title: Editar hito create: From 8ef4ba94bd2e9977122352db57cd004b6eae2125 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 17:51:52 +0100 Subject: [PATCH 5/9] fixes milestone table and improve button --- .../admin/budget_investments/_milestones.html.erb | 12 ++++++------ app/views/admin/budget_investments/show.html.erb | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/views/admin/budget_investments/_milestones.html.erb b/app/views/admin/budget_investments/_milestones.html.erb index 6f30f8ad2..b62065f42 100644 --- a/app/views/admin/budget_investments/_milestones.html.erb +++ b/app/views/admin/budget_investments/_milestones.html.erb @@ -14,17 +14,17 @@ <% @investment.milestones.each do |milestone| %> - <%= milestone.id %> + <%= milestone.id %> <%= link_to milestone.title, edit_admin_budget_budget_investment_budget_investment_milestone_path(@investment.budget, @investment, milestone) %> - <%= milestone.description %> - <% if milestone.publication_date.present? %> - <%= l(milestone.publication_date.to_date) %> - <% end %> + <%= milestone.description %> + + <%= l(milestone.publication_date.to_date) if milestone.publication_date.present? %> + <%= link_to t("admin.milestones.index.show_image"), milestone.image_url(:large), @@ -40,7 +40,7 @@ <% end %> <% end %> - + <%= link_to t("admin.milestones.index.delete"), admin_budget_budget_investment_budget_investment_milestone_path(@investment.budget, @investment, diff --git a/app/views/admin/budget_investments/show.html.erb b/app/views/admin/budget_investments/show.html.erb index 5fa35a1fa..8fd285c2e 100644 --- a/app/views/admin/budget_investments/show.html.erb +++ b/app/views/admin/budget_investments/show.html.erb @@ -54,5 +54,7 @@ <%= render 'admin/budget_investments/milestones' %>

- <%= link_to t("admin.budget_investments.show.new_milestone"), new_admin_budget_budget_investment_budget_investment_milestone_path(@budget, @investment) %> + <%= link_to t("admin.budget_investments.show.new_milestone"), + new_admin_budget_budget_investment_budget_investment_milestone_path(@budget, @investment), + class: "button hollow" %>

From 67df3947bfb349ae20af7f2e075651a5acffedd5 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 17:52:23 +0100 Subject: [PATCH 6/9] improves admin image partial --- app/views/admin/poll/polls/_form.html.erb | 4 +++- app/views/images/_admin_image.html.erb | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/admin/poll/polls/_form.html.erb b/app/views/admin/poll/polls/_form.html.erb index c0439af7b..e802d1217 100644 --- a/app/views/admin/poll/polls/_form.html.erb +++ b/app/views/admin/poll/polls/_form.html.erb @@ -32,7 +32,9 @@
- <%= render 'images/admin_image', imageable: @poll, f: f %> +
+ <%= render 'images/admin_image', imageable: @poll, f: f %> +
diff --git a/app/views/images/_admin_image.html.erb b/app/views/images/_admin_image.html.erb index 12874137f..d466f1cac 100644 --- a/app/views/images/_admin_image.html.erb +++ b/app/views/images/_admin_image.html.erb @@ -1,7 +1,7 @@ -
+
<%= f.label :image, t("images.form.admin_title") %> - + <%= link_to_add_association t('images.form.add_new_image'), f, :image, force_non_association_create: true, partial: "images/image_fields", @@ -14,12 +14,12 @@ association_insertion_node: "#nested-image", association_insertion_method: "append" } %> - + <%= render_image(f.object.image, :thumb, false) if f.object.image %>
<%= f.fields_for :image do |image_builder| %> - +
<%= image_builder.hidden_field :id %> <%= image_builder.hidden_field :user_id, value: current_user.id %> @@ -33,7 +33,7 @@
- + <% end %>
From 463731c731773270c88adf2861c057ed2af16e65 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 15 Dec 2017 18:00:25 +0100 Subject: [PATCH 7/9] adds documentation text shared i18n key --- app/views/budgets/investments/_milestones.html.erb | 2 +- config/locales/en/general.yml | 1 + config/locales/es/general.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/budgets/investments/_milestones.html.erb b/app/views/budgets/investments/_milestones.html.erb index f5e3d8d5e..9e0f215c3 100644 --- a/app/views/budgets/investments/_milestones.html.erb +++ b/app/views/budgets/investments/_milestones.html.erb @@ -23,7 +23,7 @@