From 596cf1dc38f4f5bb84b239d027e1d212ceb99021 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 18 Nov 2016 13:13:40 +0100 Subject: [PATCH] adds styles to admin question show --- app/assets/stylesheets/admin.scss | 15 ++++ app/views/admin/poll/questions/show.html.erb | 91 +++++++++++--------- config/locales/admin.en.yml | 1 + config/locales/admin.es.yml | 1 + 4 files changed, 69 insertions(+), 39 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index ee16c798c..59c1271b4 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -398,3 +398,18 @@ table.investment-projects-summary { white-space: nowrap; } } + +.geozone { + background: #ececec; + border-radius: rem-calc(6); + color: $text; + display: inline-block; + font-size: $small-font-size; + margin-bottom: $line-height/3; + padding: $line-height/4 $line-height/3; + text-decoration: none; + + &:hover { + background: #e0e0e0; + } +} diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 5d1a0d01c..ba5b6497b 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -1,42 +1,55 @@ -
- <% if @question.proposal.present? %> -
- <%= I18n.t("admin.questions.show.proposal") %>: +<%= render "shared/back_link" %> + +
+ +
+
+ <% if @question.proposal.present? %> + <%= t("admin.questions.show.proposal") %> <%= link_to @question.proposal.title, proposal_path(@question.proposal) %> -
- <% end %> - -
- <%= I18n.t("admin.questions.show.title") %>: - <%= @question.title %> -
- -
- <%= I18n.t("admin.questions.show.author") %>: - <%= link_to @question.author.name, user_path(@question.author) %> -
- -
- <%= I18n.t("admin.questions.show.valid_answers") %>: - <%= @question.valid_answers.join(", ") %> -
- -
- <%= I18n.t("admin.questions.show.summary") %>: - <%= @question.summary %> -
- -
- <%= I18n.t("admin.questions.show.description") %>: - <%= @question.description %> -
- -
- <%= I18n.t("admin.questions.show.geozones") %>: - <% @question.geozones.each do |geozone| %> -
- <%= geozone.name %> -
<% end %> + + <%= t("admin.questions.show.title") %> +

<%= @question.title %>

+ +

+ <%= t("admin.questions.show.author") %> +
+ <%= link_to @question.author.name, user_path(@question.author) %> +

+ +

+ <%= t("admin.questions.show.valid_answers") %> +

+ + <% @question.valid_answers.each do |answer| %> + + <%= answer %> + + <% end %> + +

+ <%= t("admin.questions.show.summary") %> +
+ <%= @question.summary %> +

+ +

+ <%= t("admin.questions.show.description") %> +
+ <%= @question.description %> +

+ +

+ <%= t("admin.questions.show.geozones") %> +
+ <% @question.geozones.each do |geozone| %> + + <%= geozone.name %> + + <% end %> +

+ + <%= link_to t("admin.questions.show.preview"), question_path(@question) %>
-
\ No newline at end of file +
diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 0ee20cac4..0dffe90d9 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -193,6 +193,7 @@ en: summary: Summary description: Description geozones: Geozones + preview: View on website booths: index: title: "List of booths" diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 70b7249bf..5739d54bf 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -193,6 +193,7 @@ es: summary: Resumen description: Descripción geozones: Distritos + preview: Ver en la web booths: index: title: "Lista de urnas"