html review: round 1
This commit is contained in:
parent
2730ca10c8
commit
4d71ac7166
@ -36,9 +36,9 @@
|
||||
</aside>
|
||||
<% end %>
|
||||
|
||||
<footer role="contentinfo">
|
||||
<footer>
|
||||
<div><%= yield(:footer_title) %></div>
|
||||
<div><%= image_tag("perficientdigital.png", alt:"Perficient Digital") %></div>
|
||||
<%= image_tag("perficientdigital.png", alt:"Perficient Digital") %>
|
||||
</footer>
|
||||
|
||||
<!--[if ! lte IE 8]><!-->
|
||||
|
@ -3,6 +3,9 @@
|
||||
<label for="answer_answer">Enter answer here</label>
|
||||
<%= text_area_tag 'answer[answer]', answer_string, {rows: 10, data: { last: answer_string } } %>
|
||||
|
||||
<div class="<%= params[:action] == 'summary' ? 'hidden' : '' %>">Characters remaining: <span></span></div>
|
||||
<div class="<%= params[:action] == 'summary' ? 'hidden' : '' %>">
|
||||
Max 1000 characters.
|
||||
(provide warning when reaching the limit)
|
||||
</div>
|
||||
|
||||
<%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>
|
||||
|
@ -7,8 +7,13 @@
|
||||
|
||||
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
|
||||
|
||||
<div><%= @question.question %></div>
|
||||
<%= image_tag @question.attachment if @question.attachment.present? %>
|
||||
<h1><%= @question.question %></h1>
|
||||
|
||||
<% if @question.attachment.present? %>
|
||||
<figure>
|
||||
<%= image_tag @question.attachment%>
|
||||
</figure>
|
||||
<% end %>
|
||||
|
||||
<%= render partial: @question.input_type, locals: {question: @question, form: form, answer: @answer } %>
|
||||
|
||||
|
@ -19,18 +19,22 @@
|
||||
<%= form_for(:answer, remote: true, url: post_answer_path(answer_id: question.answer_id), html:{class: ""}) do |form| %>
|
||||
<h2><%= question.question %></h2>
|
||||
|
||||
<div>
|
||||
<%= link_to('Edit', question_path(question.question_id)) %>
|
||||
<button>Save</button>
|
||||
<button>Cancel</button>
|
||||
</div>
|
||||
|
||||
<%= image_tag question.attachment if question.attachment.present? %>
|
||||
<% if question.attachment.present? %>
|
||||
<figure>
|
||||
<%= image_tag question.attachment %>
|
||||
</figure>
|
||||
<% end %>
|
||||
|
||||
<fieldset disabled>
|
||||
<%= render partial: question.input_type, locals: {question: question, form: form, answer: question.answer} %>
|
||||
</fieldset>
|
||||
|
||||
<ul class="summary-question-controls">
|
||||
<li><%= link_to('Edit', question_path(question.question_id)) %></li>
|
||||
<li><button>Save</button></li>
|
||||
<li><button>Cancel</button></li>
|
||||
</ul>
|
||||
|
||||
<%= hidden_field_tag 'answer[question_id]', question.question_id %>
|
||||
<%= hidden_field_tag 'answer[answer_id]', question.answer_id %>
|
||||
<%= hidden_field_tag 'submit', true %>
|
||||
|
@ -7,7 +7,7 @@ class QuestionAttachmentsTest < ActionDispatch::IntegrationTest
|
||||
|
||||
get question_path questions(:fed6)
|
||||
assert_response :success
|
||||
assert_select 'div', questions(:fed6).question
|
||||
assert_select 'h1', questions(:fed6).question
|
||||
assert_select "img[src=\"#{questions(:fed6).attachment}\"]"
|
||||
end
|
||||
|
||||
|
@ -7,7 +7,7 @@ class QuestionFlowTest < ActionDispatch::IntegrationTest
|
||||
|
||||
get question_path
|
||||
assert_response :success
|
||||
assert_select 'div', questions(:fed1).question
|
||||
assert_select 'h1', questions(:fed1).question
|
||||
end
|
||||
|
||||
test "should load the summary" do
|
||||
@ -24,7 +24,7 @@ class QuestionFlowTest < ActionDispatch::IntegrationTest
|
||||
|
||||
get question_path(question.id)
|
||||
assert_response :success
|
||||
assert_select 'div', question.question
|
||||
assert_select 'h1', question.question
|
||||
end
|
||||
|
||||
test 'juan should be on summary with 80% complete' do
|
||||
|
@ -8,7 +8,7 @@ class QuestionLiveCoderTest < ActionDispatch::IntegrationTest
|
||||
|
||||
get question_path(question.id)
|
||||
assert_response :success
|
||||
assert_select 'div', question.question
|
||||
assert_select 'h1', question.question
|
||||
end
|
||||
|
||||
test "should load seed data into live coder" do
|
||||
|
Loading…
Reference in New Issue
Block a user