Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVYPORTAL-17567 Homepage Selection leads to empty Page with misleading error log message #1066

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class CustomSubMenuItem {
private String icon;
private String label;
private Integer index;
private String name;

@JsonProperty("isExternal")
private Boolean isExternalLink;
Expand Down Expand Up @@ -62,4 +63,12 @@ public String getVersion() {
public void setVersion(String version) {
this.version = version;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.axonivy.portal.enums.PortalCustomSignature;

import ch.addon.portal.generic.menu.SubMenuItem;
import ch.addon.portal.generic.userprofile.homepage.HomepageType;
import ch.ivy.addon.portalkit.enums.MenuKind;
import ch.ivy.addon.portalkit.enums.PortalVariable;
import ch.ivy.addon.portalkit.persistence.converter.BusinessEntityConverter;
Expand Down Expand Up @@ -75,7 +76,7 @@ private static Function<CustomSubMenuItem, SubMenuItem> convertToSubmenuItem() {
SubMenuItem result = new SubMenuItem();
result.setLink(customMenu.getLink());
result.setLabel(customMenu.getLabel());
result.setName(customMenu.getLabel());
result.setName(HomepageType.CUSTOM.name());
result.setIcon(StringUtils.defaultIfBlank(customMenu.getIcon(), DEFAULT_ICON));

result.setMenuKind(Optional.ofNullable(customMenu)
Expand Down
2 changes: 2 additions & 0 deletions Showcase/portal-developer-examples/cms/cms_de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ Processes:
name: Pizza bestellen
description: 3 Aufgaben erstellen, jede Aufgabe hat CustomerName und ShipmentDate
name: Aufgaben für die Anpassung der Aufgabenliste erstellen
UserExampleGuide: Anleitung mit Benutzerbeispielen
google: GE Google
2 changes: 2 additions & 0 deletions Showcase/portal-developer-examples/cms/cms_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,5 @@ Processes:
name: Pizza Order
description: Create 3 tasks, each task has CustomerName and ShipmentDate
name: Create Tasks For Task List Customization
UserExampleGuide: User Example Guide
google: Google
2 changes: 2 additions & 0 deletions Showcase/portal-developer-examples/cms/cms_es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ Processes:
name: Pedido de pizza
description: Crear 3 tareas, cada tarea tiene CustomerName y ShipmentDate
name: Crear tareas para la personalización de la lista de tareas
UserExampleGuide: Guía de ejemplos de uso
google: SP Google
2 changes: 2 additions & 0 deletions Showcase/portal-developer-examples/cms/cms_fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ Processes:
name: Commande de pizzas
description: Créez 3 tâches, chaque tâche a le nom du client et la date d'expédition.
name: Créer des tâches pour la personnalisation de la liste de tâches
UserExampleGuide: Guide d'exemple d'utilisation
google: FR Google
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"config" : {
"output" : {
"code" : [
"import com.axonivy.portal.components.publicapi.ApplicationMultiLanguageAPI;",
"import com.axonivy.portal.components.configuration.CustomSubMenuItem;",
"import com.axonivy.portal.components.publicapi.ProcessStartAPI;",
"import org.apache.commons.lang3.StringUtils;",
Expand All @@ -48,15 +49,15 @@
"if (!StringUtils.isEmpty(userExampleGuideLink)){ ",
" CustomSubMenuItem userExampleGuide = new CustomSubMenuItem();",
" userExampleGuide.setIcon(\"si si-bulb\");",
" userExampleGuide.setLabel(\"User example guide\");",
" userExampleGuide.setLabel(ivy.cms.co(\"/Processes/UserExampleGuide\"));",
" userExampleGuide.setLink(userExampleGuideLink + \"?embedInFrame\");",
" userExampleGuide.setIndex(0);",
" in.subMenuItems.add(userExampleGuide);",
"}",
"",
"CustomSubMenuItem google = new CustomSubMenuItem();",
"google.setIcon(\"si si-information-circle\");",
"google.setLabel(\"Google\");",
"google.setLabel(ApplicationMultiLanguageAPI.getCmsValueByUserLocale(\"/Processes/google\"));",
"google.setLink(\"www.google.com\");",
"google.setIsExternalLink(true);",
"google.setIndex(1);",
Expand Down
Loading