{{ define "content" }}

<div class="container">

  <ol class="breadcrumb">
    <li><a href="/activities?{{query "base" "activities"}}">Attività</a></li>
    <li class="active"><a href="#">{{.Data.Subject.Name}} {{.Data.Class.Name}} {{.Data.Hours}}h</a></li>
  </ol>

  <div class="karmen-info-header">
    <div class="row">
      <div class="col-md-8">
	<h1>{{.Data.Subject.Name}} {{.Data.Class.Name}} {{.Data.Hours}}h</h1>
      </div>
      <div class="col-md-4">
	<div class="btn-group pull-right" role="group">
	  <a href="/activities/{{.Data.ID}}/update?{{query "tpl_layout" "base" "tpl_content" "activities_add_update" "update" "true"}}" class="btn btn-primary">
	    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
	    Modifica
	  </a>
	  <button href="/activities/{{.Data.ID}}/delete"
		  data-url="/activities/{{.Data.ID}}/delete"
		  class="btn btn-danger karmen-ajax-delete">
	    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
	    Elimina
	  </button>
	</div>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-md-12">
      
      <h2 class="karmen-relation-header">Materia</h2>
      {{if .Data.Subject}}
      <div class="list-group" id="materie_list_group">
    	<a href="/subjects/{{.Data.Subject.ID}}?{{query "base" "subjects_show"}}" class="list-group-item clearfix">
    	  <span class="glyphicon glyphicon-book"></span>
    	  {{.Data.Subject.Name}}
    	</a>
      </div>
      {{else}}
      <p>All'attività non è associata alcuna materia
    	didattica. Clicca <a href="/activities/update?{{query "base" "activities_add_update"}}">qui</a> per
    	modificare questa attività didattica.</p>
      {{end}}
    </div>
    
  </div>

  <div class="row">
    <div class="col-md-12">
      
      <h2 class="karmen-relation-header">Classe</h2>
      {{if .Data.Class}}
      <div class="list-group" id="classes_list_group">

	<a href="/classes/{{.Data.Class.ID}}?{{query "base" "classes_show"}}" class="list-group-item clearfix">
	  <span class="glyphicon glyphicon-blackboard"></span>
	  {{.Data.Class.Name}}
	</a>
	
      </div>
      {{else}}
      
      <p>All'attività non è associata alcuna classe
    	didattica. Clicca <a href="/activities/update?{{query "base" "activities_add_update"}}">qui</a> per
    	modificare questa attività didattica.</p>
      
      {{end}}
    </div>
    
  </div>

  <div class="row">
    <div class="col-md-12">
      
      <h2 class="karmen-relation-header">Docente</h2>
      {{if .Data.Teacher}}
      <div class="list-group" id="classes_list_group">
	<a href="/teachers/{{.Data.Teacher.ID}}?{{query "base" "teachers_show"}}" class="list-group-item clearfix">
	  <span class="glyphicon glyphicon-briefcase"></span>
	  {{.Data.Teacher.Surname}} {{.Data.Teacher.Name}}
	</a>
      </div>
            
      {{else}}

      <p>All'attività non è associato alcun docente
    	didattica. Clicca <a href="/activities/update?{{query "base" "activities_add_update"}}">qui</a> per
    	modificare questa attività didattica.</p>
	    
      {{end}}
    </div>
  </div>


</div>    

{{ end }}
