Fixed some bugs
parent
6a795bb049
commit
c094c8aa58
|
|
@ -0,0 +1,29 @@
|
||||||
|
package org.scientificcms.contenttypes.sciproject.ui;
|
||||||
|
|
||||||
|
import org.libreccm.configuration.ConfigurationManager;
|
||||||
|
import org.libreccm.ui.AbstractMessagesBean;
|
||||||
|
import org.scientificcms.contenttypes.sciproject.SciProjectConfig;
|
||||||
|
|
||||||
|
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("SciProjectContactTypes")
|
||||||
|
public class SciProjectContactTypes extends AbstractMessagesBean {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ConfigurationManager confManager;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getMessageBundle() {
|
||||||
|
return confManager
|
||||||
|
.findConfiguration(SciProjectConfig.class)
|
||||||
|
.getContactTypesBundleName();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package org.scientificcms.contenttypes.sciproject.ui;
|
||||||
|
|
||||||
|
import org.libreccm.configuration.ConfigurationManager;
|
||||||
|
import org.libreccm.ui.AbstractMessagesBean;
|
||||||
|
import org.scientificcms.contenttypes.sciproject.SciProjectConfig;
|
||||||
|
|
||||||
|
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("SciProjectRoles")
|
||||||
|
public class SciProjectRoles extends AbstractMessagesBean {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ConfigurationManager confManager;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getMessageBundle() {
|
||||||
|
return confManager
|
||||||
|
.findConfiguration(SciProjectConfig.class)
|
||||||
|
.getMemberRolesBundleName();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
<h:outputText escape="false"
|
<h:outputText escape="false"
|
||||||
value="#{SciProjectDescriptionModel.descriptionValues.get(SciProjectDescriptionModel.selectedLocale)}" />
|
value="#{SciProjectDescriptionModel.descriptionValues.get(SciProjectDescriptionModel.selectedLocale)}" />
|
||||||
</div>
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
#{SciProjectMessageBundle.getMessage('description_step.errors.contactable_not_found', [contactableNotFound])}
|
#{SciProjectMessageBundle.getMessage('description_step.errors.contactable_not_found', [contactableNotFound])}
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:if test="#{personNotFound != null}">
|
<c:if test="#{personNotFound != null}">
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
#{SciProjectMessageBundle.getMessage('description_step.errors.person_not_found', [personNotFound])}
|
#{SciProjectMessageBundle.getMessage('description_step.errors.person_not_found', [personNotFound])}
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:if test="#{illegalStatusValue != null}">
|
<c:if test="#{illegalStatusValue != null}">
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
#{SciProjectMessageBundle.getMessage('description_step.errors.illegal_member_status_value', [illegalStatusValue])}
|
#{SciProjectMessageBundle.getMessage('description_step.errors.illegal_member_status_value', [illegalStatusValue])}
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
|
|
||||||
<librecms:cmsEditorVariants
|
<librecms:cmsEditorVariants
|
||||||
addButtonLabel="#{SciProjectMessageBundle['description.editor.add_variant']}"
|
addButtonLabel="#{SciProjectMessageBundle['description.editor.add_variant']}"
|
||||||
addDialogLocaleSelectHelp="#{SciProjectMessageBundle['description.editor.add.locale.help']}"
|
addDialogLocaleSelectHelp="#{SciProjectMessageBundle['description.editor.add.locale.help']}"
|
||||||
|
|
@ -80,11 +80,12 @@
|
||||||
contentSection="#{ContentSectionModel.sectionName}"
|
contentSection="#{ContentSectionModel.sectionName}"
|
||||||
dialogTitle="#{SciProjectMessageBundle['contact.add.title']}"
|
dialogTitle="#{SciProjectMessageBundle['contact.add.title']}"
|
||||||
formParamName="contactableUuid">
|
formParamName="contactableUuid">
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupSelect
|
||||||
help="#{SciProjectMessageBundle['contacts.type.help']}"
|
help="#{SciProjectMessageBundle['contacts.type.help']}"
|
||||||
inputId="type"
|
inputId="type"
|
||||||
label="#{SciProjectMessageBundle['contacts.type.label']}"
|
label="#{SciProjectMessageBundle['contacts.type.label']}"
|
||||||
name="type"
|
name="type"
|
||||||
|
options="#{SciProjectContactTypes}"
|
||||||
/>
|
/>
|
||||||
</librecms:assetPicker>
|
</librecms:assetPicker>
|
||||||
<button class="btn btn-secondary contacts-save-order-button"
|
<button class="btn btn-secondary contacts-save-order-button"
|
||||||
|
|
@ -133,7 +134,7 @@
|
||||||
</c:if>
|
</c:if>
|
||||||
#{contact.contactable}
|
#{contact.contactable}
|
||||||
</td>
|
</td>
|
||||||
<td>#{contact.contactType}</td>
|
<td>#{SciProjectContactTables[contact.contactType]}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-secondary"
|
<button class="btn btn-secondary"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
|
|
@ -149,7 +150,7 @@
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-description/contacts/edit/#{contact.contactId}"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-description/contacts/edit/#{contact.contactId}"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title"
|
<h4 class="modal-title"
|
||||||
|
|
@ -165,12 +166,13 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupSelect
|
||||||
help="#{SciProjectMessageBundle['contacts.edit.type.help']}"
|
help="#{SciProjectMessageBundle['contacts.edit.type.help']}"
|
||||||
inputId="type-edit"
|
inputId="type-edit"
|
||||||
label="#{SciProjectMessageBundle['contacts.edit.type.label']}"
|
label="#{SciProjectMessageBundle['contacts.edit.type.label']}"
|
||||||
name="type"
|
name="type"
|
||||||
value="#{contact.contactType}"
|
options="#{SciProjectContactTypes}"
|
||||||
|
selectedOptions="#{[contact.contactType]}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
@ -197,7 +199,7 @@
|
||||||
dialogId="contact-delete-dialog-#{contact.contactId}"
|
dialogId="contact-delete-dialog-#{contact.contactId}"
|
||||||
dialogTitle="#{SciProjectMessageBundle['contacts.delete.title']}"
|
dialogTitle="#{SciProjectMessageBundle['contacts.delete.title']}"
|
||||||
message="#{SciProjectMessageBundle.getMessage('contacts.delete.message', [contact.contactable, contact.contactType])}"
|
message="#{SciProjectMessageBundle.getMessage('contacts.delete.message', [contact.contactable, contact.contactType])}"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -226,11 +228,12 @@
|
||||||
dialogTitle="#{SciProjectMessageBundle['memberships.add.title']}"
|
dialogTitle="#{SciProjectMessageBundle['memberships.add.title']}"
|
||||||
formParamName="personUuid">
|
formParamName="personUuid">
|
||||||
|
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupSelect
|
||||||
help="#{SciProjectMessageBundle['memberships.role.help']}"
|
help="#{SciProjectMessageBundle['memberships.role.help']}"
|
||||||
inputId="type"
|
inputId="role"
|
||||||
label="#{SciProjectMessageBundle['memberships.role.label']}"
|
label="#{SciProjectMessageBundle['memberships.role.label']}"
|
||||||
name="role"
|
name="role"
|
||||||
|
options="#{SciProjectRoles}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<bootstrap:formGroupSelect
|
<bootstrap:formGroupSelect
|
||||||
|
|
@ -265,7 +268,7 @@
|
||||||
#{member.name}
|
#{member.name}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
#{member.role}
|
#{SciProjectRoles[member.role]}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
#{member.status}
|
#{member.status}
|
||||||
|
|
@ -300,12 +303,13 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupSelect
|
||||||
help="#{SciProjectMessageBundle['memberships.edit.role.help']}"
|
help="#{SciProjectMessageBundle['memberships.role.help']}"
|
||||||
inputId="role"
|
inputId="role"
|
||||||
label="#{SciProjectMessageBundle['memberships.edit.role.label']}"
|
label="#{SciProjectMessageBundle['memberships.role.label']}"
|
||||||
name="role"
|
name="role"
|
||||||
value="#{member.role}"
|
options="#{SciProjectRoles}"
|
||||||
|
selectedOptions="#{[member.role]}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<bootstrap:formGroupSelect
|
<bootstrap:formGroupSelect
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
member=Member
|
||||||
|
head=Department head
|
||||||
|
deputy_head=Deputy department head
|
||||||
|
associated_member=Associated member
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
member=Mitglied
|
||||||
|
head=Abteilungsleitung
|
||||||
|
deputy_head=Stellvertretende Abteilungsleitung
|
||||||
|
associated_member=Assoziertes Mitglied
|
||||||
Loading…
Reference in New Issue