= repository_nav ontology.repository, :ontologies

= ontology_nav ontology, :theorems

%h3
  = link_to theorem, locid_for(theorem)
  = render partial: 'theorems/proof_status', locals: {proof_status: theorem.proof_status}

%h4 Proof Attempts
= link_to t('theorems.show.prove'), [*resource_chain, theorem, :proofs, :new], class: 'btn btn-primary'
- if collection.empty?
  = t('theorems.show.proof_attemps_empty')
- else
  %table
    %thead
      %tr
        %th Number
        %th Date
        %th Time taken
        %th Prover
        %th Status
        %th State
    - collection.latest.each do |proof_attempt|
      %tr
        %td= link_to proof_attempt.number, proof_attempt.locid
        %td
          = link_to proof_attempt.locid do
            %span.timestamp= proof_attempt.created_at
        %td
          = proof_attempt.time_taken
          = t('proof_attempts.show.seconds')
        %td= proof_attempt.prover
        %td= render partial: 'theorems/proof_status', locals: {proof_status: proof_attempt.proof_status}
        %td= state_tag(proof_attempt)

= repository_nav ontology.repository, :ontologies

= ontology_nav ontology, :theorems

%h3
  = link_to theorem, locid_for(theorem)
  = render partial: 'theorems/proof_status', locals: {proof_status: theorem.proof_status}

- unless State::TERMINAL_STATES.include?(theorem.state)
  = render partial: '/shared/state', locals: {resource: theorem}

%h4 Proof Attempts
= link_to t('theorems.show.prove'), [*resource_chain, theorem, :proofs, :new], class: 'btn btn-primary'
- if collection.empty?
  = t('theorems.show.proof_attemps_empty')
- else
  %table
    %thead
      %tr
        %th Number
        %th Date
        %th Time taken
        %th Prover
        %th Status
        %th State
    - collection.latest.each do |proof_attempt|
      %tr
        %td= link_to proof_attempt.number, proof_attempt.locid
        %td
          = link_to proof_attempt.locid do
            %span.timestamp= proof_attempt.created_at
        %td
          = proof_attempt.time_taken
          = t('proof_attempts.show.seconds')
        %td= proof_attempt.prover
        %td= render partial: 'theorems/proof_status', locals: {proof_status: proof_attempt.proof_status}
        %td= state_tag(proof_attempt)

Add theorem state to proof attempt index view.
Add theorem state to proof attempt index view.
