Disable document upload & show with new setting
When Setting allow_attached_documents is disabled (false value) the user should not be able to upload documents neither see the documents lists
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="documents small-12 column">
|
||||
<%= render 'documents/nested_documents', documentable: @investment, f: f %>
|
||||
</div>
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<div class="documents small-12 column">
|
||||
<%= render 'documents/nested_documents', documentable: @investment, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if feature?(:map) %>
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -51,9 +51,11 @@
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= render 'documents/documents',
|
||||
documents: investment.documents,
|
||||
max_documents_allowed: Budget::Investment.max_documents_allowed %>
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<%= render 'documents/documents',
|
||||
documents: investment.documents,
|
||||
max_documents_allowed: Budget::Investment.max_documents_allowed %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'shared/tags', taggable: investment %>
|
||||
|
||||
|
||||
@@ -80,9 +80,11 @@
|
||||
|
||||
<h4><%= @proposal.question %></h4>
|
||||
|
||||
<%= render 'documents/documents',
|
||||
documents: @proposal.documents,
|
||||
max_documents_allowed: Proposal.max_documents_allowed %>
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<%= render 'documents/documents',
|
||||
documents: @proposal.documents,
|
||||
max_documents_allowed: Proposal.max_documents_allowed %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'shared/tags', taggable: @proposal %>
|
||||
|
||||
|
||||
@@ -52,9 +52,11 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="documents small-12 column">
|
||||
<%= render 'documents/nested_documents', documentable: @proposal, f: f %>
|
||||
</div>
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<div class="documents small-12 column">
|
||||
<%= render 'documents/nested_documents', documentable: @proposal, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :geozone_id, t("proposals.form.geozone") %>
|
||||
|
||||
@@ -106,9 +106,11 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render 'documents/documents',
|
||||
documents: @proposal.documents,
|
||||
max_documents_allowed: Proposal.max_documents_allowed %>
|
||||
<% if feature?(:allow_attached_documents) %>
|
||||
<%= render 'documents/documents',
|
||||
documents: @proposal.documents,
|
||||
max_documents_allowed: Proposal.max_documents_allowed %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'shared/tags', taggable: @proposal %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user