BrightSide Workbench Full Report + Source Code
org.turro.publication.zul.menu.PublicationMenu Class Reference
Inheritance diagram for org.turro.publication.zul.menu.PublicationMenu:
Collaboration diagram for org.turro.publication.zul.menu.PublicationMenu:

Public Member Functions

void addToMenu (ElephantMenuBar bar)
 
- Public Member Functions inherited from org.turro.menu.ElephantMenu
 ElephantMenu ()
 
 ElephantMenu (String label)
 
 ElephantMenu (String label, String image)
 
ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantSubmenu addSubmenu ()
 
int compareTo (ElephantMenu o)
 

Static Public Member Functions

static void showPublication (Long id)
 
static void previewPublication (Publication publication) throws InterruptedException
 
static void previewPublication (String publication) throws InterruptedException
 
static void showPending ()
 
static void showNewsletter (Long id)
 
- Static Public Member Functions inherited from org.turro.menu.ElephantMenu
static String makeInclude (String include)
 
static void showEntity (Object id, String attribute, String label, String include)
 
static void showEntity (Object id, String attribute, String label, String include, Map< String, Object > dynProps)
 
static void showZulFile (String label, String include)
 
static void showZulFile (String label, String include, Map< String, Object > dynProps)
 
static void showModalZulFile (String label, String source, Command command)
 
static void showModalZulFile (String label, String include, Map args, Command command)
 
static void showPopupZulFile (String label, String include)
 
static void showPopupZulFile (String label, String include, Map args)
 
static void showEntityModal (Object id, String attribute, String include, Command command)
 

Additional Inherited Members

- Protected Member Functions inherited from org.turro.menu.ElephantMenu
void addToSessionMenu (ElephantSubmenu submenu)
 
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 37 of file PublicationMenu.java.

Member Function Documentation

◆ addToMenu()

void org.turro.publication.zul.menu.PublicationMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 40 of file PublicationMenu.java.

40  {
41  bar.addMenu("Publications", Permission.from("publication:list"))
42  .addSubmenu()
43  .addMenuitem("My subscriptions", "subscription", "/mail/notifications.zul", true)
44  .addMenuSeparator()
45  .addMenuitem("My publications", "publication", "/publication/publications.zul", true, Permission.from("publication:list"))
46  .addMenuitem("Newsletters", "newsletter", "/publication/newsletters.zul", true, Permission.from("publication:list"))
47  .addMenuitem("Repository", "/publication/repository.zul", Permission.from("editor:repository"))
48  .addMenuSeparator()
49  .addMenuitem("Categories", "/publication/categories.zul", Permission.from("publication-category:list"))
50  .addMenuitem("Subscriptors", "/mail/subscribers.zul", Permission.from("publication-category:list"))
51  .addMenuitem("Bloggers", "/publication/bloggers.zul", Permission.from("publication-category:list"))
52  .addMenuitem("Groups", "/publication/groups.zul", Permission.from("publication-group:list"))
53  .addMenuitem("Pending to accept", "/publication/pending.zul", Permission.from("publication:accept"))
54  .addMenuSeparator()
55  .addMenuitem("New publication", (EventListener) (Event event) -> {
56  PublicationMenu.showPublication(0L);
57  }, Permission.from("publication:new"))
58  .addMenuitem("New newsletter", (EventListener) (Event event) -> {
59  PublicationMenu.showNewsletter(0L);
60  }, Permission.from("publication:new"))
61  .addToolbarSeparator(true);
62  }
Here is the call graph for this function:

◆ previewPublication() [1/2]

static void org.turro.publication.zul.menu.PublicationMenu.previewPublication ( Publication  publication) throws InterruptedException
static

Definition at line 68 of file PublicationMenu.java.

68  {
69  Framework frame = Framework.getCurrent();
70  if(publication != null) {
71  PublicationContent pc = new PublicationContent();
72  pc.setPage(frame.getPage());
73  pc.setMode("modal");
74  pc.setBorder("normal");
75  pc.setTitle(I_.get("Preview"));
76  pc.setClosable(true);
77  pc.setSizable(true);
78  pc.setMaximizable(true);
79  pc.setWidth("700px");
80  pc.setHeight("600px");
81  pc.setPublication(publication);
82  pc.setMaximized(false);
83  Modal.doModal(pc, null);
84  }
85  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ previewPublication() [2/2]

static void org.turro.publication.zul.menu.PublicationMenu.previewPublication ( String  publication) throws InterruptedException
static

Definition at line 87 of file PublicationMenu.java.

87  {
88  Framework frame = Framework.getCurrent();
89  if(publication != null) {
90  PublicationContent pc = new PublicationContent();
91  pc.setPage(frame.getPage());
92  pc.setMode("modal");
93  pc.setBorder("normal");
94  pc.setTitle(I_.get("Preview"));
95  pc.setClosable(true);
96  pc.setSizable(true);
97  pc.setMaximizable(true);
98  pc.setWidth("700px");
99  pc.setHeight("600px");
100  pc.setPublication(publication);
101  pc.setMaximized(false);
102  Modal.doModal(pc, null);
103  }
104  }
Here is the call graph for this function:

◆ showNewsletter()

static void org.turro.publication.zul.menu.PublicationMenu.showNewsletter ( Long  id)
static

Definition at line 110 of file PublicationMenu.java.

110  {
111  showEntity(id, "newsletterId", "Newsletter", "/publication/newsletter.zul");
112  }
static void showEntity(Object id, String attribute, String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showPending()

static void org.turro.publication.zul.menu.PublicationMenu.showPending ( )
static

Definition at line 106 of file PublicationMenu.java.

106  {
107  showZulFile("Pending to accept", "/publication/pending.zul");
108  }
static void showZulFile(String label, String include)
Here is the call graph for this function:

◆ showPublication()

static void org.turro.publication.zul.menu.PublicationMenu.showPublication ( Long  id)
static

Definition at line 64 of file PublicationMenu.java.

64  {
65  showEntity(id, "publicationId", "Publication", "/publication/publication.zul");
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: