<%= back_link_to admin_question_path(@answer.question) %>

<%= t("admin.questions.show.answers.documents_list") %>

<% if can?(:update, @answer) %> <%= form_for(Poll::Question::Answer.new, url: admin_answer_documents_path(answer)) do |f| %> <%= render "shared/errors", resource: answer %> <%= render Documents::NestedComponent.new(f) %>
<%= f.submit(class: "button expanded", value: t("shared.save")) %>
<% end %> <% else %>
<%= t("admin.questions.no_edit") %>
<% end %> <% if documents.present? %> <% documents.each do |document| %> <% end %>
<%= t("admin.questions.show.answers.document_title") %> <%= t("admin.questions.show.answers.document_actions") %>
<%= document.title %> <%= render Admin::Poll::Questions::Answers::Documents::TableActionsComponent.new(document) %>
<% end %>