Search in sources :

Example 1 with ResponsiveRow

use of com.jarektoro.responsivelayout.ResponsiveRow in project cia by Hack23.

the class CommitteeMenuItemFactoryImpl method createOverviewPage.

@Override
public void createOverviewPage(final VerticalLayout panelContent, final String pageId) {
    final ResponsiveRow grid = createGridLayout(panelContent);
    createButtonLink(grid, CURRENT_MEMBERS_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.CURRENT_MEMBERS.toString(), pageId), "Current roles and days served");
    createButtonLink(grid, MEMBER_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.MEMBERHISTORY.toString(), pageId), "History of all roles and days served");
    createButtonLink(grid, ROLE_GHANT_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.ROLEGHANT.toString(), pageId), "Gantt chart of all roles over time");
    createButtonLink(grid, DOCUMENT_ACTIVITY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DOCUMENTACTIVITY.toString(), pageId), "Chart of document activity by document type.");
    createButtonLink(grid, DOCUMENT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DOCUMENT_HISTORY.toString(), pageId), "Document history list");
    createButtonLink(grid, BALLOT_DECISION_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.BALLOTDECISIONSUMMARY.toString(), pageId), "Summary of all ballot decisions");
    createButtonLink(grid, DECISION_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DECISIONSUMMARY.toString(), pageId), "Summary of all ballots");
    createButtonLink(grid, DECISION_TYPE_DAILY_SUMMARY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, CommitteePageMode.DECISIONTYPEDAILYSUMMARY.toString(), pageId), "Chart over decisions by decisions type, daily summary");
    createButtonLink(grid, "Decision flow", VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.CHARTS + "/" + ChartIndicators.DECISION_FLOW_CHART, pageId), "desc");
    createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, new PageModeMenuCommand(UserViews.COMMITTEE_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId), "View history of page visit for this page.");
}
Also used : PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) ResponsiveRow(com.jarektoro.responsivelayout.ResponsiveRow)

Example 2 with ResponsiveRow

use of com.jarektoro.responsivelayout.ResponsiveRow in project cia by Hack23.

the class MainViewLoginPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getMenuItemFactory().createMainPageMenuBar(menuBar);
    final VerticalLayout loginLayout = new VerticalLayout();
    loginLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    loginLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formContent.setIcon(VaadinIcons.SIGN_IN);
    formPanel.setContent(formContent);
    final LoginRequest loginRequest = new LoginRequest();
    loginRequest.setOtpCode("");
    loginRequest.setEmail("");
    loginRequest.setUserpassword("");
    loginRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    final ClickListener loginListener = new ApplicationLoginListener(loginRequest);
    getFormFactory().addRequestInputFormFields(formContent, loginRequest, LoginRequest.class, AS_LIST, LOGIN, loginListener);
    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();
    content.addComponent(overviewLayout);
    content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
    final ResponsiveRow grid = createGridLayout(overviewLayout);
    createRowComponent(grid, loginLayout, REGISTER_A_NEW_USER);
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER, CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
    return content;
}
Also used : FormLayout(com.vaadin.ui.FormLayout) Panel(com.vaadin.ui.Panel) ApplicationLoginListener(com.hack23.cia.web.impl.ui.application.views.pageclicklistener.ApplicationLoginListener) ResponsiveRow(com.jarektoro.responsivelayout.ResponsiveRow) VerticalLayout(com.vaadin.ui.VerticalLayout) LoginRequest(com.hack23.cia.service.api.action.application.LoginRequest) ClickListener(com.vaadin.ui.Button.ClickListener) Secured(org.springframework.security.access.annotation.Secured)

Example 3 with ResponsiveRow

use of com.jarektoro.responsivelayout.ResponsiveRow in project cia by Hack23.

the class MainViewRegisterPageModContentFactoryImpl method createContent.

@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);
    getMenuItemFactory().createMainPageMenuBar(menuBar);
    final VerticalLayout registerLayout = new VerticalLayout();
    registerLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    registerLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    final RegisterUserRequest reqisterRequest = new RegisterUserRequest();
    reqisterRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    reqisterRequest.setUsername("");
    reqisterRequest.setEmail("");
    reqisterRequest.setCountry("");
    reqisterRequest.setUserpassword("");
    final ClickListener reqisterListener = new RegisterUserClickListener(reqisterRequest);
    getFormFactory().addRequestInputFormFields(formContent, reqisterRequest, RegisterUserRequest.class, AS_LIST, REGISTER, reqisterListener);
    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();
    content.addComponent(overviewLayout);
    content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
    final ResponsiveRow grid = createGridLayout(overviewLayout);
    createRowComponent(grid, registerLayout, "Register a new user");
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER, CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
    return content;
}
Also used : FormLayout(com.vaadin.ui.FormLayout) Panel(com.vaadin.ui.Panel) RegisterUserRequest(com.hack23.cia.service.api.action.application.RegisterUserRequest) ResponsiveRow(com.jarektoro.responsivelayout.ResponsiveRow) VerticalLayout(com.vaadin.ui.VerticalLayout) RegisterUserClickListener(com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RegisterUserClickListener) ClickListener(com.vaadin.ui.Button.ClickListener) RegisterUserClickListener(com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RegisterUserClickListener) Secured(org.springframework.security.access.annotation.Secured)

Example 4 with ResponsiveRow

use of com.jarektoro.responsivelayout.ResponsiveRow in project cia by Hack23.

the class PartyRankingMenuItemFactoryImpl method createOverviewPage.

@Override
public void createOverviewPage(final VerticalLayout panelContent) {
    final ResponsiveRow grid = createGridLayout(panelContent);
    createButtonLink(grid, TOTAL_MEMBERS, VaadinIcons.GROUP, COMMAND_DATAGRID, "Scoreboard all parties current assignments and roles in eu,government,committes and parliament");
    createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_MINISTRIES_HEAD_COUNT_TEXT, VaadinIcons.GROUP, COMMAND_CHARTS_CURRENT_GOVERNMENT_PARTIES, "Chart over the headcount by party in current goverment");
    createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_COMMITTEES_HEAD_COUNT, VaadinIcons.GROUP, COMMAND_CHARTS_CURRENT_COMMITTEES, "Chart over the headcount by party in current committees");
    createButtonLink(grid, CURRENT_PARTIES_ACTIVE_IN_PARLIAMENT_HEAD_COUNT, VaadinIcons.GROUP, COMMAND_CHARTS_CURRENT_PARTIES, "Chart over the headcount by party in current parliament");
    createButtonLink(grid, ALL_PARTIES_TOTAL_DAYS_SERVED_IN_PARLIAMENT, VaadinIcons.GROUP, COMMAND_CHARTS_ALL_PARTIES, "Chart all parties total politician days serverd in parliament");
    createButtonLink(grid, PAGE_VISIT_HISTORY_TEXT, VaadinIcons.GROUP, COMMAND_PAGEVISITHISTORY, "View history of page visit for this page.");
}
Also used : ResponsiveRow(com.jarektoro.responsivelayout.ResponsiveRow)

Example 5 with ResponsiveRow

use of com.jarektoro.responsivelayout.ResponsiveRow in project cia by Hack23.

the class UserHomeMenuItemFactoryImpl method createOverviewPage.

@Override
public void createOverviewPage(final VerticalLayout overviewLayout) {
    final ResponsiveRow grid = createGridLayout(overviewLayout);
    createButtonLink(grid, SECURITY_SETTING_TEXT, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.SECURITY_SETTINGS.toString(), ""), "Security settings, enable MFA");
    createButtonLink(grid, USER_VISITS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_VISITS.toString()), "All past visits");
    createButtonLink(grid, USER_EVENTS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_EVENTS.toString()), "All past events");
}
Also used : PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) ResponsiveRow(com.jarektoro.responsivelayout.ResponsiveRow)

Aggregations

ResponsiveRow (com.jarektoro.responsivelayout.ResponsiveRow)19 PageModeMenuCommand (com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand)7 VerticalLayout (com.vaadin.ui.VerticalLayout)6 Secured (org.springframework.security.access.annotation.Secured)6 Button (com.vaadin.ui.Button)3 ClickListener (com.vaadin.ui.Button.ClickListener)2 FormLayout (com.vaadin.ui.FormLayout)2 Panel (com.vaadin.ui.Panel)2 DataAgentTarget (com.hack23.cia.model.internal.application.data.impl.DataAgentTarget)1 UserAccount (com.hack23.cia.model.internal.application.user.impl.UserAccount)1 DataSummary (com.hack23.cia.service.api.DataSummary)1 ManageUserAccountRequest (com.hack23.cia.service.api.action.admin.ManageUserAccountRequest)1 AccountOperation (com.hack23.cia.service.api.action.admin.ManageUserAccountRequest.AccountOperation)1 LoginRequest (com.hack23.cia.service.api.action.application.LoginRequest)1 RegisterUserRequest (com.hack23.cia.service.api.action.application.RegisterUserRequest)1 ApplicationLoginListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.ApplicationLoginListener)1 ManageUserAccountClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.ManageUserAccountClickListener)1 RefreshDataViewsClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RefreshDataViewsClickListener)1 RegisterUserClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RegisterUserClickListener)1 RemoveDataClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RemoveDataClickListener)1