podemos-info/census

View on GitHub
app/views/procedures/document_verification/_show.arb

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

context.instance_eval do
  columns do
    column do
      procedure.attachments.each do |attachment|
        a href: attachment.view_path do
          if attachment.image?
            img src: attachment.view_path(version: :thumbnail)
          else
            attachment.file.file.original_filename
          end
        end
      end
    end
    column do
      render partial: "procedures/show", locals: { context: context, procedure: procedure }
      render partial: "procedures/document_verification/verificable_data", locals: { procedure: procedure }
      render partial: "procedures/common_form", locals: { context: context, procedure: procedure }
    end
  end
end