diff --git a/app/views/admin/poll/questions/_form.html.erb b/app/views/admin/poll/questions/_form.html.erb index 56b7ec93f..5345a64b1 100644 --- a/app/views/admin/poll/questions/_form.html.erb +++ b/app/views/admin/poll/questions/_form.html.erb @@ -4,34 +4,30 @@ <%= f.hidden_field :proposal_id %> -
-
-
- <%= f.select :poll_id, - options_for_select(Poll.pluck(:name, :id)), - prompt: t("admin.questions.index.select_poll"), - label: t("admin.questions.new.poll_label") %> -
+
+
+ <%= f.select :poll_id, + options_for_select(Poll.pluck(:name, :id)), + prompt: t("admin.questions.index.select_poll"), + label: t("admin.questions.new.poll_label") %> +
- <%= f.text_field :title, maxlength: Poll::Question.title_max_length %> + <%= f.text_field :title, maxlength: Poll::Question.title_max_length %> -
- <%= render 'documents/nested_documents', documentable: @question, f: f %> -
+
+ <%= render 'documents/nested_documents', documentable: @question, f: f %> +
-
- <%= f.label :video_url, t("proposals.form.proposal_video_url") %> -

<%= t("proposals.form.proposal_video_url_note") %>

- <%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false, - aria: {describedby: "video-url-help-text"} %> -
+
+ <%= f.label :video_url, t("proposals.form.proposal_video_url") %> +

<%= t("proposals.form.proposal_video_url_note") %>

+ <%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false, + aria: {describedby: "video-url-help-text"} %> +
-
-
- <%= f.submit(class: "button expanded", value: t("shared.save")) %> -
-
+
+ <%= f.submit(class: "button expanded", value: t("shared.save")) %>
diff --git a/app/views/admin/poll/questions/edit.html.erb b/app/views/admin/poll/questions/edit.html.erb index fffc4a399..52c37badd 100644 --- a/app/views/admin/poll/questions/edit.html.erb +++ b/app/views/admin/poll/questions/edit.html.erb @@ -1,6 +1,6 @@ <%= back_link_to %> -

<%= t("admin.questions.edit.title") %>

+

<%= t("admin.questions.edit.title") %>

<%= render "form", form_url: admin_question_path(@question) %> diff --git a/app/views/admin/poll/questions/index.html.erb b/app/views/admin/poll/questions/index.html.erb index f45497af0..5a326d8f4 100644 --- a/app/views/admin/poll/questions/index.html.erb +++ b/app/views/admin/poll/questions/index.html.erb @@ -3,10 +3,8 @@ <%= link_to t('admin.questions.index.create'), new_admin_question_path, class: "button success float-right" %> -
-
- <%= render 'search' %> -
+
+ <%= render 'search' %>
diff --git a/app/views/admin/poll/questions/new.html.erb b/app/views/admin/poll/questions/new.html.erb index c91b78016..249464a0c 100644 --- a/app/views/admin/poll/questions/new.html.erb +++ b/app/views/admin/poll/questions/new.html.erb @@ -1,6 +1,6 @@ <%= back_link_to %> -

<%= t("admin.questions.new.title") %>

+

<%= t("admin.questions.new.title") %>

<%= render "form", form_url: admin_questions_path %> diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 024c30cd5..64c30de1e 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -5,10 +5,19 @@
-
-
- <%= t("admin.questions.show.title") %> -

<%= @question.title %>

+
+
+

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

+ +

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

<% if @question.proposal.present? %>

@@ -17,57 +26,50 @@ <%= link_to @question.proposal.title, proposal_path(@question.proposal) %>

<% end %> - -

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

- - - - - - - - - - - - - - <% @question.question_answers.each do |answer| %> - - - - - - <% end %> -
- <%= t('admin.questions.show.valid_answers') %> - - <%= link_to t("admin.questions.show.add_answer"), - new_admin_question_answer_path(@question), - class: "button hollow float-right" %> -
<%= t("admin.questions.show.answers.title") %><%= t("admin.questions.show.answers.description") %>Imágenes
<%= answer.title %><%= answer.description %> - <%= link_to "Lista de imágenes", - admin_answer_images_path(answer) %> -
- - <% if @question.video_url.present? %> -

- <%= t("admin.questions.show.video_url") %> -
- <%= @question.video_url %> -

- <% end %> - - <% if @question.documents.any? %> -

- <%= t("admin.questions.show.documents") %> -
- <%= @question.documents.first.title %> -

- <% end %>
+ + + + + + + + + + + + + <% @question.question_answers.each do |answer| %> + + + + + + <% end %> +
+ <%= t('admin.questions.show.valid_answers') %> + <%= link_to t("admin.questions.show.add_answer"), + new_admin_question_answer_path(@question), + class: "button hollow float-right" %> +
<%= t("admin.questions.show.answers.title") %><%= t("admin.questions.show.answers.description") %><%= t("admin.questions.show.answers.images") %>
<%= answer.title %><%= answer.description %> + (<%= answer.images.count %>)
+ <%= link_to t("admin.questions.show.answers.images_list"), + admin_answer_images_path(answer) %> +
+ +<% if @question.video_url.present? %> +

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

+<% end %> + +<% if @question.documents.any? %> +

+ <%= t("admin.questions.show.documents") %> +
+ <%= @question.documents.first.title %> +

+<% end %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 8202695f1..6a1bf6258 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -598,6 +598,8 @@ en: answers: title: Answer description: Description + images: Images + images_list: Images list answers: new: title: "New answer" diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 3ff3abcb5..472418d0c 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -600,6 +600,8 @@ es: answers: title: Respuesta description: Descripción + images: Imágenes + images_list: Lista de imágenes answers: new: title: "Nueva respuesta"