Fixed some bugs

pull/1/head
Jens Pelzetter 2022-10-03 13:37:24 +02:00
parent 6a795bb049
commit c094c8aa58
6 changed files with 89 additions and 16 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -31,6 +31,7 @@
<h:outputText escape="false"
value="#{SciProjectDescriptionModel.descriptionValues.get(SciProjectDescriptionModel.selectedLocale)}" />
</div>
</ui:define>
</ui:composition>

View File

@ -18,13 +18,13 @@
#{SciProjectMessageBundle.getMessage('description_step.errors.contactable_not_found', [contactableNotFound])}
</div>
</c:if>
<c:if test="#{personNotFound != null}">
<div class="alert alert-warning" role="alert">
#{SciProjectMessageBundle.getMessage('description_step.errors.person_not_found', [personNotFound])}
</div>
</c:if>
<c:if test="#{illegalStatusValue != null}">
<div class="alert alert-warning" role="alert">
#{SciProjectMessageBundle.getMessage('description_step.errors.illegal_member_status_value', [illegalStatusValue])}
@ -43,7 +43,7 @@
</template>
<div id="messages"></div>
<librecms:cmsEditorVariants
addButtonLabel="#{SciProjectMessageBundle['description.editor.add_variant']}"
addDialogLocaleSelectHelp="#{SciProjectMessageBundle['description.editor.add.locale.help']}"
@ -80,11 +80,12 @@
contentSection="#{ContentSectionModel.sectionName}"
dialogTitle="#{SciProjectMessageBundle['contact.add.title']}"
formParamName="contactableUuid">
<bootstrap:formGroupText
<bootstrap:formGroupSelect
help="#{SciProjectMessageBundle['contacts.type.help']}"
inputId="type"
label="#{SciProjectMessageBundle['contacts.type.label']}"
name="type"
options="#{SciProjectContactTypes}"
/>
</librecms:assetPicker>
<button class="btn btn-secondary contacts-save-order-button"
@ -133,7 +134,7 @@
</c:if>
#{contact.contactable}
</td>
<td>#{contact.contactType}</td>
<td>#{SciProjectContactTables[contact.contactType]}</td>
<td>
<button class="btn btn-secondary"
data-toggle="modal"
@ -149,7 +150,7 @@
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-description/contacts/edit/#{contact.contactId}"
class="modal-content"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
@ -165,12 +166,13 @@
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupText
<bootstrap:formGroupSelect
help="#{SciProjectMessageBundle['contacts.edit.type.help']}"
inputId="type-edit"
label="#{SciProjectMessageBundle['contacts.edit.type.label']}"
name="type"
value="#{contact.contactType}"
options="#{SciProjectContactTypes}"
selectedOptions="#{[contact.contactType]}"
/>
</div>
<div class="modal-footer">
@ -197,7 +199,7 @@
dialogId="contact-delete-dialog-#{contact.contactId}"
dialogTitle="#{SciProjectMessageBundle['contacts.delete.title']}"
message="#{SciProjectMessageBundle.getMessage('contacts.delete.message', [contact.contactable, contact.contactType])}"
/>
</td>
</tr>
@ -226,11 +228,12 @@
dialogTitle="#{SciProjectMessageBundle['memberships.add.title']}"
formParamName="personUuid">
<bootstrap:formGroupText
<bootstrap:formGroupSelect
help="#{SciProjectMessageBundle['memberships.role.help']}"
inputId="type"
inputId="role"
label="#{SciProjectMessageBundle['memberships.role.label']}"
name="role"
options="#{SciProjectRoles}"
/>
<bootstrap:formGroupSelect
@ -265,7 +268,7 @@
#{member.name}
</td>
<td>
#{member.role}
#{SciProjectRoles[member.role]}
</td>
<td>
#{member.status}
@ -300,12 +303,13 @@
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupText
help="#{SciProjectMessageBundle['memberships.edit.role.help']}"
<bootstrap:formGroupSelect
help="#{SciProjectMessageBundle['memberships.role.help']}"
inputId="role"
label="#{SciProjectMessageBundle['memberships.edit.role.label']}"
label="#{SciProjectMessageBundle['memberships.role.label']}"
name="role"
value="#{member.role}"
options="#{SciProjectRoles}"
selectedOptions="#{[member.role]}"
/>
<bootstrap:formGroupSelect

View File

@ -0,0 +1,5 @@
member=Member
head=Department head
deputy_head=Deputy department head
associated_member=Associated member

View File

@ -0,0 +1,5 @@
member=Mitglied
head=Abteilungsleitung
deputy_head=Stellvertretende Abteilungsleitung
associated_member=Assoziertes Mitglied