diff --git a/app/views/polls/questions/_answers.html.erb b/app/views/polls/questions/_answers.html.erb index c7effd0c0..c88156b68 100644 --- a/app/views/polls/questions/_answers.html.erb +++ b/app/views/polls/questions/_answers.html.erb @@ -2,7 +2,7 @@ <% if can? :answer, question %> <% question.valid_answers.each do |answer| %> <% if @answers_by_question_id[question.id] == answer %> - "> + "> <%= answer %> <% else %> @@ -16,7 +16,7 @@ <% end %> <% else %> <% question.valid_answers.each do |answer| %> - <%= answer %> + <%= answer %> <% end %> <% end %> diff --git a/app/views/polls/questions/_question.html.erb b/app/views/polls/questions/_question.html.erb index b8040c85b..f0958b6e4 100644 --- a/app/views/polls/questions/_question.html.erb +++ b/app/views/polls/questions/_question.html.erb @@ -3,7 +3,7 @@ <%= link_to question.title, question_path(question) %> -
+
<%= render 'polls/questions/answers', question: question %>
diff --git a/app/views/polls/questions/show.html.erb b/app/views/polls/questions/show.html.erb index 76265797c..3f4cb0851 100644 --- a/app/views/polls/questions/show.html.erb +++ b/app/views/polls/questions/show.html.erb @@ -27,52 +27,67 @@ <%= t('poll_questions.show.author') %> -

-

- <%= link_to @question.author.name, @question.author, class: "margin-bottom" %> +
+ <%= link_to @question.author.name, @question.author %>

- - <%= t('poll_questions.show.dates_title') %> + + <%= t('poll_questions.show.poll') %> + +
+ <%= link_to @question.poll.name, @question.poll %> +

+ +

+ + <%= t('poll_questions.show.dates_title') %> + +
+ <%= poll_dates(@question.poll) %>

-

<%= poll_dates(@question.poll) %>

-<% if @question.poll.current? %>
- <% if current_user.nil? %> + <% if @question.poll.current? %> + + <% if current_user.nil? %> +
+ <%= t("poll_questions.show.not_logged_in", + signin: link_to(t("poll_questions.show.signin"), new_user_session_path, class: "probe-message"), + signup: link_to(t("poll_questions.show.signup"), new_user_registration_path, class: "probe-message")).html_safe %> +
+ <% elsif current_user.unverified? %> +
+ <%= t('poll_questions.show.cant_answer_verify_html', + verify_link: link_to(t('poll_questions.show.verify_link'), verification_path)) %> +
+ <% else %> +
+ <%= t('poll_questions.show.cant_answer_wrong_geozone') %> +
+ <% end %> + +
+
+ <%= render "answers", question: @question %> +
+
+ + <% elsif @question.poll.incoming? %> +
+ <%= t('poll_questions.show.cant_answer_expired') %> +
+ <% elsif @question.poll.expired? %>
- <%= t("poll_questions.show.not_logged_in", - signin: link_to(t("poll_questions.show.signin"), new_user_session_path, class: "probe-message"), - signup: link_to(t("poll_questions.show.signup"), new_user_registration_path, class: "probe-message")).html_safe %> -
- <% elsif current_user.unverified? %> -
- <%= t('poll_questions.show.cant_answer_verify_html', - verify_link: link_to(t('poll_questions.show.verify_link'), verification_path)) %> -
- <% else %> -
- <%= t('poll_questions.show.cant_answer_wrong_geozone') %> + <%= t('poll_questions.show.cant_answer_incoming') %>
<% end %>
- -
-
- <%= render "answers", question: @question %> -
-
-<% elsif @question.poll.incoming? %> - <%= t('poll_questions.show.cant_answer_expired') %> -<% elsif @question.poll.expired? %> - <%= t('poll_questions.show.cant_answer_incoming') %> -<% end %>