parent
617c5eed91
commit
48824e7249
|
|
@ -93,36 +93,39 @@ import java.util.Properties;
|
||||||
servletPath = "/templates/servlet/pages"
|
servletPath = "/templates/servlet/pages"
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
configurations = {
|
||||||
|
org.arsdigita.cms.CMSConfig.class
|
||||||
|
},
|
||||||
pageModelComponentModels = {
|
pageModelComponentModels = {
|
||||||
@PageModelComponentModel(
|
@PageModelComponentModel(
|
||||||
modelClass = CategorizedItemComponent.class,
|
modelClass = CategorizedItemComponent.class,
|
||||||
editor = CategorizedItemComponentForm.class,
|
editor = CategorizedItemComponentForm.class,
|
||||||
descBundle = CmsConstants.CMS_BUNDLE,
|
descBundle = CmsConstants.CMS_BUNDLE,
|
||||||
titleKey
|
titleKey
|
||||||
= "cms.ui.pagemodel.components.categorized_item_component.title",
|
= "cms.ui.pagemodel.components.categorized_item_component.title",
|
||||||
descKey
|
descKey
|
||||||
= "cms.ui.pagemodel.components.categorized_item_component.desc"),
|
= "cms.ui.pagemodel.components.categorized_item_component.desc"),
|
||||||
@PageModelComponentModel(
|
@PageModelComponentModel(
|
||||||
modelClass = CategoryTreeComponent.class,
|
modelClass = CategoryTreeComponent.class,
|
||||||
editor = CategoryTreeComponentForm.class,
|
editor = CategoryTreeComponentForm.class,
|
||||||
descBundle = CmsConstants.CMS_BUNDLE,
|
descBundle = CmsConstants.CMS_BUNDLE,
|
||||||
titleKey
|
titleKey
|
||||||
= "cms.ui.pagemodel.components.category_tree_component.title",
|
= "cms.ui.pagemodel.components.category_tree_component.title",
|
||||||
descKey = "cms.ui.pagemodel.components.category_tree_component.desc"),
|
descKey = "cms.ui.pagemodel.components.category_tree_component.desc"),
|
||||||
@PageModelComponentModel(
|
@PageModelComponentModel(
|
||||||
modelClass = FixedContentItemComponent.class,
|
modelClass = FixedContentItemComponent.class,
|
||||||
editor = FixedContentItemComponentForm.class,
|
editor = FixedContentItemComponentForm.class,
|
||||||
descBundle = CmsConstants.CMS_BUNDLE,
|
descBundle = CmsConstants.CMS_BUNDLE,
|
||||||
titleKey
|
titleKey
|
||||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.title",
|
= "cms.ui.pagemodel.components.fixed_contentitem_component.title",
|
||||||
descKey
|
descKey
|
||||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.desc"),
|
= "cms.ui.pagemodel.components.fixed_contentitem_component.desc"),
|
||||||
@PageModelComponentModel(
|
@PageModelComponentModel(
|
||||||
modelClass = GreetingItemComponent.class,
|
modelClass = GreetingItemComponent.class,
|
||||||
editor = GreetingItemComponentForm.class,
|
editor = GreetingItemComponentForm.class,
|
||||||
descBundle = CmsConstants.CMS_BUNDLE,
|
descBundle = CmsConstants.CMS_BUNDLE,
|
||||||
titleKey
|
titleKey
|
||||||
= "cms.ui.pagemodel.components.greetingitem_component.title",
|
= "cms.ui.pagemodel.components.greetingitem_component.title",
|
||||||
descKey = "cms.ui.pagemodel.components.greetingitem_component.desc"),
|
descKey = "cms.ui.pagemodel.components.greetingitem_component.desc"),
|
||||||
@PageModelComponentModel(
|
@PageModelComponentModel(
|
||||||
modelClass = ItemListComponent.class,
|
modelClass = ItemListComponent.class,
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,27 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.configuration;
|
package org.libreccm.configuration;
|
||||||
|
|
||||||
import org.hibernate.validator.constraints.NotBlank;
|
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Inheritance;
|
||||||
|
import javax.persistence.InheritanceType;
|
||||||
|
import javax.persistence.NamedQueries;
|
||||||
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.UniqueConstraint;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract base class for all settings.
|
* Abstract base class for all settings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,9 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the {@code ccm-core} module.
|
* Describes the {@code ccm-core} module.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Module(applicationTypes = {
|
@Module(applicationTypes = {
|
||||||
|
|
@ -59,22 +57,19 @@ import java.util.Properties;
|
||||||
descBundle = "com.arsdigita.ui.login.LoginResources",
|
descBundle = "com.arsdigita.ui.login.LoginResources",
|
||||||
singleton = true,
|
singleton = true,
|
||||||
creator = LoginApplicationCreator.class,
|
creator = LoginApplicationCreator.class,
|
||||||
servlet = LoginServlet.class)
|
servlet = LoginServlet.class),
|
||||||
,
|
|
||||||
@ApplicationType(name = AdminUiConstants.ADMIN_APP_TYPE,
|
@ApplicationType(name = AdminUiConstants.ADMIN_APP_TYPE,
|
||||||
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
||||||
singleton = true,
|
singleton = true,
|
||||||
creator = AdminApplicationCreator.class,
|
creator = AdminApplicationCreator.class,
|
||||||
servlet = AdminServlet.class)
|
servlet = AdminServlet.class),
|
||||||
,
|
|
||||||
@ApplicationType(name = "org.libreccm.ui.admin.AdminFaces",
|
@ApplicationType(name = "org.libreccm.ui.admin.AdminFaces",
|
||||||
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
||||||
singleton = true,
|
singleton = true,
|
||||||
creator = AdminJsfApplicationCreator.class,
|
creator = AdminJsfApplicationCreator.class,
|
||||||
servletPath = "/admin-jsf/admin.xhtml")},
|
servletPath = "/admin-jsf/admin.xhtml")
|
||||||
pageModelComponentModels = {
|
},
|
||||||
|
pageModelComponentModels = {},
|
||||||
},
|
|
||||||
configurations = {
|
configurations = {
|
||||||
com.arsdigita.bebop.BebopConfig.class,
|
com.arsdigita.bebop.BebopConfig.class,
|
||||||
com.arsdigita.dispatcher.DispatcherConfig.class,
|
com.arsdigita.dispatcher.DispatcherConfig.class,
|
||||||
|
|
@ -107,17 +102,17 @@ public class CcmCore implements CcmModule {
|
||||||
|
|
||||||
LOGGER.info("Setting up admin application (/ccm/admin/)...");
|
LOGGER.info("Setting up admin application (/ccm/admin/)...");
|
||||||
final AdminApplicationSetup adminSetup
|
final AdminApplicationSetup adminSetup
|
||||||
= new AdminApplicationSetup(event);
|
= new AdminApplicationSetup(event);
|
||||||
adminSetup.setup();
|
adminSetup.setup();
|
||||||
|
|
||||||
LOGGER.info("Setting up admin-jsf application (/ccm/admin-jsf/)...");
|
LOGGER.info("Setting up admin-jsf application (/ccm/admin-jsf/)...");
|
||||||
final AdminJsfApplicationSetup adminJsfSetup
|
final AdminJsfApplicationSetup adminJsfSetup
|
||||||
= new AdminJsfApplicationSetup(event);
|
= new AdminJsfApplicationSetup(event);
|
||||||
adminJsfSetup.setup();
|
adminJsfSetup.setup();
|
||||||
|
|
||||||
LOGGER.info("Setting up login application...");
|
LOGGER.info("Setting up login application...");
|
||||||
final LoginApplicationSetup loginSetup
|
final LoginApplicationSetup loginSetup
|
||||||
= new LoginApplicationSetup(event);
|
= new LoginApplicationSetup(event);
|
||||||
loginSetup.setup();
|
loginSetup.setup();
|
||||||
|
|
||||||
LOGGER.info("Importing category domains from bundle (if any)...");
|
LOGGER.info("Importing category domains from bundle (if any)...");
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,8 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
|
data-toggle="modal"
|
||||||
|
data-target="#setting-#{setting.name}-edit-dialog"
|
||||||
type="button">
|
type="button">
|
||||||
<svg class="bi"
|
<svg class="bi"
|
||||||
width="1em"
|
width="1em"
|
||||||
|
|
@ -123,6 +125,77 @@
|
||||||
</svg>
|
</svg>
|
||||||
#{AdminMessages['configuration.settings.table.actions.edit']}
|
#{AdminMessages['configuration.settings.table.actions.edit']}
|
||||||
</button>
|
</button>
|
||||||
|
<div aria-hidden="true"
|
||||||
|
aria-labelledby="setting-#{setting.name}-edit-dialog-title"
|
||||||
|
class="modal fade"
|
||||||
|
data-backdrop="static"
|
||||||
|
id="setting-#{setting.name}-edit-dialog"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h2 class="model-title"
|
||||||
|
id="setting-#{setting.name}-edit-dialog">
|
||||||
|
#{AdminMessages.getMessage('configuration.settings.setting.dialog.title', [setting.label])}
|
||||||
|
</h2>
|
||||||
|
<button aria-label="#{AdminMessages['configuration.settings.setting.dialog.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button"><span aria-hidden="true">×</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="#">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{setting.valueType == BigDecimal.class.getName()}">
|
||||||
|
<pre>BigDecimal</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == Boolean.class.getName()}">
|
||||||
|
<pre>Boolean</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == Double.class.getName()}">
|
||||||
|
<pre>Double</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == Integer.class.getName()}">
|
||||||
|
<pre>Integer</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == "int"}">
|
||||||
|
<pre>int</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == List.class.getName()}">
|
||||||
|
<pre>List</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == org.libreccm.l10n.LocalizedString.class.getName()}">
|
||||||
|
<pre>LocalizedString</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == Set.class.getName()}">
|
||||||
|
<pre>Set</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{setting.valueType == String.class.getName()}">
|
||||||
|
<pre>String</pre>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<p>
|
||||||
|
#{AdminMessages.getMessage('configuration.settings.setting.dialog.unsupported_type', [setting.valueType])}
|
||||||
|
</p>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-danger"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{AdminMessages['configuration.settings.setting.dialog.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{AdminMessages['configuration.settings.setting.dialog.save']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-danger"
|
<button class="btn btn-danger"
|
||||||
|
|
|
||||||
|
|
@ -221,3 +221,7 @@ configuration.settings.table.actions.reset=Reset
|
||||||
configuration.settings.setting.info.label=Setting {0} Info
|
configuration.settings.setting.info.label=Setting {0} Info
|
||||||
configuration.settings.setting.info.close=Close
|
configuration.settings.setting.info.close=Close
|
||||||
configuration.settings.setting.info.dismiss=OK
|
configuration.settings.setting.info.dismiss=OK
|
||||||
|
configuration.settings.setting.dialog.title=Edit setting {0}
|
||||||
|
configuration.settings.setting.dialog.close=Cancel
|
||||||
|
configuration.settings.setting.dialog.save=Save
|
||||||
|
configuration.settings.setting.dialog.unsupported_type=Sorry, settings of type "{0}" are not supported yet.
|
||||||
|
|
|
||||||
|
|
@ -221,3 +221,7 @@ configuration.settings.table.actions.reset=Zur\u00fccksetzen
|
||||||
configuration.settings.setting.info.label=Setting {0} Info
|
configuration.settings.setting.info.label=Setting {0} Info
|
||||||
configuration.settings.setting.info.close=Schlie\u00dfen
|
configuration.settings.setting.info.close=Schlie\u00dfen
|
||||||
configuration.settings.setting.info.dismiss=OK
|
configuration.settings.setting.info.dismiss=OK
|
||||||
|
configuration.settings.setting.dialog.title=Einstellung {0} bearbeiten
|
||||||
|
configuration.settings.setting.dialog.close=Abbrechen
|
||||||
|
configuration.settings.setting.dialog.save=Speichern
|
||||||
|
configuration.settings.setting.dialog.unsupported_type=Leider werden Einstellunge vom Typ "{0}" noch nicht unterst\u00fctzt.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue