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