Skip to content

Commit

Permalink
Merge branch 'master' into search-panel-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Feb 16, 2022
2 parents 18a8496 + d59ff00 commit 9bef009
Show file tree
Hide file tree
Showing 99 changed files with 2,825 additions and 1,530 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction;
import com.evolveum.midpoint.web.page.admin.users.component.ExecuteChangeOptionsDto;

import com.evolveum.prism.xml.ns._public.types_3.PolyStringType;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.Component;
Expand Down Expand Up @@ -142,12 +144,14 @@ protected List<ObjectReferenceType> getNewObjectReferencesList(CompiledObjectCol
}

private CompositedIcon createCompositedIcon(CompiledObjectCollectionView collectionView) {
DisplayType additionalButtonDisplayType = GuiDisplayTypeUtil.getNewObjectDisplayTypeFromCollectionView(collectionView, getPageBase());
DisplayType display = GuiDisplayTypeUtil.getNewObjectDisplayTypeFromCollectionView(collectionView, getPageBase());
CompositedIconBuilder builder = new CompositedIconBuilder();

builder.setBasicIcon(WebComponentUtil.getIconCssClass(additionalButtonDisplayType), IconCssStyle.IN_ROW_STYLE)
.appendColorHtmlValue(WebComponentUtil.getIconColor(additionalButtonDisplayType))
.setTitle(WebComponentUtil.getTranslatedPolyString(additionalButtonDisplayType.getTooltip()));
PolyStringType tooltip = display != null ? display.getTooltip() : null;

builder.setBasicIcon(WebComponentUtil.getIconCssClass(display), IconCssStyle.IN_ROW_STYLE)
.appendColorHtmlValue(WebComponentUtil.getIconColor(display))
.setTitle(WebComponentUtil.getTranslatedPolyString(tooltip));
// .appendLayerIcon(WebComponentUtil.createIconType(GuiStyleConstants.CLASS_PLUS_CIRCLE, "green"), IconCssStyle.BOTTOM_RIGHT_STYLE);

return builder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColu
return getViewColumnsTransformed(customColumns, true);
}

protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColumnType> customColumns, boolean shoudlCheckForNameColumn){
protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColumnType> customColumns, boolean shouldCheckForNameColumn){
List<IColumn<PO, String>> columns = new ArrayList<>();
if (customColumns == null || customColumns.isEmpty()) {
return columns;
Expand All @@ -516,7 +516,7 @@ protected List<IColumn<PO, String>> getViewColumnsTransformed(List<GuiObjectColu

if (WebComponentUtil.getElementVisibility(customColumn.getVisibility())) {
IModel<String> columnDisplayModel = createColumnDisplayModel(customColumn);
if (customColumns.indexOf(customColumn) == 0 && shoudlCheckForNameColumn) {
if (customColumns.indexOf(customColumn) == 0 && shouldCheckForNameColumn) {
column = createNameColumn(columnDisplayModel, customColumn, columnPath, expression);
} else {
column = createCustomExportableColumn(columnDisplayModel, customColumn, columnPath, expression);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ protected LookupTableType getPredefinedValues(PrismProperty<T> item, WrapperCont
String name = appender.getName();
row.setKey(name);
row.setValue(name);
row.setLabel(new PolyStringType(name));
if (name != null) {
row.setLabel(new PolyStringType(name));
}
list.add(row);
}
return lookupTable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<!--
~ Copyright (c) 2010-2022 Evolveum
~ Copyright (c) 2022 Evolveum and contributors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2018 Evolveum
~ Copyright (c) 2022 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
/*
* Copyright (c) 2010-2022 Evolveum
* Copyright (c) 2022 Evolveum and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.admin.messagetemplate;

import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

Expand All @@ -40,6 +32,28 @@ public TemplateContentDetailsPanel(String id, IModel<PrismContainerValueWrapper<

@Override
protected DisplayNamePanel<LocalizedMessageTemplateContentType> createDisplayNamePanel(String displayNamePanelId) {
return new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue()));
// so far no display name panel needed
DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {

@Override
protected IModel<String> createHeaderModel() {
return createStringResource("LocalizedMessageTemplateContentType.language");
}

@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getLanguage();
}

@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};


return d;
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2013 Evolveum
~ Copyright (c) 2022 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:extend>
<div class="row">
<div class="col-md-12">
<div wicket:id="container" />
</div>
</div>
<body>
<wicket:extend>
<div class="row">
<div class="col-md-12">
<div wicket:id="container"/>
</div>
</div>
</wicket:extend>
</body>
</body>
</html>

0 comments on commit 9bef009

Please sign in to comment.