Urkunde
+{{ .FirstName }} + {{ .MiddleName }} {{ .LastName }} +
+hat beim {{ $.EventName }}
+{{unitFormat "kilometer" .Distance}}km
+für den guten Zweck zurückgelegt
+diff --git a/models/certificate.go b/models/certificate.go index 903bfdf..b17004e 100644 --- a/models/certificate.go +++ b/models/certificate.go @@ -13,6 +13,8 @@ type RunnerWithDonations struct { Group Group `json:"group"` Distance int `json:"distance"` DistanceDonations []DistanceDonation `json:"distance_donations"` + TotalPerDistance int `json:"total_per_distance"` + TotalDonations int `json:"total_donations"` } type DistanceDonation struct { @@ -31,6 +33,8 @@ type Donor struct { } type CertificateTemplateOptions struct { - Runners []RunnerWithDonations `json:"runners"` - EventName string `json:"event_name"` + Runners []RunnerWithDonations `json:"runners"` + EventName string `json:"event_name"` + Footer string `json:"footer"` + CurrencySymbol string `json:"currency_symbol"` } diff --git a/templates/certificate/de.html b/templates/certificate/de.html new file mode 100644 index 0000000..6a59f80 --- /dev/null +++ b/templates/certificate/de.html @@ -0,0 +1,102 @@ + + +
+ +Urkunde
+{{ .FirstName }} + {{ .MiddleName }} {{ .LastName }} +
+hat beim {{ $.EventName }}
+{{unitFormat "kilometer" .Distance}}km
+für den guten Zweck zurückgelegt
+Sponsorings
+Sponsor:in | +Betrag/km | +Gesamtbetrag | + + + {{ range .DistanceDonations}} +
{{ .Donor.FirstName }} {{ .Donor.MiddleName }} {{ .Donor.LastName }} | +{{ unitFormat "euro" .AmountPerDistance }} {{ $.CurrencySymbol }} | +{{ unitFormat "euro" .Amount }} {{ $.CurrencySymbol }} | +Gesamt | +{{ unitFormat .TotalPerDistance }} {{ $.CurrencySymbol }} | +{{ unitFormat .TotalDonations }} {{ $.CurrencySymbol }} | + +