{{ define "content" }}

<div class="container">
  
  <div class="karmen-info-header">
    <div class="row">
      <div class="col-md-8">
	<h1>Documenti</h1>
      </div>
      <div class="col-md-4">
	
	<div class="btn-group pull-right">
	  
	  <a href="/teachers/add" class="btn btn-primary">
	    <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
	    Crea nuovo docente
	  </a>
	  
	  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
	    <span class="glyphicon glyphicon-floppy-open" aria-hidden="true"></span>
	    Importa<span class="caret"></span>
	  </button>
	  
	  <div class="dropdown-menu">
	    <div class="container">  
	      <form role="form" id="form_teachers_upload" action="/teachers/import" method="post" enctype="multipart/form-data">
		<div class="form-group">
		  <label class="control-label">Seleziona il file</label>
		  <input id="input-1" type="file" class="file" data-show-preview="false" name="teachers_import">
		</div>
	      </form>
	    </div>  
	  </div>
	</div>
	
      </div>
    </div>
  </div>

  <div class="input-group" style="margin-bottom: 20px">
    <span class="input-group-addon" id="search-query"><span class="glyphicon glyphicon-search"></span></span>
    <input type="text" id="myInput" class="form-control" aria-describedby="search-query">
  </div>
  
  {{if not .Documents}}
  <p>Non c'è alcun elemento da visualizzare</p>
  {{else}}
  <div class="list-group" id="myUL">
    {{range $document := .Documents}}
    <a class="list-group-item clearfix" href="/documents/{{$document.Config.Name}}">
      <span class="glyphicon glyphicon-user"></span>
      {{$document.Config.Name}}
    </a>
    {{end}}
    {{end}}
  </div>

</div>
{{ end }}
