Add documentable to proposal model.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-21 14:00:09 +02:00
parent a2130689ed
commit 586776efd8
6 changed files with 21 additions and 1 deletions

View File

@@ -16,6 +16,12 @@
<div class="small-12 medium-9 column">
<%= back_link_to %>
<% if can? :create, @document %>
<%= link_to t("documents.upload_document"),
new_document_path(documentable_id: @proposal, documentable_type: @proposal.class.name, from: request.url),
class: 'button hollow float-right' %>
<% end %>
<% if author_of?(@proposal, current_user) %>
<%= link_to t("proposals.show.send_notification"), new_proposal_notification_path(proposal_id: @proposal.id),
class: 'button hollow float-right' %>
@@ -156,4 +162,8 @@
<div class="tabs-panel is-active" id="tab-comments">
<%= render "proposals/comments" %>
</div>
<div class="tabs-panel" id="tab-documents">
<%= render 'documents/documents', documents: @proposal.documents %>
</div>
</div>