From 5b376e106c9b3b6767a19a932a18f1b33f62e169 Mon Sep 17 00:00:00 2001 From: Harsha Date: Mon, 30 Nov 2015 23:29:07 -0500 Subject: [PATCH] Fixes previous step issue in one-step-challenges --- server/views/coursewares/showStep.jade | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/server/views/coursewares/showStep.jade b/server/views/coursewares/showStep.jade index ccd761844b..db2e80d6bf 100644 --- a/server/views/coursewares/showStep.jade +++ b/server/views/coursewares/showStep.jade @@ -12,17 +12,14 @@ block content if step[3] a.btn.btn-block.btn-primary.challenge-step-btn-action(id='#{index}' href='#{step[3]}' target='_blank') Open link in new tab .button-spacer - if index + 1 === description.length - .btn.btn-warning.col-sm-5.col-xs-12.challenge-step-btn-prev(id='#{index - 1}') Go to my previous step - .challenge-step-counter.large-p.col-sm-2.col.xs-12.text-center (#{index + 1} / #{description.length}) - .btn.btn-primary.col-sm-5.col-xs-12.challenge-step-btn-finish(id='last' class=step[3] ? 'disabled' : '') Finish challenge - else if index !== 0 - .btn.btn-warning.col-sm-5.col-xs-12.challenge-step-btn-prev(id='#{index - 1}') Go to my previous step - .challenge-step-counter.large-p.col-sm-2.col.xs-12.text-center (#{index + 1} / #{description.length}) - .btn.btn-primary.col-sm-5.col-xs-12.challenge-step-btn-next(id='#{index}' class=step[3] ? 'disabled' : '') Go to my next step - else + if index === 0 .col-sm-5.hidden-xs   - .challenge-step-counter.large-p.col-sm-2.col-xs-6.text-center (#{index + 1} / #{description.length}) + else + .btn.btn-warning.col-sm-5.col-xs-12.challenge-step-btn-prev(id='#{index - 1}') Go to my previous step + .challenge-step-counter.large-p.col-sm-2.col.xs-12.text-center (#{index + 1} / #{description.length}) + if index + 1 === description.length + .btn.btn-primary.col-sm-5.col-xs-12.challenge-step-btn-finish(id='last' class=step[3] ? 'disabled' : '') Finish challenge + else .btn.btn-primary.col-sm-5.col-xs-6.challenge-step-btn-next(id='#{index}' class=step[3] ? 'disabled' : '') Go to my next step .clearfix #challenge-step-modal.modal(tabindex='-1')