-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...gui/src/main/java/com/evolveum/midpoint/gui/impl/component/DetailsNavigationMainItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.evolveum.midpoint.gui.impl.component; | ||
|
||
import java.io.Serializable; | ||
|
||
public class DetailsNavigationMainItem implements Serializable { | ||
|
||
public static final String F_LABEL_KEY = "labelKey"; | ||
|
||
private String labelKey; | ||
|
||
public DetailsNavigationMainItem(String labelKey) { | ||
this.labelKey = labelKey; | ||
} | ||
|
||
public String getLabelKey() { | ||
return labelKey; | ||
} | ||
|
||
public void setLabelKey(String labelKey) { | ||
this.labelKey = labelKey; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/DetailsNavigationPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
~ Copyright (c) 2021 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<aside class="control-sidebar control-sidebar-dark"> | ||
<section class="sidebar" style="height: auto;"> | ||
<ul class="sidebar-menu" data-widget="tree"> | ||
<!-- <wicket:container wicket:id="mainMenu">--> | ||
<!-- <li class="header" wicket:id="header">--> | ||
<!-- <span wicket:id="name"></span>--> | ||
<!-- <i class="fa fa-chevron-down pull-right"></i>--> | ||
<!-- </li>--> | ||
<wicket:container wicket:id="mainMenu"> | ||
<wicket:container wicket:id="menuItem"/> | ||
</wicket:container> | ||
<!-- </wicket:container>--> | ||
</ul> | ||
<!-- <ul wicket:id="mainMenu">--> | ||
<!-- <li wicket:id="menuItem"></li>--> | ||
<!-- </ul>--> | ||
</section> | ||
</aside> | ||
|
||
|
||
</wicket:panel> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/DetailsNavigationPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.evolveum.midpoint.gui.impl.component; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
|
||
import org.apache.wicket.markup.html.basic.Label; | ||
import org.apache.wicket.markup.html.list.ListItem; | ||
import org.apache.wicket.markup.html.list.ListView; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.StringResourceModel; | ||
|
||
import java.util.List; | ||
|
||
public class DetailsNavigationPanel extends BasePanel<List<DetailsNavigationMainItem>> { | ||
|
||
private static final String ID_MAIN_MENU = "mainMenu"; | ||
private static final String ID_MENU_ITEM = "menuItem"; | ||
|
||
public DetailsNavigationPanel(String id, IModel<List<DetailsNavigationMainItem>> model) { | ||
super(id, model); | ||
} | ||
|
||
@Override | ||
protected void onInitialize() { | ||
super.onInitialize(); | ||
initLayout(); | ||
} | ||
|
||
private void initLayout() { | ||
ListView<DetailsNavigationMainItem> mainMenu = new ListView<DetailsNavigationMainItem>(ID_MAIN_MENU, getModel()) { | ||
|
||
@Override | ||
protected void populateItem(ListItem<DetailsNavigationMainItem> item) { | ||
item.add(new Label(ID_MENU_ITEM, new StringResourceModel("${labelKey}", item.getModel()))); | ||
} | ||
}; | ||
add(mainMenu); | ||
} | ||
} |