Skip to content

Commit

Permalink
small improvements around process preview panel
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Feb 24, 2023
1 parent d6cfcf1 commit 61b491e
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 45 deletions.
18 changes: 10 additions & 8 deletions gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1087,23 +1087,25 @@ span.tree-content > table tr td:first-child {
margin: 10px;

.box-label {
border-bottom: 1px solid;
padding-top: 3px;
padding-bottom: 3px;
font-weight: bold;
display: flex;
align-items: baseline;
gap: .5rem;
padding: .5rem;

.process-label {
border-bottom: 1px solid;
font-weight: bold;

.process-label {
flex-grow: 1;
}

.process-outcome {
float: right;
}

}
}

.box-content {
padding: 15px;
padding: 1.25rem;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,38 @@
<div wicket:id="stages">
<tr wicket:id="arrow">
<td></td>
<td style="text-align:center"><i class="fa fa-long-arrow-down fa-lg" style="margin: 12px"></i></td>
<td style="text-align:center"><i class="fa fa-long-arrow-down fa-lg" style="margin: 12px"/></td>
<td></td>
</tr>
<tr>
<td>
<i wicket:id="currentStageMarker" style="margin-right: 20px" class="fa fa-hand-o-right fa-2x text-danger"></i>
<i wicket:id="currentStageMarker" style="margin-right: 20px" class="fa fa-hand-o-right fa-2x text-danger"/>
</td>
<!-- TODO: width? -->
<!-- TODO: labels: approval stage, approver, performer -->
<td style="text-align:center">
<div class="process-box">
<div class="box-label">
<span class="process-label" wicket:id="stageName"></span>
<span class="process-outcome" wicket:id="stageOutcome"></span>
<span class="process-label" wicket:id="stageName"/>
<i class="process-outcome" wicket:id="stageOutcome"/>
</div>
<div class="box-content">
<div wicket:id="approvers">
<div class="process-box">
<div class="box-label">
<span class="process-label" wicket:id="approverName"></span>
<span class="process-outcome" wicket:id="outcome"></span>
<span class="process-label" wicket:id="approverName"/>
<i class="process-outcome" wicket:id="outcome"/>
</div>

<!-- TODO: enclosure? -->
<div class="box-content" wicket:id="approvalBoxContent">
<div wicket:id="performerName"></div>
<div wicket:id="attorneyName"></div>
<div wicket:id="performerName"/>
<div wicket:id="attorneyName"/>
</div>
</div>
<span wicket:id="junction" style="font-size:120%; margin: 10px"></span>
<span wicket:id="junction" style="font-size:120%; margin: 10px"/>
</div>
<span wicket:id="automatedOutcome"></span>
<span wicket:id="automatedOutcome"/>
</div>
</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.evolveum.midpoint.web.component.wf;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.gui.api.component.IconComponent;
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.schema.util.cases.ApprovalContextUtil;
import com.evolveum.midpoint.web.component.data.column.ImagePanel;
Expand Down Expand Up @@ -109,9 +110,7 @@ protected void populateItem(ListItem<ApproverEngagementDto> approversListItem) {
? ApprovalOutcomeIcon.FUTURE : ApprovalOutcomeIcon.CANCELLED;
}
}
ImagePanel outcomePanel = new ImagePanel(ID_OUTCOME,
Model.of(outcomeIcon.getIcon()),
Model.of(getString(outcomeIcon.getTitle())));
IconComponent outcomePanel = new IconComponent(ID_OUTCOME, Model.of(outcomeIcon.getIcon()), createStringResource(outcomeIcon.getTitle()));
outcomePanel.add(new VisibleBehaviour(() -> outcomeIcon != ApprovalOutcomeIcon.EMPTY));
approversListItem.add(outcomePanel);

Expand Down Expand Up @@ -167,9 +166,8 @@ protected void populateItem(ListItem<ApproverEngagementDto> approversListItem) {
ApprovalOutcomeIcon.FUTURE : ApprovalOutcomeIcon.CANCELLED;
}
}
ImagePanel stageOutcomePanel = new ImagePanel(ID_STAGE_OUTCOME,
Model.of(stageOutcomeIcon.getIcon()),
Model.of(getString(stageOutcomeIcon.getTitle())));
IconComponent stageOutcomePanel = new IconComponent(ID_STAGE_OUTCOME,
Model.of(stageOutcomeIcon.getIcon()), createStringResource(stageOutcomeIcon.getTitle()));
stageOutcomePanel.add(new VisibleBehaviour(() -> stageOutcomeIcon != ApprovalOutcomeIcon.EMPTY));
stagesListItem.add(stageOutcomePanel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div wicket:id="processes">
<div class="box">
<div class="box-header">
<h3 class="box-title" wicket:id="name"></h3>
<div class="card">
<div class="card-header">
<h3 class="card-title" wicket:id="name"/>
</div>
<div class="box-body">
<div wicket:id="preview"></div>
<div wicket:id="triggers"></div>
<div class="card-body">
<div wicket:id="preview"/>
<div wicket:id="triggers"/>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,34 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div class="box" wicket:id="nextStagesContainer">
<div class="box-header">
<h3 class="box-title"><wicket:message key="ItemApprovalPanel.nextStages"/></h3> <i wicket:id="nextStagesHelp" wicket:message="title:TaskWfChildPanel.nextStagesHelp"/>
<div class="card" wicket:id="nextStagesContainer">
<div class="card-header">
<h3 class="card-title"><wicket:message key="ItemApprovalPanel.nextStages"/></h3>
<i class="ml-2" wicket:id="nextStagesHelp" wicket:message="title:TaskWfChildPanel.nextStagesHelp"/>
</div>
<div class="box-body">
<div class="card-body">
<div wicket:id="nextStages" />
</div>
</div>
<div class="box" wicket:id="wholeProcessContainer">
<div class="box-header">
<h3 class="box-title"><wicket:message key="ItemApprovalPanel.wholeProcess"/></h3> <i wicket:id="wholeProcessHelp" wicket:message="title:TaskWfChildPanel.wholeProcessHelp"/>
<div class="card" wicket:id="wholeProcessContainer">
<div class="card-header">
<h3 class="card-title"><wicket:message key="ItemApprovalPanel.wholeProcess"/></h3>
<i class="ml-2" wicket:id="wholeProcessHelp" wicket:message="title:TaskWfChildPanel.wholeProcessHelp"/>
</div>
<div class="box-body">
<div class="card-body">
<div wicket:id="wholeProcess" />
<div wicket:id="triggers" style="margin-right:5px;margin-left: 5px;"/>
</div>
</div>
<div style="padding-bottom:15px"> <!-- TODO use some css here -->
<span wicket:id="showNextStagesContainer">
<a href="#" wicket:id="showNextStages"><wicket:message key="taskWfChildPanel.showNextStages"/></a> <i wicket:id="showNextStagesHelp" wicket:message="title:TaskWfChildPanel.showNextStagesHelp"/>&nbsp;&nbsp;&nbsp;
</span>
<a href="#" wicket:id="showNextStages"><wicket:message key="taskWfChildPanel.showNextStages"/></a>
<i wicket:id="showNextStagesHelp" wicket:message="title:TaskWfChildPanel.showNextStagesHelp"/>&nbsp;&nbsp;&nbsp;
</span>
<span wicket:id="showWholeProcessContainer">
<a href="#" wicket:id="showWholeProcess"><wicket:message key="taskWfChildPanel.showWholeProcess"/></a> <i wicket:id="showWholeProcessHelp" wicket:message="title:TaskWfChildPanel.showWholeProcessHelp"/>
</span>
<a href="#" wicket:id="showWholeProcess"><wicket:message key="taskWfChildPanel.showWholeProcess"/></a>
<i wicket:id="showWholeProcessHelp" wicket:message="title:TaskWfChildPanel.showWholeProcessHelp"/>
</span>
</div>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>

<div class="box">
<div class="box-body no-padding">
<div class="card">
<div class="card-body p-0">
<a class="btn btn-primary btn-sm" wicket:id="addNewStage" style="margin-left: 10px; margin-top: 10px; margin-bottom: 10px" />
<a class="btn btn-sm" wicket:id="moveStageLeft" style="margin-top: 10px; margin-bottom: 10px" />
<a class="btn btn-sm" wicket:id="moveStageRight" style="margin-top: 10px; margin-bottom: 10px" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void onConfigure(Component component) {

String cssClass = getCssClass();
if (cssClass != null) {
component.add(AttributeModifier.replace("class", cssClass));
component.add(AttributeModifier.append("class", cssClass));
}
}

Expand Down

0 comments on commit 61b491e

Please sign in to comment.