diff --git a/orm/contest.go b/orm/contest.go index 1e09002c..44cfb6dd 100644 --- a/orm/contest.go +++ b/orm/contest.go @@ -19,8 +19,9 @@ import ( type Contest struct { gorm.Model - Name string - Category string + Name string + Category string + Description string Date time.Time StartTime time.Time diff --git a/templates/contests_add_update.html.tpl b/templates/contests_add_update.html.tpl index 41656d71..ee6cb9ef 100644 --- a/templates/contests_add_update.html.tpl +++ b/templates/contests_add_update.html.tpl @@ -22,6 +22,9 @@ {{$options := ` { name: "Name",id: "contest_name",label: "Nome della gara",placeholder: "Inserire il nome della gara",type: "text",required: "true"} `}} {{template "input" dict "options" ($options|yaml) "value" (.Data|field "Name") "update" $update}} + {{$options := ` { name: "Description",id: "contest_description",label: "Descrizione della gara",placeholder: "Inserire una breve descrizione della gara",type: "text",required: "true"} `}} + {{template "textarea" dict "options" ($options|yaml) "value" (.Data|field "Description") "update" $update}} +
{{$options := ` { name: "Date",id: "contest_date",label: "La gara si svolgerà il giorno",type: "date" } `}} diff --git a/templates/contests_show.html.tpl b/templates/contests_show.html.tpl index 3921f4dc..ffb12888 100644 --- a/templates/contests_show.html.tpl +++ b/templates/contests_show.html.tpl @@ -24,6 +24,13 @@ +
+
+

Descrizione

+ {{.Data.Description}} +
+
+
diff --git a/templates/layout/textarea.html.tpl b/templates/layout/textarea.html.tpl new file mode 100644 index 00000000..e1657a09 --- /dev/null +++ b/templates/layout/textarea.html.tpl @@ -0,0 +1,14 @@ +{{define "textarea"}} +
+ + + {{if .options.help}}{{.options.help}}{{end}} +
+{{end}} diff --git a/templates/participants_show.html.tpl b/templates/participants_show.html.tpl index 685149ae..4b88a9c7 100644 --- a/templates/participants_show.html.tpl +++ b/templates/participants_show.html.tpl @@ -86,8 +86,27 @@
{{end}} - - {{if or $isAdmin $isParticipant}} + + {{if $isParticipant}} +
+
+

Prove del partecipante

+ {{range $response := .Data.Responses}} +
+
+ {{$response}} +
+
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+ Apri la prova +
+
+ {{end}} +
+
+ {{end}} + + {{if $isAdmin}}