2020-10-12 17:51:35 +02:00
|
|
|
extends layout.pug
|
|
|
|
block append scripts
|
|
|
|
script(src="/JS/polyfill.app.js" defer)
|
2022-03-01 17:40:41 +01:00
|
|
|
script(src="/JS/quiz.app.js" defer)
|
2020-10-12 17:51:35 +02:00
|
|
|
block content
|
2020-10-20 11:01:52 +02:00
|
|
|
-
|
2020-11-16 11:59:28 +01:00
|
|
|
if(group.Questionnaires.length !==0)
|
2020-10-20 11:01:52 +02:00
|
|
|
{
|
2020-11-16 11:59:28 +01:00
|
|
|
const imgAttributes = { alt: txtIllustration.defaultAlt, style: "opacity: 0.0;" };
|
|
|
|
if(group.Questionnaires[0].Illustrations!=undefined && group.Questionnaires[0].Illustrations.length!==0)
|
|
|
|
{
|
|
|
|
if (tool.isEmpty(group.Questionnaires[0].Illustrations[0].alt)===false)
|
|
|
|
imgAttributes.alt=group.Questionnaires[0].Illustrations[0].alt;
|
|
|
|
if(tool.isEmpty(group.Questionnaires[0].Illustrations[0].title)===false)
|
|
|
|
imgAttributes.title=group.Questionnaires[0].Illustrations[0].title;
|
|
|
|
}
|
2020-10-20 11:01:52 +02:00
|
|
|
}
|
|
|
|
const publishedAtTxt=tool.dateFormat(group.Group.publishingAt, group.Group.language);
|
|
|
|
const updatedAtTxt=tool.dateFormat(group.Group.updatedAt, group.Group.language);
|
|
|
|
|
2020-11-16 11:59:28 +01:00
|
|
|
if(group.Questionnaires.length !==0 && group.Questionnaires[0].Illustrations!=undefined && group.Questionnaires[0].Illustrations.length!==0)
|
2020-10-20 11:01:52 +02:00
|
|
|
div(id="content-picture" class="cardboard")
|
|
|
|
div(style="background-image: url('/img/quizs/"+group.Questionnaires[0].Illustrations[0].url+"');")
|
|
|
|
img(src="/img/quizs/"+group.Questionnaires[0].Illustrations[0].url)&attributes(imgAttributes)
|
|
|
|
if(group.Questionnaires[0].Illustrations[0].caption)
|
|
|
|
p !{group.Questionnaires[0].Illustrations[0].caption}
|
2020-10-12 17:51:35 +02:00
|
|
|
div(id="content-side")
|
|
|
|
div(id="content-title")
|
|
|
|
h1(class="cardboard")
|
2020-10-20 11:01:52 +02:00
|
|
|
img(id="required-time-icon" src="/themes/wikilerni/img/time-required-medium.png")
|
|
|
|
span #{group.Group.title}
|
2020-11-16 11:59:28 +01:00
|
|
|
if(group.Questionnaires.length !==0 && group.Questionnaires[0].Illustrations!=undefined && group.Questionnaires[0].Illustrations.length!==0)
|
2020-10-20 11:01:52 +02:00
|
|
|
a(href="/img/quizs/"+group.Questionnaires[0].Illustrations[0].url target="_blank" rel="noopener")
|
|
|
|
img(src="/img/quizs/min/"+group.Questionnaires[0].Illustrations[0].url class="thumb")&attributes(imgAttributes)
|
2020-10-12 17:51:35 +02:00
|
|
|
div(id="content-title-corner")
|
|
|
|
div(id="content" class="cardboard")
|
2020-10-20 11:01:52 +02:00
|
|
|
p(id="author-date") #{txtGroups.publishedBy} #{author} #{txtGroups.publishedAt} #{publishedAtTxt}. #{txtGroups.lastUpdated} #{updatedAtTxt}.
|
2020-10-20 12:11:19 +02:00
|
|
|
div#introduction
|
2020-10-20 11:01:52 +02:00
|
|
|
if(group.Group.introduction)
|
|
|
|
div !{group.Group.introduction}
|
2020-10-12 17:51:35 +02:00
|
|
|
noscript
|
|
|
|
div
|
|
|
|
strong #{configTpl.noJSNotification}
|
2022-03-01 17:40:41 +01:00
|
|
|
form(id="quiz" method="POST" data-title=group.Group.title)
|
2020-10-20 11:01:52 +02:00
|
|
|
h2 #{group.Group.title}
|
2020-10-12 17:51:35 +02:00
|
|
|
div#response
|
2022-03-01 17:40:41 +01:00
|
|
|
div(id="propose2Save" class="needJS")
|
|
|
|
span(class="input_wrapper")
|
|
|
|
input(class="button cardboard" id="want2Save" type="button" value=txtQuestionnaire.btnProposeSave)
|
2020-10-12 17:51:35 +02:00
|
|
|
for questionnaire in group.Questionnaires
|
|
|
|
for question in questionnaire.Questions
|
|
|
|
p(id="question_"+question.Question.id) #{question.Question.text}
|
|
|
|
if(question.Question.explanation)
|
2020-11-09 18:22:29 +01:00
|
|
|
blockquote(class="help" id="help_"+question.Question.id cite=config.siteUrl+"/"+configQuestionnaires.dirWebQuestionnaires+"/"+questionnaire.Questionnaire.slug+".html")
|
|
|
|
span #{txtexplanationBeforeTxt} #{question.Question.explanation+" "}
|
|
|
|
a(href=config.siteUrl+"/"+configQuestionnaires.dirWebQuestionnaires+"/"+questionnaire.Questionnaire.slug+".html") #{configTpl.answersExplanationsLinkText}
|
2020-10-12 17:51:35 +02:00
|
|
|
ul(class="checkbox_li")
|
|
|
|
for response in question.Choices
|
|
|
|
li(class="checkbox_li")
|
|
|
|
label(class="check" for="response_"+response.id)
|
|
|
|
input(type="checkbox" name="response_"+response.id id="response_"+response.id)
|
|
|
|
div(class="checkbox_override")
|
|
|
|
span(class="wrongResponse")
|
|
|
|
img(src="/themes/wikilerni/img/wrong-min.png" title=txtGroups.wrongAnswerTxt)
|
|
|
|
span(class="rightResponse")
|
|
|
|
img(src="/themes/wikilerni/img/correct-min.png" title=txtGroups.correctAnswerTxt)
|
|
|
|
em #{response.text}
|
|
|
|
input(type="hidden" name="isCorrect_response_"+response.id id="isCorrect_response_"+response.id value=""+response.isCorrect)
|
|
|
|
input(type="hidden" name="question_id_response_"+response.id id="question_id_response_"+response.id value=question.Question.id)
|
2022-03-01 17:40:41 +01:00
|
|
|
input(name="questionnaireId" id="questionnaireId" value="0" type="hidden")
|
2020-10-20 11:01:52 +02:00
|
|
|
input(name="groupId" id="groupId" value=group.Group.id type="hidden")
|
2020-10-12 17:51:35 +02:00
|
|
|
p
|
|
|
|
span(class="input_wrapper")
|
2020-10-22 17:47:05 +02:00
|
|
|
input(id="checkResponses" type="submit" value=txtGroups.btnSendResponse class="cardboard needJS" title=txtGroups.btnSendResponse)
|
2020-12-07 12:55:24 +01:00
|
|
|
div#licence
|
|
|
|
p !{configTpl.licenceTxt}
|
2020-11-04 10:02:04 +01:00
|
|
|
div#zerozozio
|
|
|
|
a(href="mailto:?to=&subject="+group.Group.title+"&body="+txtQuestionnaire.btnShareQuizMailBody+linkCanonical rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"e-mail* ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/email.png" alt=txtQuestionnaire.btnShareQuizTxt+"mail")
|
|
|
|
a(href="http://sharetodiaspora.github.io/?url="+linkCanonical+"&title="+group.Group.title rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"diaspora* ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/diaspora.png" alt=txtQuestionnaire.btnShareQuizTxt+"diaspora*")
|
|
|
|
a(href="https://www.facebook.com/sharer.php?u="+linkCanonical rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"facebook ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/facebook.png" alt=txtQuestionnaire.btnShareQuizTxt+"facebook")
|
|
|
|
a(href="https://www.linkedin.com/shareArticle?mini=true&url="+linkCanonical+";title="+group.Group.title rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"LinkedIn ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/linkedin.png" alt=txtQuestionnaire.btnShareQuizTxt+"LinkedIn")
|
|
|
|
a(href="https://twitter.com/intent/tweet?url="+linkCanonical+"&text="+group.Group.title+" via @"+configTpl.twitterAccount rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"twitter ("+txtGeneral.alertNewWindow+")" target="_blank")
|
2020-11-16 12:35:40 +01:00
|
|
|
img(src="/themes/wikilerni/img/twitter.png" alt=txtQuestionnaire.btnShareQuizTxt+"twitter")
|
|
|
|
div#explanations(class="engraved framed")
|
2020-11-16 12:54:48 +01:00
|
|
|
h3#explanationsTitle #{configTpl.explanationTitle}
|
|
|
|
p.info !{txtGroups.commonIntroTxt}
|
2020-11-16 12:35:40 +01:00
|
|
|
div#explanationsContent
|
2020-11-16 12:54:48 +01:00
|
|
|
if(group.Questionnaires.length !==0)
|
|
|
|
div#links
|
2020-12-07 12:55:24 +01:00
|
|
|
a(href="/"+configQuestionnaires.dirWebQuestionnaires+"/"+group.Questionnaires[0].Questionnaire.slug+".html" class="button cardboard" title=group.Questionnaires[0].Questionnaire.title) !{"← "+txtGroups.linkFirstElementGroup}
|