All basic question types
This commit is contained in:
parent
3e1e5618ca
commit
4fe218166f
51 changed files with 760 additions and 92 deletions
12
app/views/questions/_image_form.html.erb
Normal file
12
app/views/questions/_image_form.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div id="<%= "question_answer_#{question.id}_preview" %>">
|
||||
<% if question.answer.present? %>
|
||||
<%= image_tag question.answer.image %>
|
||||
<% end %>
|
||||
</div>
|
||||
<input id="<%= "question_answer_#{question.id}" %>"
|
||||
type="file"
|
||||
accept=".jpg,.jpeg,.png,.webp,image/jpg,image/jpeg,image/png,image/webp"
|
||||
autocomplete="off"
|
||||
data-behaviour="question_image_input"
|
||||
data-submit-url="<%= answer_question_url(question.id) %>"
|
||||
/>
|
3
app/views/questions/_politicians_form.html.erb
Normal file
3
app/views/questions/_politicians_form.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div>
|
||||
This one's going to be hard...
|
||||
</div>
|
7
app/views/questions/_simple_form.html.erb
Normal file
7
app/views/questions/_simple_form.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<input id="<%= "question_answer_#{question.id}" %>"
|
||||
type="text"
|
||||
value="<%= question.answer&.data || '' %>"
|
||||
autocomplete="off"
|
||||
data-behaviour="question_simple_input"
|
||||
data-submit-url="<%= answer_question_url(question.id) %>"
|
||||
/>
|
1
app/views/questions/_simple_show.html.erb
Normal file
1
app/views/questions/_simple_show.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= question.text %>
|
1
app/views/questions/_video_show.html.erb
Normal file
1
app/views/questions/_video_show.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<video src="<%= question.public_asset_path %>" controls preload="metadata"></video>
|
Loading…
Add table
Add a link
Reference in a new issue