diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java
new file mode 100644
index 000000000..027e35b32
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java
@@ -0,0 +1,120 @@
+package org.navalplanner.web.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.zkoss.zk.ui.Executions;
+import org.zkoss.zul.Div;
+
+/**
+ * Controller for customMenu
+ * @author Lorenzo Tilve Álvaro
+ */
+public class CustomMenuController extends Div {
+
+ private List firstLevel;
+
+ public class CustomMenuItem {
+
+ private final String name;
+ private final String url;
+ private final List children;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public List getChildren() {
+ return children;
+ }
+
+ public CustomMenuItem(String name, String url) {
+ this.name = name;
+ this.url = url;
+ this.children = new ArrayList();
+ }
+
+ public CustomMenuItem(String name, String url,
+ List children) {
+ this.name = name;
+ this.url = url;
+ this.children = children;
+ }
+
+ public void appendChildren(CustomMenuItem newChildren) {
+ this.children.add(newChildren);
+ }
+
+ }
+
+ public CustomMenuController() {
+ initializeMenu();
+ }
+
+ public void initializeMenu() {
+ List l = new ArrayList();
+ CustomMenuItem ci;
+
+ ci = new CustomMenuItem("mainmenu.plannification",
+ "/navalplanner-webapp/");
+ ci.appendChildren(new CustomMenuItem("mainmenu.plannification",
+ "/navalplanner-webapp/planner/main.zul"));
+ ci.appendChildren(new CustomMenuItem("mainmenu.company_overview",
+ "/navalplanner-webapp/planner/main.zul"));
+ ci.appendChildren(new CustomMenuItem("mainmenu.plannifications_list",
+ "/navalplanner-webapp/planner/main.zul"));
+ l.add(ci);
+
+ ci = new CustomMenuItem("mainmenu.resources",
+ "/navalplanner-webapp/resources/worker/worker.zul");
+ ci.appendChildren(new CustomMenuItem("mainmenu.list_workers",
+ "/navalplanner-webapp/resources/worker/worker.zul#list"));
+ ci.appendChildren(new CustomMenuItem("mainmenu.manage_criterions",
+ "/navalplanner-webapp/resources/criterions/criterions.zul"));
+ l.add(ci);
+
+ ci = new CustomMenuItem("mainmenu.orders",
+ "/navalplanner-webapp/orders/orders.zul");
+ ci.appendChildren(new CustomMenuItem("mainmenu.list_orders",
+ "/orders/orders.zul"));
+ ci.appendChildren(new CustomMenuItem("mainmenu.activity_work_types",
+ "/orders/orders.zul"));
+ ci.appendChildren(new CustomMenuItem("mainmenu.models",
+ "/orders/orders.zul"));
+ l.add(ci);
+
+ ci = new CustomMenuItem("mainmenu.work_reports",
+ "/navalplanner-webapp/");
+ l.add(ci);
+
+ ci = new CustomMenuItem("mainmenu.quality_management",
+ "/navalplanner-webapp/");
+ l.add(ci);
+
+ ci = new CustomMenuItem("mainmenu.quality_management",
+ "/navalplanner-webapp/");
+ l.add(ci);
+
+ this.firstLevel = l;
+ }
+
+ public List getCustomMenuItems() {
+ return this.firstLevel;
+ }
+
+ public List getCustomMenuSecondaryItems() {
+ String requestPath = Executions.getCurrent().getDesktop()
+ .getRequestPath();
+ for (CustomMenuItem ci : this.firstLevel) {
+ if (requestPath.contains(ci.url) || ci.url.contains(requestPath)) {
+ return ci.getChildren();
+ }
+ }
+ return this.firstLevel.get(0).getChildren();
+ }
+
+}
\ No newline at end of file
diff --git a/navalplanner-webapp/src/main/webapp/common/layout/_customMenu.zul b/navalplanner-webapp/src/main/webapp/common/layout/_customMenu.zul
new file mode 100644
index 000000000..c7204c062
--- /dev/null
+++ b/navalplanner-webapp/src/main/webapp/common/layout/_customMenu.zul
@@ -0,0 +1,28 @@
+
\ No newline at end of file
diff --git a/navalplanner-webapp/src/main/webapp/common/layout/template_v02.zul b/navalplanner-webapp/src/main/webapp/common/layout/template_v02.zul
index f572eb9c0..04a00f474 100644
--- a/navalplanner-webapp/src/main/webapp/common/layout/template_v02.zul
+++ b/navalplanner-webapp/src/main/webapp/common/layout/template_v02.zul
@@ -1,6 +1,8 @@
+
+
@@ -15,37 +17,15 @@
usuario: admin
- PECHAR SESIÓN
+ PECHAR SESIÓN
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -73,4 +53,5 @@
-
\ No newline at end of file
+
+
\ No newline at end of file