From 732295b2fe9e8abe9a4930341bd7b04570fa9f54 Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Mon, 21 Sep 2020 21:15:18 +0200 Subject: [PATCH] Placeholder pages for admin --- ccm-bundle-devel-wildfly/faces-config.NavData | 6 ++ .../applications/ApplicationsController.java | 46 ++++++++++ .../admin/applications/ApplicationsPage.java | 78 ++++++++++++++++ .../categories/CategoriesController.java | 46 ++++++++++ .../ui/admin/categories/CategoriesPage.java | 78 ++++++++++++++++ .../ConfigurationController.java | 46 ++++++++++ .../configuration/ConfigurationPage.java | 77 ++++++++++++++++ .../admin/dashboard/DashboardController.java | 46 ++++++++++ .../ui/admin/dashboard/DashboardPage.java | 76 ++++++++++++++++ .../ui/admin/imexport/ImExportController.java | 46 ++++++++++ .../ui/admin/imexport/ImExportPage.java | 78 ++++++++++++++++ .../ui/admin/sites/SitesController.java | 46 ++++++++++ .../libreccm/ui/admin/sites/SitesPage.java | 76 ++++++++++++++++ .../SystemInformationPage.java | 2 +- .../UsersGroupsRolesController.java | 46 ++++++++++ .../UsersGroupsRolesPage.java | 78 ++++++++++++++++ .../org/libreccm/ui/admin/applications.xhtml | 16 ++++ .../org/libreccm/ui/admin/categories.xhtml | 16 ++++ .../org/libreccm/ui/admin/ccm-admin.xhtml | 13 +-- .../org/libreccm/ui/admin/configuration.xhtml | 16 ++++ .../org/libreccm/ui/admin/dashboard.xhtml | 16 ++++ .../org/libreccm/ui/admin/imexport.xhtml | 16 ++++ .../views/org/libreccm/ui/admin/sites.xhtml | 16 ++++ .../libreccm/ui/admin/systeminformation.xhtml | 89 ++++++++++++++++--- .../ui/admin/users-groups-roles.xhtml | 16 ++++ .../org/libreccm/ui/AdminBundle.properties | 14 +++ .../org/libreccm/ui/AdminBundle_de.properties | 14 +++ 27 files changed, 1090 insertions(+), 23 deletions(-) create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesController.java create mode 100644 ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesPage.java create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/categories.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/configuration.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/dashboard.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/imexport.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/sites.xhtml create mode 100644 ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/users-groups-roles.xhtml diff --git a/ccm-bundle-devel-wildfly/faces-config.NavData b/ccm-bundle-devel-wildfly/faces-config.NavData index e69de29bb..298bfc50a 100644 --- a/ccm-bundle-devel-wildfly/faces-config.NavData +++ b/ccm-bundle-devel-wildfly/faces-config.NavData @@ -0,0 +1,6 @@ + + + + + + diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsController.java new file mode 100644 index 000000000..5245c612a --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.applications; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/applications") +public class ApplicationsController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/applications.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java new file mode 100644 index 000000000..57b5da792 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/applications/ApplicationsPage.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.applications; + +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class ApplicationsPage implements AdminPage { + + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(ApplicationsController.class); + return classes; + } + + @Override + public String getPath() { + return "applications"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "applications.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "applications.description"; + } + + @Override + public String getIcon() { + return "journals"; + } + + @Override + public int getPosition() { + return 10; + } + +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesController.java new file mode 100644 index 000000000..e15766460 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.categories; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/categories") +public class CategoriesController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/categories.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesPage.java new file mode 100644 index 000000000..666ac70e7 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/categories/CategoriesPage.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.categories; + +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class CategoriesPage implements AdminPage { + + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(CategoriesController.class); + return classes; + } + + @Override + public String getPath() { + return "categories"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "categories.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "categories.description"; + } + + @Override + public String getIcon() { + return "diagram-3-fill"; + } + + @Override + public int getPosition() { + return 20; + } + +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationController.java new file mode 100644 index 000000000..1e36e66c6 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.configuration; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/configuration") +public class ConfigurationController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/configuration.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationPage.java new file mode 100644 index 000000000..463c136e6 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/configuration/ConfigurationPage.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.configuration; + +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; +import org.libreccm.ui.admin.categories.CategoriesController; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class ConfigurationPage implements AdminPage { + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(ConfigurationController.class); + return classes; + } + + @Override + public String getPath() { + return "configuration"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "configuration.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "configuration.description"; + } + + @Override + public String getIcon() { + return "gear-fill"; + } + + @Override + public int getPosition() { + return 30; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardController.java new file mode 100644 index 000000000..a3b72590b --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.dashboard; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/") +public class DashboardController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/dashboard.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardPage.java new file mode 100644 index 000000000..5620d3dd1 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/dashboard/DashboardPage.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.dashboard; + +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class DashboardPage implements AdminPage { + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(DashboardController.class); + return classes; + } + + @Override + public String getPath() { + return "/"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "dashboard.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "dashboard.description"; + } + + @Override + public String getIcon() { + return "house-fill"; + } + + @Override + public int getPosition() { + return 0; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportController.java new file mode 100644 index 000000000..9e2dfef7b --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.imexport; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/imexport") +public class ImExportController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/imexport.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportPage.java new file mode 100644 index 000000000..d97224905 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/imexport/ImExportPage.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.imexport; + +import org.libreccm.ui.admin.configuration.*; +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; +import org.libreccm.ui.admin.categories.CategoriesController; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class ImExportPage implements AdminPage { + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(ImExportController.class); + return classes; + } + + @Override + public String getPath() { + return "imexport"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "imexport.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "imexport.description"; + } + + @Override + public String getIcon() { + return "arrow-left-right"; + } + + @Override + public int getPosition() { + return 40; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesController.java new file mode 100644 index 000000000..817821f05 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.sites; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/sites") +public class SitesController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/sites.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java new file mode 100644 index 000000000..3b80c3df7 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/sites/SitesPage.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.sites; + +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class SitesPage implements AdminPage { + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(SitesController.class); + return classes; + } + + @Override + public String getPath() { + return "sites"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "sites.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "sites.description"; + } + + @Override + public String getIcon() { + return "bookshelf"; + } + + @Override + public int getPosition() { + return 60; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationPage.java index 1b8144474..27af5ad63 100644 --- a/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationPage.java +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/systeminformation/SystemInformationPage.java @@ -72,7 +72,7 @@ public class SystemInformationPage implements AdminPage { @Override public int getPosition() { - return 80; + return 70; } } diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesController.java b/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesController.java new file mode 100644 index 000000000..6cfe77e65 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesController.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.usersgroupsroles; + +import org.libreccm.core.CoreConstants; +import org.libreccm.security.AuthorizationRequired; +import org.libreccm.security.RequiresPrivilege; + +import javax.enterprise.context.RequestScoped; +import javax.mvc.Controller; +import javax.ws.rs.GET; +import javax.ws.rs.Path; + +/** + * + * @author Jens Pelzetter + */ +@RequestScoped +@Controller +@Path("/users-groups-roles") +public class UsersGroupsRolesController { + + @GET + @Path("/") + @AuthorizationRequired + @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) + public String getPlaceholder() { + return "org/libreccm/ui/admin/users-groups-roles.xhtml"; + } +} diff --git a/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesPage.java b/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesPage.java new file mode 100644 index 000000000..1800ba090 --- /dev/null +++ b/ccm-core/src/main/java/org/libreccm/ui/admin/usersgroupsroles/UsersGroupsRolesPage.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2020 LibreCCM Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +package org.libreccm.ui.admin.usersgroupsroles; + +import org.libreccm.ui.admin.configuration.*; +import org.libreccm.ui.admin.AdminConstants; +import org.libreccm.ui.admin.AdminPage; +import org.libreccm.ui.admin.categories.CategoriesController; + +import java.util.HashSet; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; + +/** + * + * @author Jens Pelzetter + */ +@ApplicationScoped +public class UsersGroupsRolesPage implements AdminPage { + @Override + public Set> getControllerClasses() { + final Set> classes = new HashSet<>(); + classes.add(UsersGroupsRolesController.class); + return classes; + } + + @Override + public String getPath() { + return "users-groups-roles"; + } + + @Override + public String getLabelBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getLabelKey() { + return "usersgroupsroles.label"; + } + + @Override + public String getDescriptionBundle() { + return AdminConstants.ADMIN_BUNDLE; + } + + @Override + public String getDescriptionKey() { + return "usersgroupsroles.description"; + } + + @Override + public String getIcon() { + return "people-fill"; + } + + @Override + public int getPosition() { + return 80; + } +} diff --git a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml new file mode 100644 index 000000000..367fdcefb --- /dev/null +++ b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/applications.xhtml @@ -0,0 +1,16 @@ + + + + + + +
+

Applications

+

Placeholder

+
+
+
+ diff --git a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/categories.xhtml b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/categories.xhtml new file mode 100644 index 000000000..b7a561028 --- /dev/null +++ b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/categories.xhtml @@ -0,0 +1,16 @@ + + + + + + +
+

Categories

+

Placeholder

+
+
+
+ diff --git a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml index 233030774..ec030cdf1 100644 --- a/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml +++ b/ccm-core/src/main/resources/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml @@ -27,20 +27,9 @@