cleaned up progress bar display logic #47
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
<%
|
||||
content_for :title, "Skills Assessment"
|
||||
content_for :category, @question.category
|
||||
content_for :summary, true if @status.on_summary
|
||||
content_for :footer_title, "Skills Assessment"
|
||||
content_for :progress, @status.progress.to_s
|
||||
%>
|
||||
|
||||
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
|
||||
@ -37,12 +37,3 @@
|
||||
<% end %>
|
||||
</main>
|
||||
<% end %>
|
||||
|
||||
<% unless @status.on_summary %>
|
||||
<div class="progress ignore-margin">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="<%= @status.progress %>"
|
||||
aria-valuemin="0" aria-valuemax="100" style="width: <%= @status.progress %>%">
|
||||
<span><%= @status.progress %>%</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -1,3 +1,9 @@
|
||||
<%
|
||||
content_for :title, "Skills Assessment"
|
||||
content_for :footer_title, "Skills Assessment"
|
||||
content_for :progress, @status.progress.to_s
|
||||
%>
|
||||
|
||||
<main class="summary_tpl">
|
||||
<h2 class="prft-heading">Almost done!</h2>
|
||||
<p>
|
||||
@ -42,6 +48,4 @@
|
||||
<% else %>
|
||||
<div class="error">Sorry, you must answer all questions before you can submit.</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</main>
|
||||
|
Reference in New Issue
Block a user