3d-interface/controllers/feedback/views/index.jade

81 lines
3.3 KiB
Plaintext
Raw Normal View History

2015-07-29 11:04:38 +02:00
extends ../../../views/base.jade
2015-09-04 16:31:21 +02:00
mixin message
span(style={'margin-bottom':'10px', 'margin-right': '10px'})
block
br
2015-08-01 11:44:49 +02:00
mixin question(id, qu, info)
label(for="#{id}", style={'margin-right':'10px'}) #{qu}
if (info !== undefined)
span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}')
2015-07-29 11:04:38 +02:00
input.form-control(name="answer#{id}", type="text", placeholder="Answer")
2015-08-01 11:44:49 +02:00
mixin rate(id, qu, info)
2015-09-04 16:31:21 +02:00
div
label(for="anwser#{id}", style={'margin-right':'10px'}) #{qu}
if (info !== undefined)
span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}')
//-input.rating(id="answer#{id}", name="answer#{id}", type="number", min='0', max='5', step='1', default='3')
br
input(type='radio', name='answerItem#{id}', value='1', style={'margin-right':'10px'})
+message Very easy
input(type='radio', name='answerItem#{id}', value='2', style={'margin-right':'10px'})
+message Easy
input(type='radio', name='answerItem#{id}', value='3', style={'margin-right':'10px'})
+message Medium
input(type='radio', name='answerItem#{id}', value='4', style={'margin-right':'10px'})
+message Hard
input(type='radio', name='answerItem#{id}', value='5', style={'margin-right':'10px'})
+message Very hard
div(style={'margin-bottom':'10px'})
2015-08-01 11:44:49 +02:00
2015-07-29 11:04:38 +02:00
block extrahead
link(rel="stylesheet", href="/static/css/feedback.css")
2015-08-01 11:44:49 +02:00
link(rel="stylesheet", href="/static/css/star-rating.min.css")
2015-09-04 16:31:21 +02:00
//-block extrajs
2015-08-01 11:44:49 +02:00
script(src="/static/js/star-rating.min.js")
script $(function () { $('[data-toggle="tooltip"]').tooltip() })
script.
var liste = [1,2];
for (var i = 0; i < liste.length; i++) {
$("#answer" + liste[i]).rating({showClear: false, showCaption: false, size:'xs'});
$("#answer" + liste[i]).rating('update', 3);
}
2015-07-29 11:04:38 +02:00
block content
2015-09-04 16:50:29 +02:00
script.
function checkForm() {
var allAnswered = true;
$("input:radio").each(function(){
var name = $(this).attr("name");
if($("input:radio[name="+name+"]:checked").length == 0)
{
allAnswered = false;
}
});
if (!allAnswered) {
alert('You did not answer all the questions');
return false;
}
}
form.form-signin(method="POST", action='/feedback-target', onsubmit='return checkForm()')
2015-07-29 11:04:38 +02:00
h2 Please give us your feedback
2015-09-04 16:31:21 +02:00
+rate(1, "What was the difficulty level without recommendation ?")
+rate(2, "What was the difficulty level with recommendation ?")
2015-08-01 11:44:49 +02:00
+question(3, "Did the recommendations help you to find the coins ?")
+question(4, "Did the recommendations help you to browse the scene ?")
+question(5, "Do you think recommendations can be helpful ?")
+question(6, "Which recommendation style do you prefer and why ?")
2015-08-28 11:13:27 +02:00
+question(7, "Did you enjoy this ?")
2015-07-29 11:04:38 +02:00
//-label(for='input1') Did you have trouble to find the coins during the first step ?
//-input#input1.form-control(name="input1", type="text", placeholder='Id')
button.btn.btn-lg.btn-primary.btn-block(type='submit') Submit