{{ define "content" }}

<div class="container">

  <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="/documents?{{query "tpl_layout" "base" "tpl_content" "documents"}}">Documenti</a></li>
      <li class="breadcrumb-item"><a href="/documents/{{.Data.DocumentID}}?{{query "tpl_layout" "base" "tpl_content" "documents_show"}}">{{.Data.Document.Name}}</a></li>
      <li class="breadcrumb-item active"><a href="#">Lavoro ID {{.Data.ID}}</a></li>
    </ol>
  </nav>

  <div class="karmen-info-header">
    <div class="row">
      <div class="col-md-8">
	<h1>{{.Data.Name}}</h1>
      </div>
      <div class="col-md-4">
        
	<div class="btn-group float-right" role="group">
	  <button href="/jobs/{{.Data.ID}}/delete"
		  data-url="/jobs/{{.Data.ID}}/delete"
		  class="btn btn-danger karmen-ajax-delete">
            <span class="fa fa-trash" aria-hidden="true"></span>
	    Elimina
	  </button>
	</div>

      </div>
    </div>
  </div>
  
  <div class="row">
    <div class="col-md-12">
      
      <h2 class="karmen-relation-header">Documenti prodotti</h2>
      {{if .Data.Files}}
      <div class="list-group" id="files_list_group">
    	{{range $file := .Data.Files}}
    	<a href="/jobs/{{$file.JobID}}/files/{{$file.Path}}?format=pdf" class="list-group-item list-group-item-action">
    	  <span class="fa fa-file-alt"></span>
    	  {{$file.Path}}
    	  {{end}}
    	</a>
      </div>
      {{else}}
      <p>Non è stato prodotto nessun file..</p>
      {{end}}
    </div>
    
  </div>


</div>    

{{ end }}
