2019-11-14 15:04:11 +01:00
|
|
|
{{ define "content" }}
|
|
|
|
|
2019-12-18 12:34:42 +01:00
|
|
|
{{$isAdmin := .Claims|isAdmin}}
|
2019-12-07 11:44:19 +01:00
|
|
|
{{$isSchool := .Claims|isSchool}}
|
2019-12-18 12:34:42 +01:00
|
|
|
{{$isParticipant := .Claims|isParticipant}}
|
2019-12-07 11:44:19 +01:00
|
|
|
|
2019-11-14 15:04:11 +01:00
|
|
|
<div class="container">
|
|
|
|
|
2019-12-07 11:44:19 +01:00
|
|
|
|
2019-12-18 12:34:42 +01:00
|
|
|
{{if not $isParticipant}}
|
2019-12-09 08:27:46 +01:00
|
|
|
{{template "breadcrumb" toSlice "Partecipanti" (all "Participant") (.Data|string) "current"}}
|
2019-11-14 15:04:11 +01:00
|
|
|
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Participant") "deletePath" (.Data.ID|delete "Participant")}}
|
2019-12-18 12:34:42 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-11-15 10:41:32 +01:00
|
|
|
<h2 class="karmen-relation-header">Informazioni generali</h2>
|
2019-12-06 10:59:00 +01:00
|
|
|
<dl class="row">
|
|
|
|
<dt class="col-sm-3">Username</dt>
|
2020-01-10 14:31:55 +01:00
|
|
|
<dd class="col-sm-9"><span class="text-monospace">{{.Data.User.Username}}</span></dd>
|
2019-12-06 10:59:00 +01:00
|
|
|
<dt class="col-sm-3">Password</dt>
|
2020-01-10 14:31:55 +01:00
|
|
|
<dd class="col-sm-9"><span class="text-monospace">{{.Data.User.Password}}</span></dd>
|
2019-12-09 14:18:31 +01:00
|
|
|
<dt class="col-sm-3">Categoria</dt>
|
|
|
|
<dd class="col-sm-9">{{.Data.Category}}</dd>
|
2022-02-01 18:32:03 +01:00
|
|
|
<dt class="col-sm-3">Anno di corso</dt>
|
|
|
|
<dd class="col-sm-9">{{.Data.Year}}</dd>
|
|
|
|
<dt class="col-sm-3">Indirizzo di studi</dt>
|
|
|
|
<dd class="col-sm-9">{{.Data.StudyField}}</dd>
|
2019-12-09 15:17:30 +01:00
|
|
|
|
|
|
|
{{if $isAdmin}}
|
2019-12-07 08:58:30 +01:00
|
|
|
{{if $creatorUser:=.Data.CreatedBy}}
|
|
|
|
<dt class="col-sm-3">Creato da</dt>
|
|
|
|
<dd class="col-sm-9">{{$creatorUser.Username}}[{{$creatorUser.Role}}] {{$.Data.CreatedAt|prettyDateTime}}</dd>
|
|
|
|
<dt class="col-sm-3">IP di chi ha creato il partecipante</dt>
|
2019-12-06 10:59:00 +01:00
|
|
|
<dd class="col-sm-9">{{.Data.CreatorIP}}</dd>
|
2019-12-07 08:58:30 +01:00
|
|
|
{{end}}
|
|
|
|
{{if $updaterUser:=.Data.UpdatedBy}}
|
|
|
|
<dt class="col-sm-3">Modificato da</dt>
|
|
|
|
<dd class="col-sm-9">{{$updaterUser.Username}}[{{$updaterUser.Role}}] {{$.Data.UpdatedAt|prettyDateTime}}</dd>
|
|
|
|
<dt class="col-sm-3">IP di chi ha modificato il partecipante</dt>
|
|
|
|
<dd class="col-sm-9">{{.Data.UpdaterIP}}</dd>
|
|
|
|
{{end}}
|
2019-12-09 15:17:30 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-12-06 10:59:00 +01:00
|
|
|
</dl>
|
2019-12-03 15:24:01 +01:00
|
|
|
|
2019-12-18 12:34:42 +01:00
|
|
|
{{if or $isAdmin $isSchool}}
|
2019-12-03 15:24:01 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
|
|
{{$options := `
|
|
|
|
title: "Scuola di appartenenza del partecipante"
|
|
|
|
model: "School"
|
|
|
|
icon: "fa fa-school"
|
|
|
|
`}}
|
|
|
|
|
|
|
|
{{$noElements := "Il partecipante non appartiene ad alcuna scuola."}}
|
|
|
|
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.School "noElements" $noElements}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-18 12:34:42 +01:00
|
|
|
{{end}}
|
|
|
|
|
2019-12-09 14:18:31 +01:00
|
|
|
{{if $isAdmin}}
|
2019-12-09 08:27:46 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
|
|
{{$options := `
|
|
|
|
title: "Categoria del partecipante"
|
|
|
|
model: "Category"
|
|
|
|
icon: "fa fa-object-group"
|
|
|
|
`}}
|
|
|
|
|
|
|
|
{{$noElements := "Il partecipante non appartiene ad alcuna categoria."}}
|
|
|
|
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.Category "noElements" $noElements}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-11-14 15:04:11 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
|
|
{{$options := `
|
2019-11-15 10:41:32 +01:00
|
|
|
title: "Gare a cui il partecipante è iscritto"
|
|
|
|
model: "Contest"
|
|
|
|
icon: "fa fa-hourglass-start"
|
2019-11-14 15:04:11 +01:00
|
|
|
`}}
|
|
|
|
|
2019-11-15 10:41:32 +01:00
|
|
|
{{$noElements := "Il partecipante non è iscritto ad alcuna gara."}}
|
|
|
|
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.Contests "noElements" $noElements}}
|
2019-11-14 15:04:11 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-18 12:34:42 +01:00
|
|
|
{{end}}
|
2020-02-05 14:12:08 +01:00
|
|
|
|
|
|
|
{{if $isParticipant}}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2020-12-24 18:38:14 +01:00
|
|
|
<h2 class="karmen-relation-header">Gare a cui il partecipante è iscritto</h2>
|
2020-12-28 12:23:41 +01:00
|
|
|
{{if .Data.Responses}}
|
2020-02-05 14:12:08 +01:00
|
|
|
{{range $response := .Data.Responses}}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
{{$response}}
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
2020-02-05 14:39:56 +01:00
|
|
|
<p class="card-text">{{$response.Contest.Description|markdown|html}}</p>
|
2020-12-24 18:38:14 +01:00
|
|
|
<a href="{{$response.ID|show "Response"|html}}" class="btn btn-primary">Vai ai dettagli della gara</a>
|
2020-02-05 14:12:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-12-28 12:23:41 +01:00
|
|
|
{{else}}
|
|
|
|
Il partecipante non è iscritto ad alcuna gara.
|
|
|
|
{{end}}
|
2020-02-05 14:12:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if $isAdmin}}
|
2019-11-22 11:16:27 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
|
|
{{$options := `
|
|
|
|
title: "Prove del partecipante"
|
|
|
|
model: "Response"
|
|
|
|
icon: "fa fa-hourglass-start"
|
|
|
|
`}}
|
|
|
|
|
2020-02-03 12:52:56 +01:00
|
|
|
{{$noElements := "Al partecipante non è associata alcuna prova."}}
|
2019-11-22 11:16:27 +01:00
|
|
|
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.Responses "noElements" $noElements}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-09 08:27:46 +01:00
|
|
|
{{end}}
|
2020-01-27 14:21:08 +01:00
|
|
|
|
|
|
|
{{if or $isAdmin $isSchool}}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h2 class="karmen-relation-header">Suggerimenti</h2>
|
2020-02-19 14:57:31 +01:00
|
|
|
{{if .Data.School}}
|
2020-01-27 15:05:24 +01:00
|
|
|
{{if le (len .Data.School.Participants) 1}}
|
|
|
|
<p>
|
|
|
|
E' possibile iscrivere fino a due partecipanti alla gara (di diversa categoria).
|
2020-02-10 14:29:24 +01:00
|
|
|
<a id="new_participant_subscribe" href="{{create "Participant"}}" class="float-right btn btn-success btn-sm">
|
2020-01-27 15:05:24 +01:00
|
|
|
<span class="fa fa-plus-circle" aria-hidden="true"></span>
|
|
|
|
Iscrivi un nuovo partecipante
|
|
|
|
</a>
|
|
|
|
</p>
|
2020-01-27 14:21:08 +01:00
|
|
|
{{end}}
|
|
|
|
{{if eq (len .Data.School.Participants) 2}}
|
|
|
|
<div class="alert alert-warning mt-4">
|
|
|
|
<strong>Iscrizione completa.</strong> Non è possibile aggiungere ulteriori partecipanti.
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-02-19 14:57:31 +01:00
|
|
|
{{end}}
|
2020-02-18 09:05:22 +01:00
|
|
|
<div class="alert alert-danger text-justify">
|
|
|
|
<span class="fa
|
|
|
|
fa-exclamation-triangle mr-1">
|
|
|
|
</span><strong>Attenzione</strong> Una
|
|
|
|
volta terminata l'iscrizione dei partecipanti, è necessario
|
|
|
|
memorizzare le loro credenziali di accesso (Username/Password)
|
|
|
|
in quanto queste verranno richieste il giorno della gara per
|
|
|
|
poter accedere alla piattaforma. E' necessario verificare il
|
|
|
|
corretto accesso alla piattaforma fin da subito e comunque
|
|
|
|
<strong>prima</strong> della gara.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-01-27 14:21:08 +01:00
|
|
|
</div>
|
2020-02-19 14:57:31 +01:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-01-27 14:21:08 +01:00
|
|
|
|
2019-11-14 15:04:11 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ end }}
|