package transcript const HTMLTemplate = ` Transcript {{.Ticket.Type}}-{{printf "%04d" .Ticket.TicketNumber}}

Transcript — {{.Ticket.Type}}-{{printf "%04d" .Ticket.TicketNumber}}

Utilisateur : {{.Ticket.UserID}}  |  Ouvert le : {{.Ticket.OpenedAt.Format "02/01/2006 à 15:04 UTC"}}

Généré le {{.Generated}}  |  {{len .Messages}} messages

{{range .Messages}}
{{if .AuthorAvatar}} {{else}}
{{.AuthorInitial}}
{{end}}
{{.AuthorName}} {{.Timestamp}}
{{if .Content}}
{{.Content}}
{{end}} {{range .Attachments}} {{end}} {{range .Embeds}} {{template "embed" .}} {{end}}
{{end}}
{{define "embed"}}
{{if .Empty}}[Embed vide]{{else}} {{if .AuthorName}}
{{if .AuthorIcon}}{{end}} {{if .AuthorURL}}{{.AuthorName}}{{else}}{{.AuthorName}}{{end}}
{{end}}
{{if .Title}}
{{if .TitleURL}}{{.Title}}{{else}}{{.Title}}{{end}}
{{end}} {{if .Description}}
{{.Description}}
{{end}}
{{if .ThumbURL}}{{end}}
{{if .Fields}}
{{range .Fields}}
{{.Name}}
{{.Value}}
{{end}}
{{end}} {{if .ImageURL}}
{{end}} {{if or .FooterText .Timestamp}} {{end}} {{end}}
{{end}}`