<%= 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/nested_documents", f: 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") %>
<%= link_to document.title, document.attachment %> <%= render Admin::Poll::Questions::Answers::Documents::TableActionsComponent.new(document) %>
<% end %>