1 %# Generates a workflow component
6 %# Initializes shared variables.
12 my $complete = "Complete!";
15 %# Clears shared variables from previous uses.
20 $complete = "Complete!";
23 %# Adds a new step to the workflow
29 push @contents, $m->content;
34 %# Shown when all steps are completed but one or more is pending.
37 $pending = $m->content;
41 %# Shown when all steps are completed and none are pending.
44 $complete = $m->content;
49 %# loads css, but only once (even if used multiple time in one request)
52 <style media="screen">
56 list-style-type: none;
73 ol.workflow-prog>li>div.workflow-title{
74 display: inline-block;
78 text-overflow: ellipsis;
81 ol.workflow-prog>li::after{
85 content: counter(step);
86 counter-increment: step;
94 margin: 0 auto 0 auto;
100 ol.workflow-prog>li.workflow-complete::after{
101 border-color: #5fba7d;
106 @keyframes pend_blink {
114 ol.workflow-prog>li.workflow-pending::after{
115 animation: pend_blink 2s linear infinite;
118 ol.workflow-prog>li.workflow-skipped::after{
119 border-color: #eeb700;
124 ol.workflow-prog>li.workflow-focus::after{
125 border-color: #5fba7d;
131 ol.workflow-prog>li::before {
139 background-color: #bbb;
142 ol.workflow-prog>li:last-of-type::before {
146 ol.workflow-prog>li.workflow-complete::before{
153 list-style-type: none;
159 ol.workflow-content>li{
165 ol.workflow-content>li.workflow-focus{
169 div.workflow-pending-message{
172 div.workflow-complete-message{
175 div.workflow-message-show{
182 <& '/util/import_javascript.mas', classes => ['workflow'] &>
184 <div id="<% $id %>" class="workflow">
185 <ol class="workflow-prog">
186 % foreach my $title (@titles) {
187 <li><div class="workflow-title"><% $title %></div></li>
190 <div class="panel panel-default">
191 <div class="panel-body">
192 <ol class="workflow-content">
193 % foreach my $content (@contents) {
194 <li><% $content %></li>
197 <div class="workflow-pending-message"><% $pending || $complete %></div>
198 <div class="workflow-complete-message"><% $complete %></div>
202 <script type="text/javascript">
203 Workflow.init("#<% $id %>");