18 package org.turro.publication.zul.menu;
20 import org.turro.annotation.ExternalMenu;
21 import org.turro.elephant.zkoss.Modal;
22 import org.turro.i18n.I_;
23 import org.turro.menu.ElephantMenu;
24 import org.turro.menu.ElephantMenuBar;
25 import org.turro.publication.entity.Publication;
26 import org.turro.publication.zul.portal.PublicationContent;
27 import org.turro.security.Permission;
28 import org.turro.zul.frame.Framework;
29 import org.zkoss.zk.ui.event.Event;
30 import org.zkoss.zk.ui.event.EventListener;
43 .
addMenuitem(
"My subscriptions",
"subscription",
"/mail/notifications.zul",
true)
45 .
addMenuitem(
"My publications",
"publication",
"/publication/publications.zul",
true,
Permission.
from(
"publication:list"))
55 .
addMenuitem(
"New publication", (EventListener) (Event event) -> {
58 .
addMenuitem(
"New newsletter", (EventListener) (Event event) -> {
65 showEntity(
id,
"publicationId",
"Publication",
"/publication/publication.zul");
70 if(publication !=
null) {
72 pc.setPage(frame.getPage());
74 pc.setBorder(
"normal");
75 pc.setTitle(
I_.
get(
"Preview"));
78 pc.setMaximizable(
true);
80 pc.setHeight(
"600px");
82 pc.setMaximized(
false);
89 if(publication !=
null) {
91 pc.setPage(frame.getPage());
93 pc.setBorder(
"normal");
94 pc.setTitle(
I_.
get(
"Preview"));
97 pc.setMaximizable(
true);
99 pc.setHeight(
"600px");
101 pc.setMaximized(
false);
107 showZulFile(
"Pending to accept",
"/publication/pending.zul");
111 showEntity(
id,
"newsletterId",
"Newsletter",
"/publication/newsletter.zul");
static int doModal(String file)
static String get(String msg)
void setPublication(Publication publication)
static Permission from(String... roles)
static Framework getCurrent()