{{ define "content" }}

<div class="container">  

  {{$options := `
  title: "Uffici"
  buttonTitle: "Crea nuovo ufficio"
  `}}
  
  {{template "read_all_header" dict  "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Office")}}
  {{template "search_input"}}
    
  {{if not .}}
  {{template "display_no_elements"}}
  {{else}}
  <div class="list-group" id="myUL">
    {{range $office := .Data}}
    <a class="list-group-item list-group-item-action" href={{$office.ID|show "Office"}}>
      <span class="fa fa-user"></span>
      {{$office.Name}}
      <div class="text-right">
        {{$options := `noElements: "nessun personale amministrativo"`}}
        {{template "small" dict "options" ($options | yaml) "data" $office.Administratives}}
      </div>
    </a>
    {{end}}
    {{end}}
  </div>

</div>

{{ end }}

