Show links to individual results on completion
This commit is contained in:
parent
acbc3f70c6
commit
91ee73d71c
|
@ -41,8 +41,15 @@ function new()
|
|||
end
|
||||
|
||||
function completed(uid)
|
||||
uidstr = string(uid, base=UID_ENCBASE)
|
||||
links = map(["txt", "org", "json"]) do fmt
|
||||
(fmt, linkto(:result,
|
||||
survey = string(SURVEY.id, base=10),
|
||||
responsefile = string(uidstr, '.', fmt),
|
||||
preserve_query = false))
|
||||
end
|
||||
res = html(:surveys, :thanks, layout=:base;
|
||||
uid=string(uid, base=UID_ENCBASE), survey=SURVEY)
|
||||
uid=uidstr, survey=SURVEY, resultlinks=links)
|
||||
Genie.Cookies.set!(res, "response-id", "", Dict{String, Any}("maxage" => -1))
|
||||
Genie.Cookies.set!(res, "response-page", 0, Dict{String, Any}("maxage" => -1))
|
||||
end
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
<main>
|
||||
<h2 style="color: var(--primary)"><em>Thank you</em> for taking part in the survey!</h2>
|
||||
<h5>We hope to see you next year 🙂</h5>
|
||||
<br /><br />
|
||||
<p>You can view your results as
|
||||
<% map(resultlinks) do (fmt, url) %>
|
||||
<a href="$(url)">$(fmt)</a>
|
||||
<% end |> l -> join(l, ", ", ", or ")%>
|
||||
.</p>
|
||||
<br />
|
||||
<a href="/" role="button">Go Home</a>
|
||||
</main>
|
||||
|
|
Loading…
Reference in New Issue