View for create step of SciDepartment

pull/1/head
Jens Pelzetter 2022-10-03 09:03:13 +02:00
parent 0f86a8f540
commit 087f3c4dcd
9 changed files with 178 additions and 1 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ node_modules
/sci-publications/target/
/scicms-bundle-devel-wildfly/target/
/sci-types-project/nbproject/
/sci-types-department/nbproject/

View File

@ -22,7 +22,7 @@ public class SciDepartmentConfig {
@Setting
private String textKeysBundleName
= "org.scientificcms.contenttypes.scidepartment.TextKeysBundle";
= "org.scientificcms.contenttypes.scidepartment.DefaultTextKeys";
public static SciDepartmentConfig getConfig() {
final ConfigurationManager confManager = CdiUtil

View File

@ -0,0 +1,29 @@
package org.scientificcms.contenttypes.scidepartment.ui;
import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.ui.AbstractMessagesBean;
import org.scientificcms.contenttypes.scidepartment.SciDepartmentConfig;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@Named("SciDepartmentRoles")
public class SciDepartmentRoles extends AbstractMessagesBean {
@Inject
private ConfigurationManager confManager;
@Override
protected String getMessageBundle() {
return confManager
.findConfiguration(SciDepartmentConfig.class)
.getMemberRolesBundleName();
}
}

View File

@ -0,0 +1,29 @@
package org.scientificcms.contenttypes.scidepartment.ui;
import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.ui.AbstractMessagesBean;
import org.scientificcms.contenttypes.scidepartment.SciDepartmentConfig;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@Named("SciDepartmentTexts")
public class SciDepartmentTexts extends AbstractMessagesBean {
@Inject
private ConfigurationManager confManager;
@Override
protected String getMessageBundle() {
return confManager
.findConfiguration(SciDepartmentConfig.class)
.getTextKeysBundleName();
}
}

View File

@ -0,0 +1,86 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/contentsection.xhtml">
<ui:define name="main">
<div class="container">
<h1>#{SciDepartmentMessageBundle['createstep.title']}</h1>
<c:forEach items="#{SciDepartmentCreateStep.messages.entrySet()}"
var="message">
<div class="alert alert-#{message.key}"
role="alert">
#{message.value}
</div>
</c:forEach>
<form action="#{mvc.basePath}/#{SciDepartmentCreateStep.contentSectionLabel}/documents/#{SciDepartmentCreateStep.folderPath}@create/#{SciDepartmentCreateStep.documentType}"
method="post">
<bootstrap:formGroupText
help="#{SciDepartmentMessageBundle['createform.name.help']}"
inputId="name"
label="#{SciDepartmentMessageBundle['createform.name.label']}"
name="name"
pattern="^([a-zA-Z0-9_-]*)$"
required="true"
value="#{SciDepartmentCreateStep.name}"
/>
<bootstrap:formGroupSelect
help="#{SciDepartmentMessageBundle['createform.initial_locale.help']}"
inputId="locale"
label="#{SciDepartmentMessageBundle['createform.initial_locale.label']}"
name="locale"
options="#{SciDepartmentCreateStep.availableLocales}"
required="true"
selectedOptions="#{[SciDepartmentCreateStep.initialLocale]}"
/>
<bootstrap:formGroupText
help="#{SciDepartmentMessageBundle['createform.title.help']}"
inputId="title"
label="#{SciDepartmentMessageBundle['createform.title.label']}"
name="title"
required="true"
value="#{SciDepartmentCreateStep.title}"
/>
<bootstrap:formGroupTextarea
cols="80"
help="#{SciDepartmentMessageBundle['createform.summary.help']}"
inputId="summary"
label="#{SciDepartmentMessageBundle['createform.summary.label']}"
name="summary"
required="true"
rows="16"
value="#{SciDepartmentCreateStep.shortDescription}"
/>
<bootstrap:formGroupSelect
help="#{SciDepartmentMessageBundle['createform.workflow.help']}"
inputId="workflow"
label="#{SciDepartmentMessageBundle['createform.workflow.label']}"
name="workflow"
options="#{SciDepartmentCreateStep.availableWorkflows}"
selectedOptions="#{[SciDepartmentCreateStep.selectedWorkflow]}"
/>
<a class="btn btn-warning"
href="#{mvc.basePath}/#{SciDepartmentCreateStep.contentSectionLabel}/documentsfolders/#{SciDepartmentCreateStep.folderPath}">
#{SciDepartmentMessageBundle['createform.cancel']}
</a>
<button class="btn btn-success"
type="submit">
#{SciDepartmentMessageBundle['createform.submit']}
</button>
</form>
</div>
</ui:define>
</ui:composition>
</html>

View File

@ -0,0 +1,3 @@
scidepartment.research=Research
scidepartment.concept=Concept

View File

@ -0,0 +1,3 @@
scidepartment.research=Forschung
scidepartment.concept=Leitkonzept

View File

@ -5,3 +5,16 @@ authoringsteps.description.label=Description
scidepartment.edit.denied=Access denied.
authoringsteps.basicproperties.description=Basicproperties of the department.
authoringsteps.basicproperties.label=Basic Properties
createstep.title=Create a new department description
createstep.name.help=The name of the new department description. Also used as URL fragment.
createstep.name.label=Name
createform.initial_locale.help=The initial locale of the department description.
createform.initial_locale.label=Summary
createform.title.help=The title of the department.
createform.title.label=Title
createform.summary.help=A summary of the description of the department.
createform.summary.label=Summary
createform.workflow.help=The workflow to use for the department description.
createform.workflow.label=Workflow
createform.cancel=Cancel
createform.submit=Create department

View File

@ -5,3 +5,16 @@ authoringsteps.description.label=Beschreibung
scidepartment.edit.denied=Zugriff verweigert.
authoringsteps.basicproperties.description=Basiseigenschaften der Abteilung.
authoringsteps.basicproperties.label=Basiseigenschaften
createstep.title=Neue Abteilungsbeschriebung anlegen
createstep.name.help=Der Name des neuen Abteilungsbeschreibung. Wird auch als URL-Fragment genutzt.
createstep.name.label=Name
createform.initial_locale.help=Die initiale Sprache der Abteilungsbeschreibung.
createform.initial_locale.label=Zusammenfassung
createform.title.help=Der Titel des Abteilung.
createform.title.label=Titel
createform.summary.help=Eine Zusammenfassung der Beschreibung der Abteilung
createform.summary.label=Zusammenfassung
createform.workflow.help=Der Arbeitsablauf, der f\u00fcr die Abteilungsbeschreibung genutzt werden soll.
createform.workflow.label=Arbeitsablauf
createform.cancel=Abbrechen
createform.submit=Abteilung anlegen