{{ define "content" }}

<div class="container">

  <ol class="breadcrumb">
    <li><a href="/subjects">Materie</a></li>
    <li class="active"><a href="#">{{.Name}}</a></li>
  </ol>

  <div class="karmen-info-header">
    <div class="row">
      <div class="col-md-8">
	<h1>{{.Name}}</h1>
      </div>
      <div class="col-md-4">
	<div class="btn-group pull-right" role="group">
	  <a href="/subjects/{{.ID}}/update" class="btn btn-primary">
	    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
	    Modifica
	  </a>
	  <button href="/subjects/{{.ID}}/delete"
		  data-url="/subjects/{{.ID}}/delete"
		  class="btn btn-danger karmen-ajax-delete">
	    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
	    Elimina
	  </button>
	</div>
      </div>
    </div>
  </div>

  <h2 class="karmen-relation-header">Docenti di {{.Name}}</h2>
  <div class="list-group" id="materie_list_group">
    {{if not .Teachers}}
    <p>Alla materia non è associata alcuna attività
      didattica. Clicca <a href="/activities/add">qui</a> per creare
      una nuova attività didattica da associare alla materia.</p>
    {{else}}
    {{range $teacher := .Teachers}}
    <a href="/teachers/{{$teacher.ID}}" class="list-group-item clearfix">
      <span class="glyphicon glyphicon-user"></span>
      {{$teacher.Name}} {{$teacher.Surname}}
    </a>
    {{end}}
    {{end}}
  </div>


</div>    

{{ end }}
