- if defined?(Foundation)
  = page_title :show, @target_file, back: dunlop.target_files_path
  .display-row
    .display-label= at :sti_type
    .display-field= @target_file.model_name.human
  .display-row
    .display-label= at :state
    .display-field.state= @target_file.human_state_name
  .display-row
    .display-label= at :created_at
    .display-field data-time=@target_file.created_at.iso8601 data-format="LLL"
  .display-row
    .display-label= at :start_time
    .display-field data-time=@target_file.start_time.try(:iso8601) data-format="LLL"
  .display-row
    .display-label= at :end_time
    .display-field data-time=@target_file.end_time.try(:iso8601) data-format="LLL"
  .display-row
    .display-label= at :size
    .display-field= number_to_human_size @target_file.size
  .display-row
    .display-label= at :number_of_records
    .display-field= @target_file.number_of_records
  = render 'dunlop/log_entries', loggable: @target_file
  - if can? :download, @target_file and @target_file.completed?
    .page-actions
      = link_to "Download", dunlop.download_target_file_path(@target_file), class: 'export-button'
- else
  .ui.container
    = page_title :show, @target_file, back: dunlop.target_files_path
    table.ui.top.attached.definition.table
      tr
        td= at :sti_type
        td= @target_file.model_name.human
      tr
        td= at :state
        td= @target_file.human_state_name
      tr
        td= at :created_at
        td: span data-time=@target_file.created_at.iso8601 data-format="LLL"
      tr
        td= at :start_time
        td: span data-time=@target_file.start_time.try(:iso8601) data-format="LLL"
      tr
        td= at :end_time
        td: span data-time=@target_file.end_time.try(:iso8601) data-format="LLL"
      tr
        td= at :size
        td= number_to_human_size @target_file.size
      tr
        td= at :number_of_records
        td= @target_file.number_of_records
    - if can? :download, @target_file and @target_file.completed?
      .ui.bottom.attached.segment.page-actions
        = link_to "Download", dunlop.download_target_file_path(@target_file), class: 'export-button ui violet button'
    = render 'dunlop/log_entries', loggable: @target_file
