18 package org.turro.contacts.zul.menu;
21 import org.turro.string.Strings;
22 import org.turro.annotation.ExternalMenu;
23 import org.turro.auth.Authentication;
24 import org.turro.command.Command;
25 import org.turro.command.Context;
26 import org.turro.contacts.Contact;
27 import org.turro.elephant.zkoss.Modal;
28 import org.turro.elephant.zkoss.ModalWindow;
29 import org.turro.i18n.I_;
30 import org.turro.menu.ElephantMenu;
31 import org.turro.menu.ElephantMenuBar;
32 import org.turro.menu.ElephantSubmenu;
33 import org.turro.security.Permission;
34 import org.turro.zul.frame.Framework;
35 import org.zkoss.zk.ui.event.Event;
36 import org.zkoss.zk.ui.event.EventListener;
50 .
addMenuitem(
"Contacts",
"contacts",
"/contact/contacts.zul",
true)
51 .
addMenuitem(
"New contact",
"contact_new", (EventListener) (Event event) -> {
62 .
addMenuitem(
"Subscriptions",
"forward", (EventListener) (Event event) -> {
71 .
addMenuitem(
"Acceptance",
"acceptation",
"/contact/acceptances.zul",
true)
72 .
addMenuitem(
"Participations",
"participation",
"/contact/entityParticipation.zul",
false,
Permission.
from(
"contact:all"))
79 if(!Strings.isBlank(path)) {
85 public Object execute(Context context) {
88 if(command !=
null) command.execute(context);
104 showEntity(contact.
getId(),
"contactId",
"Contact",
"/contact/contact.zul", Map.of(
"contactGenerated", contact));
108 showEntity(
id,
"contactId",
"Contact",
"/contact/contact.zul");
112 showEntity(
id,
"convocationId",
"Convocation",
"/contact/convocation/convocation.zul");
116 showEntity(
id,
"serviceId",
"Service",
"/contact/service/service.zul");
120 showZulFile(
"Participations",
"/contact/entityParticipation.zul", Map.of(
"entityPath", entityPath));
124 showZulFile(
"Subscriptions",
"/contact/subscriptions.zul", Map.of(
"contact", contact));
128 showZulFile(
"Organigram",
"/contact/organigram.zul", Map.of(
"contact", contact));
static IContact getIContact()
static int doModal(String file)
static String get(String msg)
static Permission from(String... roles)
void addContent(String label, String src)
static Framework getCurrent()
void invalidateSelected()
static void setAttribute(Object object, String key, Object value)