Remove unnecessary id attribute.
[civicrm-core.git] / templates / CRM / common / WizardHeader.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
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 |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
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">
8a76e0df 13 <ul class="wizard-bar{if !empty($wizard.style.barClass)}-{$wizard.style.barClass}{/if}">
6a488035
TO
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}
18 {else}
19 {assign var="title" value=$wizard.steps[step].title}
20 {/if}
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.*}
8a76e0df 22 {if empty($wizard.steps[step].collapsed) && !empty($wizard.steps[step].name) && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
6a488035
TO
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"}
29 {/if}
29c42168 30 {assign var="stepPrefix" value=$wizard.style.stepPrefixPast|cat:$wizard.steps[step].stepNumber|cat:". "}
6a488035
TO
31 {elseif $wizard.currentStepNumber == $wizard.steps[step].stepNumber}
32 {if $wizard.steps[step].step}
33 {assign var="stepClass" value="current-step"}
34 {else}
35 {assign var="stepClass" value="current-sub-step"}
36 {/if}
29c42168 37 {assign var="stepPrefix" value=$wizard.style.stepPrefixCurrent|cat:$wizard.steps[step].stepNumber|cat:". "}
6a488035
TO
38 {else}
39 {if $wizard.steps[step].step}
40 {assign var="stepClass" value="future-step"}
41 {else}
42 {assign var="stepClass" value="future-sub-step"}
43 {/if}
29c42168 44 {assign var="stepPrefix" value=$wizard.style.stepPrefixFuture|cat:$wizard.steps[step].stepNumber|cat:". "}
6a488035
TO
45 {/if}
46 {if !$wizard.steps[step].valid}
47 {assign var="stepClass" value="$stepClass not-valid"}
48 {/if}
31037a42 49 {* wizard.steps[step].link value is passed for wizards/steps which allow clickable navigation *}
6a488035 50 <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>
31037a42 51 {/if}
6a488035
TO
52 {/section}
53 </ul>
54</div>
8a76e0df 55{if !empty($wizard.style.showTitle)}
6a488035
TO
56 <h2>{$wizard.currentStepTitle} {ts 1=$wizard.currentStepNumber 2=$wizard.stepCount}(step %1 of %2){/ts}</h2>
57{/if}
58{/if}
59