<% if @pagy %>
<%== pagy_info(@pagy) %>
<%== pagy_bootstrap_nav(@pagy) %>
<% end %>
<% if @document %>
External – Document Distributions
<% end %>
<% @document_distributions.each do |document_distribution| %>
<%= link_to document_distribution.friendlier_id, admin_document_path(document_distribution.document) %> |
<%= document_distribution.reference_type.reference_type %> |
<%= document_distribution.reference_type.reference_uri %> |
<%= link_to document_distribution.url, document_distribution.url, target: '_blank' %> |
<%= document_distribution.label %> |
<%= link_to 'Edit', edit_admin_document_document_distribution_path(document_distribution.document, document_distribution) %> |
<%= link_to 'Destroy', admin_document_document_distribution_path(document_distribution.document, document_distribution), method: :delete, data: { confirm: 'Are you sure?' } %> |
<% end %>
<% if @pagy %>
<%== pagy_info(@pagy) %>
<%== pagy_bootstrap_nav(@pagy) %>
<% end %>
<% if @document && @document.distributable_assets.any? %>
Internal – Distributable Assets
<%= render partial: 'admin/document_assets/assets_table', locals: { document_assets: @document.document_assets } %>
<% end %>
<% if params[:document_id] %>
Ruby Hash
<%= ap(@document.distributions).html_safe %>
JSON
<%= ap(@document.distributions.to_json).html_safe %>
<% @document.distributions_csv.each do |row| %>
<% row.each do |value| %>
<%= value %> |
<% end %>
<% end %>
<% end %>