improves styles for polls questions views
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<% if can? :answer, question %>
|
<% if can? :answer, question %>
|
||||||
<% question.valid_answers.each do |answer| %>
|
<% question.valid_answers.each do |answer| %>
|
||||||
<% if @answers_by_question_id[question.id] == answer %>
|
<% if @answers_by_question_id[question.id] == answer %>
|
||||||
<span class="button" title="<%= t("poll_questions.show.voted", answer: answer)%>">
|
<span class="button answered" title="<%= t("poll_questions.show.voted", answer: answer)%>">
|
||||||
<%= answer %>
|
<%= answer %>
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% question.valid_answers.each do |answer| %>
|
<% question.valid_answers.each do |answer| %>
|
||||||
<span class="button disabled"><%= answer %></span>
|
<span class="button secondary hollow disabled"><%= answer %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<%= link_to question.title, question_path(question) %>
|
<%= link_to question.title, question_path(question) %>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div id="<%= dom_id(question) %>_answers">
|
<div id="<%= dom_id(question) %>_answers" class="padding">
|
||||||
<%= render 'polls/questions/answers', question: question %>
|
<%= render 'polls/questions/answers', question: question %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,23 +27,33 @@
|
|||||||
<span class="title">
|
<span class="title">
|
||||||
<strong><%= t('poll_questions.show.author') %></strong>
|
<strong><%= t('poll_questions.show.author') %></strong>
|
||||||
</span>
|
</span>
|
||||||
|
<br>
|
||||||
|
<%= link_to @question.author.name, @question.author %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= link_to @question.author.name, @question.author, class: "margin-bottom" %>
|
<span class="title">
|
||||||
|
<strong><%= t('poll_questions.show.poll') %></strong>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<%= link_to @question.poll.name, @question.poll %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<span class="title">
|
<span class="title">
|
||||||
<strong><%= t('poll_questions.show.dates_title') %></strong>
|
<strong><%= t('poll_questions.show.dates_title') %></strong>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<%= poll_dates(@question.poll) %>
|
||||||
</p>
|
</p>
|
||||||
<p><%= poll_dates(@question.poll) %></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @question.poll.current? %>
|
|
||||||
<div class="row margin-top">
|
<div class="row margin-top">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
|
<% if @question.poll.current? %>
|
||||||
|
|
||||||
<% if current_user.nil? %>
|
<% if current_user.nil? %>
|
||||||
<div class="callout primary">
|
<div class="callout primary">
|
||||||
<%= t("poll_questions.show.not_logged_in",
|
<%= t("poll_questions.show.not_logged_in",
|
||||||
@@ -60,19 +70,24 @@
|
|||||||
<%= t('poll_questions.show.cant_answer_wrong_geozone') %>
|
<%= t('poll_questions.show.cant_answer_wrong_geozone') %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="<%= dom_id(@question) %>_answers">
|
<div id="<%= dom_id(@question) %>_answers">
|
||||||
<div class="small-12 small-centered text-center column">
|
<div class="small-12 small-centered text-center column">
|
||||||
<%= render "answers", question: @question %>
|
<%= render "answers", question: @question %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<% elsif @question.poll.incoming? %>
|
<% elsif @question.poll.incoming? %>
|
||||||
|
<div class="callout alert">
|
||||||
<%= t('poll_questions.show.cant_answer_expired') %>
|
<%= t('poll_questions.show.cant_answer_expired') %>
|
||||||
<% elsif @question.poll.expired? %>
|
</div>
|
||||||
|
<% elsif @question.poll.expired? %>
|
||||||
|
<div class="callout primary">
|
||||||
<%= t('poll_questions.show.cant_answer_incoming') %>
|
<%= t('poll_questions.show.cant_answer_incoming') %>
|
||||||
<% end %>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row margin-top">
|
<div class="row margin-top">
|
||||||
<div class="small-12 medium-9 column">
|
<div class="small-12 medium-9 column">
|
||||||
|
|||||||
Reference in New Issue
Block a user