|
@@ -1,55 +1,32 @@
|
|
{{ define "content" }}
|
|
{{ define "content" }}
|
|
|
|
|
|
-<div class="container">
|
|
|
|
-
|
|
|
|
- <div class="karmen-info-header">
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col-md-8">
|
|
|
|
- <h1>Attività ({{len .Data}})</h1>
|
|
|
|
- </div>
|
|
|
|
- <div class="col-md-4">
|
|
|
|
- <a href="/activities/add/?{{query "tpl_layout" "base" "tpl_content" "activities_add_update"}}" class="btn btn-primary float-right">
|
|
|
|
- <span class="fa fa-plus-circle" aria-hidden="true"></span>
|
|
|
|
- Crea nuova attività
|
|
|
|
- </a>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+<div class="container">
|
|
|
|
|
|
- <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>
|
|
|
|
|
|
+ {{$options := `
|
|
|
|
+ title: "Attività"
|
|
|
|
+ buttonTitle: "Crea nuova attività"
|
|
|
|
+ `}}
|
|
|
|
|
|
- {{if not .Data}}
|
|
|
|
- <p>Non c'è alcun elemento da visualizzare</p>
|
|
|
|
|
|
+ {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "activity")}}
|
|
|
|
+ {{template "search_input"}}
|
|
|
|
+
|
|
|
|
+ {{if not .}}
|
|
|
|
+ {{template "display_no_elements"}}
|
|
{{else}}
|
|
{{else}}
|
|
<div class="list-group" id="myUL">
|
|
<div class="list-group" id="myUL">
|
|
{{range $activity := .Data}}
|
|
{{range $activity := .Data}}
|
|
- <a class="list-group-item list-group-item-action" href="/activities/{{$activity.ID}}?{{query "tpl_layout" "base" "tpl_content" "activities_show"}}">
|
|
|
|
- <span class="fas fa-business-time"></span>
|
|
|
|
- {{if not $activity.Subject}}
|
|
|
|
- <small>no materia</small>
|
|
|
|
- {{else}}
|
|
|
|
- {{$activity.Subject.Name}}
|
|
|
|
- {{end}}
|
|
|
|
|
|
+ <a class="list-group-item list-group-item-action" href={{$activity.ID|show "activity"}}>
|
|
|
|
+ <span class="fa fa-business-time"></span>
|
|
|
|
+ {{$activity.Name}}
|
|
<div class="text-right">
|
|
<div class="text-right">
|
|
- {{if not $activity.Teacher}}
|
|
|
|
- <small>no docente</small>
|
|
|
|
- {{else}}
|
|
|
|
- <small>{{$activity.Teacher.Surname}}</small>
|
|
|
|
- {{end}}
|
|
|
|
- {{if not $activity.Class}}
|
|
|
|
- <small>no classe</small>
|
|
|
|
- {{else}}
|
|
|
|
- <small>{{$activity.Class.Name}}</small>
|
|
|
|
- {{end}}
|
|
|
|
- <small>{{$activity.Hours}}h</small>
|
|
|
|
|
|
+ {{$options := `noElements: "no docente"`}}
|
|
|
|
+ {{template "small" dict "options" ($options | yaml) "data" $activity.Teacher}}
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
{{ end }}
|
|
{{ end }}
|