{{/* A large label for polls' candidates. */}} {{/* No javascript for now. There may be _some_. */}} {{/* .Poll : the Poll in question */}} {{/* .CandidateID : the Candidate */}} {{/* .Super : $ of parent template */}} {{ $pollResult := .Poll.GetResult }} {{/*{{ $candidateID := .Issue.Index }}*/}} {{ $candidateID := .CandidateID }} {{ $pollID := .Poll.ID }} {{ $pollCandidateResult := ($pollResult.GetCandidate $candidateID) }} {{ $medianColorWord := "grey" }} {{ if $pollCandidateResult }} {{ $medianColorWord = $pollCandidateResult.GetColorWord }} {{ end }} {{/*{{ $judgment := nil }} ??? */}} {{ $judgment := "" }} {{ if $.Super.IsSigned }} {{ $judgment = (.Poll.GetJudgmentOnCandidate $.Super.SignedUser $candidateID) }} {{ end }} {{/*{{ $userGrade := nil }}*/}} {{ $userGrade := -1 }} {{ if $judgment }} {{ $userGrade = $judgment.Grade }} {{ end }} {{/* Wrapper for the :hover, old school */}}
{{/* Oddly enough, this svg requires javascript. Hmmm… */}} {{ svg "octicon-law" 16 }} {{ .Poll.Subject }} {{ if $pollCandidateResult -}} N°{{ $pollCandidateResult.Position }} {{- end }}
{{ if $.Super.IsSigned }}
{{ range $grade, $icon := .Poll.GetGradationList }}
{{ $.Super.CsrfTokenHtml }}
{{ end }}
{{ end }}