Settings dialog basic design
parent
aba8d5bad2
commit
03b125d099
|
|
@ -93,36 +93,39 @@ import java.util.Properties;
|
|||
servletPath = "/templates/servlet/pages"
|
||||
)
|
||||
},
|
||||
configurations = {
|
||||
org.arsdigita.cms.CMSConfig.class
|
||||
},
|
||||
pageModelComponentModels = {
|
||||
@PageModelComponentModel(
|
||||
modelClass = CategorizedItemComponent.class,
|
||||
editor = CategorizedItemComponentForm.class,
|
||||
descBundle = CmsConstants.CMS_BUNDLE,
|
||||
titleKey
|
||||
= "cms.ui.pagemodel.components.categorized_item_component.title",
|
||||
= "cms.ui.pagemodel.components.categorized_item_component.title",
|
||||
descKey
|
||||
= "cms.ui.pagemodel.components.categorized_item_component.desc"),
|
||||
= "cms.ui.pagemodel.components.categorized_item_component.desc"),
|
||||
@PageModelComponentModel(
|
||||
modelClass = CategoryTreeComponent.class,
|
||||
editor = CategoryTreeComponentForm.class,
|
||||
descBundle = CmsConstants.CMS_BUNDLE,
|
||||
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"),
|
||||
@PageModelComponentModel(
|
||||
modelClass = FixedContentItemComponent.class,
|
||||
editor = FixedContentItemComponentForm.class,
|
||||
descBundle = CmsConstants.CMS_BUNDLE,
|
||||
titleKey
|
||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.title",
|
||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.title",
|
||||
descKey
|
||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.desc"),
|
||||
= "cms.ui.pagemodel.components.fixed_contentitem_component.desc"),
|
||||
@PageModelComponentModel(
|
||||
modelClass = GreetingItemComponent.class,
|
||||
editor = GreetingItemComponentForm.class,
|
||||
descBundle = CmsConstants.CMS_BUNDLE,
|
||||
titleKey
|
||||
= "cms.ui.pagemodel.components.greetingitem_component.title",
|
||||
= "cms.ui.pagemodel.components.greetingitem_component.title",
|
||||
descKey = "cms.ui.pagemodel.components.greetingitem_component.desc"),
|
||||
@PageModelComponentModel(
|
||||
modelClass = ItemListComponent.class,
|
||||
|
|
|
|||
|
|
@ -18,15 +18,27 @@
|
|||
*/
|
||||
package org.libreccm.configuration;
|
||||
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Describes the {@code ccm-core} module.
|
||||
*
|
||||
|
|
@ -59,22 +57,19 @@ import java.util.Properties;
|
|||
descBundle = "com.arsdigita.ui.login.LoginResources",
|
||||
singleton = true,
|
||||
creator = LoginApplicationCreator.class,
|
||||
servlet = LoginServlet.class)
|
||||
,
|
||||
servlet = LoginServlet.class),
|
||||
@ApplicationType(name = AdminUiConstants.ADMIN_APP_TYPE,
|
||||
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
||||
singleton = true,
|
||||
creator = AdminApplicationCreator.class,
|
||||
servlet = AdminServlet.class)
|
||||
,
|
||||
servlet = AdminServlet.class),
|
||||
@ApplicationType(name = "org.libreccm.ui.admin.AdminFaces",
|
||||
descBundle = "com.arsdigita.ui.admin.AdminResources",
|
||||
singleton = true,
|
||||
creator = AdminJsfApplicationCreator.class,
|
||||
servletPath = "/admin-jsf/admin.xhtml")},
|
||||
pageModelComponentModels = {
|
||||
|
||||
},
|
||||
servletPath = "/admin-jsf/admin.xhtml")
|
||||
},
|
||||
pageModelComponentModels = {},
|
||||
configurations = {
|
||||
com.arsdigita.bebop.BebopConfig.class,
|
||||
com.arsdigita.dispatcher.DispatcherConfig.class,
|
||||
|
|
@ -107,17 +102,17 @@ public class CcmCore implements CcmModule {
|
|||
|
||||
LOGGER.info("Setting up admin application (/ccm/admin/)...");
|
||||
final AdminApplicationSetup adminSetup
|
||||
= new AdminApplicationSetup(event);
|
||||
= new AdminApplicationSetup(event);
|
||||
adminSetup.setup();
|
||||
|
||||
LOGGER.info("Setting up admin-jsf application (/ccm/admin-jsf/)...");
|
||||
final AdminJsfApplicationSetup adminJsfSetup
|
||||
= new AdminJsfApplicationSetup(event);
|
||||
= new AdminJsfApplicationSetup(event);
|
||||
adminJsfSetup.setup();
|
||||
|
||||
LOGGER.info("Setting up login application...");
|
||||
final LoginApplicationSetup loginSetup
|
||||
= new LoginApplicationSetup(event);
|
||||
= new LoginApplicationSetup(event);
|
||||
loginSetup.setup();
|
||||
|
||||
LOGGER.info("Importing category domains from bundle (if any)...");
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@
|
|||
</td>
|
||||
<td>
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#setting-#{setting.name}-edit-dialog"
|
||||
type="button">
|
||||
<svg class="bi"
|
||||
width="1em"
|
||||
|
|
@ -123,6 +125,77 @@
|
|||
</svg>
|
||||
#{AdminMessages['configuration.settings.table.actions.edit']}
|
||||
</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>
|
||||
<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.close=Close
|
||||
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.close=Schlie\u00dfen
|
||||
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