Newer
Older
dmpopidor / app / views / sections / _show_section.html.erb
<div class="row">
  <div class="col-md-12">
    <p class="text-justify">
      <%= raw section.description %>
    </p>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <h3><%= _('Questions') %></h3>
    <% questions = section.questions.order('number') %>
    <% if questions.present? %>
      <% questions.each do |question| %>
        <% if question.modifiable %>
          <%#= render partial: 'questions/edit_question', locals: {question: question} %>
        <% else %>
          <%#= render partial: 'questions/show_question', locals: {question: question} %>
        <% end %>
        <% if questions.last.id != question.id %>
          <hr />
        <% end %>
      <% end %>
    <% end %>
  </div>
</div>