Files
grecia/app/views/polls/questions/show.html.erb

66 lines
1.7 KiB
Plaintext

<% provide :title do %><%= @question.title %><% end %>
<div class="expanded no-margin-top dark-heading">
<div class="row">
<div class="small-12 medium-9 column padding">
<%= render "shared/back_link" %>
<h1><%= @question.title %></h1>
<% if @question.proposal.present? %>
<div class="margin-bottom">
<%= link_to t('poll_questions.show.original_proposal'), @question.proposal %>
</div>
<% end %>
<% if can? :answer, @question %>
<%= link_to t('poll_questions.show.answer_this_question'),
@question.poll,
class: 'large button' %>
<% else %>
<%= render 'polls/reasons_for_not_answering', poll: @question.poll %>
<% end %>
</div>
<div class="small-12 medium-3 column info">
<p>
<span class="title">
<strong><%= t('poll_questions.show.author') %></strong>
</span>
<br>
<% if @question.author_visible_name.present? %>
<%= @question.author_visible_name %>
<% else %>
<%= link_to @question.author.name, @question.author %>
<% end %>
</p>
<p>
<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>
</div>
</div>
</div>
<div class="row margin-top">
<div class="small-12 medium-9 column">
<h3><%= t('poll_questions.show.more_info') %></h3>
<%= @question.description %>
</div>
</div>
<%= render "comments" %>