2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {if count( $wizard.steps ) > 1}
11 {* wizard.style variable is passed by some Wizards to allow alternate styling for progress "bar". *}
12 <div id="wizard-steps">
13 <ul class="wizard-bar{if $wizard.style.barClass}-{$wizard.style.barClass}{/if}">
14 {section name=step loop=$wizard.steps}
15 {if count ( $wizard.steps ) > 5 }
16 {* truncate step titles so header isn't too wide *}
17 {assign var="title" value=$wizard.steps[step].title|crmFirstWord}
19 {assign var="title" value=$wizard.steps[step].title}
21 {* Show each wizard link unless collapsed value is true. Also excluding quest app submit steps. Should create separate WizardHeader for Quest at some point.*}
22 {if !$wizard.steps[step].collapsed && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
23 {assign var=i value=$smarty.section.step.iteration}
24 {if $wizard.currentStepNumber > $wizard.steps[step].stepNumber}
25 {if $wizard.steps[step].step}
26 {assign var="stepClass" value="past-step"}
27 {else} {* This is a sub-step *}
28 {assign var="stepClass" value="past-sub-step"}
30 {if $wizard.style.hideStepNumbers}
31 {assign var="stepPrefix" value=$wizard.style.subStepPrefixPast}
33 {assign var="stepPrefix" value=$wizard.style.stepPrefixPast|cat:$wizard.steps[step].stepNumber|cat:". "}
35 {elseif $wizard.currentStepNumber == $wizard.steps[step].stepNumber}
36 {if $wizard.steps[step].step}
37 {assign var="stepClass" value="current-step"}
39 {assign var="stepClass" value="current-sub-step"}
41 {if $wizard.style.hideStepNumbers}
42 {assign var="stepPrefix" value=$wizard.style.subStepPrefixCurrent}
44 {assign var="stepPrefix" value=$wizard.style.stepPrefixCurrent|cat:$wizard.steps[step].stepNumber|cat:". "}
47 {if $wizard.steps[step].step}
48 {assign var="stepClass" value="future-step"}
50 {assign var="stepClass" value="future-sub-step"}
52 {if $wizard.style.hideStepNumbers}
53 {assign var="stepPrefix" value=$wizard.style.subStepPrefixFuture}
55 {assign var="stepPrefix" value=$wizard.style.stepPrefixFuture|cat:$wizard.steps[step].stepNumber|cat:". "}
58 {if !$wizard.steps[step].valid}
59 {assign var="stepClass" value="$stepClass not-valid"}
61 {* wizard.steps[step].link value is passed for wizards/steps which allow clickable navigation *}
62 <li class="{$stepClass}">{$stepPrefix}{if $wizard.steps[step].link}<a href="{$wizard.steps[step].link}">{/if}{$title}{if $wizard.steps[step].link}</a>{/if}</li>
67 {if $wizard.style.showTitle}
68 <h2>{$wizard.currentStepTitle} {ts 1=$wizard.currentStepNumber 2=$wizard.stepCount}(step %1 of %2){/ts}</h2>