Show respondent names on admin page
This commit is contained in:
@ -365,6 +365,12 @@ func (h *handler) handleAdmin(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Build the respondents list
|
||||
respondentsList := e.Ul()()
|
||||
for _, r := range summary.RespondentNames {
|
||||
respondentsList.Children = append(respondentsList.Children, e.Li()(hm.Text(r)))
|
||||
}
|
||||
|
||||
// Build the counts table
|
||||
dateSpan := metadata.Latest.Sub(metadata.Earliest)
|
||||
var dates []date.Date
|
||||
@ -426,8 +432,9 @@ func (h *handler) handleAdmin(w http.ResponseWriter, r *http.Request) {
|
||||
a.Disabled(true),
|
||||
),
|
||||
),
|
||||
e.H3()(hm.Text("Responses")),
|
||||
e.P()(hm.Text(strconv.Itoa(summary.TotalResponses))),
|
||||
e.H3()(hm.Text("Respondents")),
|
||||
respondentsList,
|
||||
e.H3()(hm.Text("Results")),
|
||||
countsTable,
|
||||
}
|
||||
_ = h.writePage(w, "Edit your event", body)
|
||||
|
Reference in New Issue
Block a user