Skip to content

Commit

Permalink
Merge pull request #2 from nhaagen/UI_Workflow
Browse files Browse the repository at this point in the history
switch classes in template for orientation
  • Loading branch information
pgeib authored Jun 14, 2018
2 parents 86dd139 + ec4a0db commit bd3fe8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
6 changes: 6 additions & 0 deletions src/UI/Implementation/Component/Listing/Workflow/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ protected function render_linear(Component\Listing\Workflow\Linear $component, R

$tpl->setVariable("TITLE", $component->getTitle());

if($component->getOrientation() === $component::VERTICAL) {
$tpl->touchBlock('vertical');
} else {
$tpl->touchBlock('horizontal');
}

foreach ($component->getSteps() as $index=>$step) {
$tpl->setCurrentBlock("step");
$tpl->setVariable("LABEL", $step->getLabel());
Expand Down
31 changes: 17 additions & 14 deletions src/UI/templates/default/Listing/tpl.linear.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.il-workflow.linear .il-workflow-steps {
margin-top: 50px;
}

.il-workflow.linear.x-axis .il-workflow-step {
margin-bottom: 10px;
width: 20%;
Expand Down Expand Up @@ -52,7 +52,7 @@
}

.il-workflow.linear.x-axis .il-workflow-step.first .line {
}
}

.il-workflow.linear .il-workflow-steps .il-workflow-step .status {
width: 20px;
Expand All @@ -76,23 +76,23 @@
float: none;
}

.il-workflow.linear .il-workflow-steps .il-workflow-step.first .status,
.il-workflow.linear .il-workflow-steps .il-workflow-step.first .status,
.il-workflow.linear .il-workflow-steps .il-workflow-step.last .status {
border-radius: 20px;
width: 30px;
height: 30px;
}

.il-workflow.linear.x-axis .il-workflow-steps .il-workflow-step.first .status,
.il-workflow.linear.x-axis .il-workflow-steps .il-workflow-step.first .status,
.il-workflow.linear.x-axis .il-workflow-steps .il-workflow-step.last .status {
bottom: 16px;
}

.il-workflow-step.first .text,
.il-workflow-step.first .text,
.il-workflow-step.last .text {
position: relative;
bottom: 10px;
}
}

.il-workflow.linear .il-workflow-step .il-workflow-step-label,
.il-workflow.linear .il-workflow-step .il-workflow-step-description {
Expand All @@ -113,7 +113,7 @@
background-color: #6ea03c; /*brand-success*/
}

.il-workflow.linear .il-workflow-step.completed .status:before,
.il-workflow.linear .il-workflow-step.completed .status:before,
.il-workflow.linear .il-workflow-step.completed .status:after {
content: "";
background-color: #fff;
Expand All @@ -132,17 +132,17 @@
left: 3px;
}

.il-workflow.linear .il-workflow-step.first.completed .status:before,
.il-workflow.linear .il-workflow-step.first.completed .status:before,
.il-workflow.linear .il-workflow-step.last.completed .status:before {
left: 16px;
top: 6px;
}

.il-workflow.linear .il-workflow-step.first.completed .status:after,
.il-workflow.linear .il-workflow-step.first.completed .status:after,
.il-workflow.linear .il-workflow-step.last.completed .status:after {
left: 7px;
top: 5px;
}
}

.il-workflow.linear .il-workflow-step.notstarted .status {
background-color: #c3cad4; /*@brand-info 30% Deckkraft*/
Expand Down Expand Up @@ -207,7 +207,10 @@



<div class="il-workflow linear x-axis"> <!-- BEGIN horizontal -- x-axis -- END horizontal -->
<div class="il-workflow linear
<!-- BEGIN horizontal --> x-axis <!-- END horizontal -->
<!-- BEGIN vertical --> y-axis <!-- END vertical -->
">
<div class="il-workflow-header">
<h3 class="il-workflow-title">{TITLE}</h3>
</div>
Expand All @@ -230,11 +233,11 @@ <h3 class="il-workflow-title">{TITLE}</h3>
<span class="il-workflow-step-label">{LABEL}
</span>
<span class="il-workflow-step-description">{DESCRIPTION}</span>
</div>
</div>
</div>
</div>
</div>
<!-- should be used with verital line
<div class="line-y"></div>
<div class="line-y"></div>
-->
</div>

Expand Down

0 comments on commit bd3fe8c

Please sign in to comment.