app/views/opportunities/_attachments.html.erb
<% if @opportunity.attachments.present? %>
<div class='opportunity_section'>
<div class='page_subheader'>
<h4><i class='fa fa-cloud-upload'></i> <%= t('attachments') %></h4>
</div>
<div class='attachment_thumbs'>
<% @opportunity.attachments.each do |attachment| %>
<%= render partial: 'view_attachment', locals: { attachment: attachment } %>
<% end %>
</div>
</div>
<% end %>