From 343da2d58e5122c6cbd3fea4771f86465359dcf7 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 4 Jul 2017 23:48:39 +0200 Subject: [PATCH] Improve admin investment view with selection/compatibility/winner flags on top --- .../_written_by_author.html.erb | 58 +++++++++++++------ .../admin/budget_investments/show.html.erb | 5 -- config/locales/admin.en.yml | 8 +++ config/locales/admin.es.yml | 10 +++- 4 files changed, 57 insertions(+), 24 deletions(-) diff --git a/app/views/admin/budget_investments/_written_by_author.html.erb b/app/views/admin/budget_investments/_written_by_author.html.erb index 2ecfa2068..a913aff00 100644 --- a/app/views/admin/budget_investments/_written_by_author.html.erb +++ b/app/views/admin/budget_investments/_written_by_author.html.erb @@ -6,27 +6,49 @@

<%= @investment.title %>

-
-

: <%= @investment.group.name %>"> - <%= t("admin.budget_investments.show.heading") %>: - <%= @investment.heading.name %> -

+
+
+

: <%= @investment.group.name %>"> + <%= t("admin.budget_investments.show.heading") %>: + <%= @investment.heading.name %> +

+
+ +
+

+ <%= t("admin.budget_investments.show.by") %>: + <%= link_to @investment.author.name, admin_hidden_user_path(@investment.author) %> +

+
+ +
+

+ <%= t("admin.budget_investments.show.sent") %>: + <%= l @investment.created_at, format: :datetime %> +

+
-
-

- <%= t("admin.budget_investments.show.by") %>: - <%= link_to @investment.author.name, admin_hidden_user_path(@investment.author) %> -

+
+
+

+ <%= t("admin.budget_investments.show.compatibility.title") %>: + <%= t("admin.budget_investments.show.compatibility.#{@investment.incompatible?}") %> +

+
+
+

+ <%= t("admin.budget_investments.show.selection.title") %>: + <%= t("admin.budget_investments.show.selection.#{@investment.selected?}") %> +

+
+
+

+ <%= t("admin.budget_investments.show.winner.title") %>: + <%= t("admin.budget_investments.show.winner.#{@investment.winner?}") %> +

+
- -
-

- <%= t("admin.budget_investments.show.sent") %>: - <%= l @investment.created_at, format: :datetime %> -

-
-
<% if @investment.external_url.present? %> diff --git a/app/views/admin/budget_investments/show.html.erb b/app/views/admin/budget_investments/show.html.erb index 95fc6c76a..f220c0955 100644 --- a/app/views/admin/budget_investments/show.html.erb +++ b/app/views/admin/budget_investments/show.html.erb @@ -56,8 +56,3 @@

<%= link_to t("admin.budget_investments.show.new_milestone"), new_admin_budget_budget_investment_budget_investment_milestone_path(@budget, @investment) %>

- -

<%= t("admin.budget_investments.show.compatibility.title") %>

-

- <%= t("admin.budget_investments.show.compatibility.#{@investment.incompatible?}") %> -

diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 864222da1..a2089bbb1 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -163,6 +163,14 @@ en: title: Compatibility "true": Incompatible "false": Compatible + selection: + title: Selection + "true": Selected + "false": Not selected + winner: + title: Winner + "true": "Yes" + "false": "No" edit: classification: Clasification compatibility: Compatibility diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index ca103f661..604df1048 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -163,11 +163,19 @@ es: title: Compatibilidad "true": Incompatible "false": Compatible + selection: + title: Selección + "true": Seleccionado + "false": No seleccionado + winner: + title: Ganador + "true": "Si" + "false": "No" edit: classification: Clasificación compatibility: Compatibilidad mark_as_incompatible: Marcar como incompatible - selected: Selección + selection: Selección mark_as_selected: Marcar como seleccionado assigned_valuators: Evaluadores select_heading: Seleccionar partida