Skip to content

Commit

Permalink
MID-8298 request access: improved column icons on shopping cart summary
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Feb 20, 2024
1 parent a33a12f commit 67f2515
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gui/admin-gui/src/frontend/scss/_admin-lte-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
margin-right: -0.625rem;
}

.role-catalog-tiles-table div.img-circle {
background-color: #f5f5f5;
}

.dropdown-toggle:after {
vertical-align: middle;
/*margin: 0 0.255em;*/
Expand Down
4 changes: 4 additions & 0 deletions gui/admin-gui/src/frontend/scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ th.countLabel{
// See com.evolveum.midpoint.web.page.admin.certification.PageCertDecisions
width: 70px;
}

td.rounded-icon-column div.img-circle {
background-color: #f5f5f5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.List;
import javax.xml.datatype.XMLGregorianCalendar;

import com.evolveum.midpoint.gui.impl.util.IconAndStylesUtil;
import com.evolveum.midpoint.gui.impl.util.RelationUtil;

import org.apache.commons.lang3.BooleanUtils;
Expand Down Expand Up @@ -418,6 +419,22 @@ protected IResource load() {
}
};
}

@Override
protected DisplayType createDisplayType(IModel<ShoppingCartItem> model) {
AssignmentType a = model.getObject().getAssignment();
ObjectReferenceType ref = a != null ? a.getTargetRef() : null;

if (ref == null || ref.getType() == null) {
return null;
}

String icon = IconAndStylesUtil.createDefaultBlackIcon(ref.getType());

return new DisplayType()
.icon(new IconType()
.cssClass(icon));
}
});
columns.add(new AbstractColumn<>(createStringResource("ShoppingCartPanel.accessName")) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ protected DisplayType createDisplayType(IModel<T> model) {
protected IModel<IResource> createPreferredImage(IModel<T> model) {
return () -> null;
}

@Override
public String getCssClass() {
return "rounded-icon-column";
}
}

0 comments on commit 67f2515

Please sign in to comment.