{{ define "content" }}

<div class="container">

  <h1>Home</h1>
  <p>
    Il database contiene attualmente {{.NumOfTeachers}} docenti,
    {{.NumOfClasses}} classi, {{.NumOfSubjects}} materie e
    {{.NumOfActivities}} attività.
  </p>
  
  <div class="karmen-dashboard-header">
    <div class="row">
      <div class="col-md-8">
	<h2>Problemi</h2>
      </div>
      <div class="col-md-4">
	<div class="btn-group pull-right">
	  <a href="/?reload_issues=true" class="btn btn-primary">
	    <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
	    Aggiorna
	  </a>
	</div>
      </div>
    </div>
  </div>

  {{if .Issues}}
  <ul class="list-group">
    {{range $issue := .Issues}}
    <li class="list-group-item">{{$issue.Description}}</li>
    {{end}}
  </ul>
  {{else}}
  <p>La base di dati è coerente.</p>
  {{end}}
  
</div>
{{ end }}
