liquid_feedback_frontend
changeset 1746:c7dbb36ce1e0
Show finished title at end of survey
author | bsw |
---|---|
date | Mon Oct 11 10:51:56 2021 +0200 (2021-10-11) |
parents | 49cb472e12d5 |
children | eb34fe00cf5c |
files | app/main/survey/participate.lua db/survey.sql |
line diff
1.1 --- a/app/main/survey/participate.lua Mon Oct 11 10:49:12 2021 +0200 1.2 +++ b/app/main/survey/participate.lua Mon Oct 11 10:51:56 2021 +0200 1.3 @@ -31,7 +31,13 @@ 1.4 1.5 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp survey" }, content = function() 1.6 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.7 - ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = question.question } 1.8 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = function() 1.9 + if survey_member.finished then 1.10 + slot.put(survey.finished_title) 1.11 + else 1.12 + ui.tag{ content = question.question } 1.13 + end 1.14 + } 1.15 end } 1.16 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.17 if survey_member.finished then
2.1 --- a/db/survey.sql Mon Oct 11 10:49:12 2021 +0200 2.2 +++ b/db/survey.sql Mon Oct 11 10:51:56 2021 +0200 2.3 @@ -2,6 +2,7 @@ 2.4 id SERIAL4 PRIMARY KEY, 2.5 title TEXT NOT NULL, 2.6 text TEXT NOT NULL, 2.7 + finished_title TEXT NOT NULL, 2.8 finished_text TEXT NOT NULL, 2.9 created TIMESTAMPTZ NOT NULL DEFAULT now(), 2.10 open_from TIMESTAMPTZ NOT NULL,