- Im ProjectsTab von Abteilungen und Instituten sind die aktuellesten n Projekte jetzt auf laufende beschränkt
- Ein zugewiesener Kontakt wird jetzt im SummaryTab für Abteilungen und Institute ausgegeben. git-svn-id: https://svn.libreccm.org/ccm/trunk@1389 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
e27f16659d
commit
67a96f7956
|
|
@ -112,23 +112,26 @@ public class SciDepartmentProjectsTab implements GenericOrgaUnitTab {
|
||||||
projects.addOrder("title asc");
|
projects.addOrder("title asc");
|
||||||
|
|
||||||
if (((Globalization.decodeParameter(request, STATUS_PARAM) == null)
|
if (((Globalization.decodeParameter(request, STATUS_PARAM) == null)
|
||||||
|| Globalization.decodeParameter(request, STATUS_PARAM).trim().isEmpty()
|
|| Globalization.decodeParameter(request, STATUS_PARAM).trim().
|
||||||
|| CompareFilter.NONE.equals(Globalization.decodeParameter(request, STATUS_PARAM)))
|
isEmpty()
|
||||||
|
|| CompareFilter.NONE.equals(
|
||||||
|
Globalization.decodeParameter(request, STATUS_PARAM)))
|
||||||
&& ((Globalization.decodeParameter(request, TITLE_PARAM) == null)
|
&& ((Globalization.decodeParameter(request, TITLE_PARAM) == null)
|
||||||
|| Globalization.decodeParameter(request, TITLE_PARAM).trim().isEmpty())) {
|
|| Globalization.decodeParameter(request, TITLE_PARAM).trim().
|
||||||
|
isEmpty())) {
|
||||||
|
|
||||||
statusFilter.generateXml(filtersElem);
|
statusFilter.generateXml(filtersElem);
|
||||||
|
|
||||||
depProjectsElem.newChildElement("greeting");
|
depProjectsElem.newChildElement("greeting");
|
||||||
|
|
||||||
//projects.addOrder("projectEnd desc");
|
final Calendar now = new GregorianCalendar();
|
||||||
//projects.addOrder("projectBegin desc");
|
final String today = String.format("%d-%02d-%02d",
|
||||||
//projects.addOrder("projectEnd desc nulls last");
|
now.get(Calendar.YEAR),
|
||||||
//projects.addOrder("projectBegin desc nulls last");
|
now.get(Calendar.MONTH) + 1,
|
||||||
//projects.addOrderWithNull("projectEnd", new Date(0), false);
|
now.get(Calendar.DAY_OF_MONTH));
|
||||||
//projects.addOrderWithNull("projectBegin", new Date(0), false);
|
|
||||||
//projects.addOrder("title");
|
|
||||||
|
|
||||||
|
projects.addFilter(String.format(
|
||||||
|
"(projectEnd >= '%s') or (projectEnd is null)", today));
|
||||||
projects.setRange(1, config.getGreetingSize() + 1);
|
projects.setRange(1, config.getGreetingSize() + 1);
|
||||||
|
|
||||||
titleFilter.generateXml(filtersElem);
|
titleFilter.generateXml(filtersElem);
|
||||||
|
|
@ -153,8 +156,10 @@ public class SciDepartmentProjectsTab implements GenericOrgaUnitTab {
|
||||||
config.getPageSize());
|
config.getPageSize());
|
||||||
|
|
||||||
if ((paginator.getPageCount() > config.getEnableSearchLimit())
|
if ((paginator.getPageCount() > config.getEnableSearchLimit())
|
||||||
|| ((Globalization.decodeParameter(request, TITLE_PARAM) != null)
|
|| ((Globalization.decodeParameter(request, TITLE_PARAM)
|
||||||
|| !(Globalization.decodeParameter(request, TITLE_PARAM).trim().isEmpty()))) {
|
!= null)
|
||||||
|
|| !(Globalization.decodeParameter(request, TITLE_PARAM).
|
||||||
|
trim().isEmpty()))) {
|
||||||
titleFilter.generateXml(filtersElem);
|
titleFilter.generateXml(filtersElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +235,8 @@ public class SciDepartmentProjectsTab implements GenericOrgaUnitTab {
|
||||||
|
|
||||||
private void applyStatusFilter(final DataQuery projects,
|
private void applyStatusFilter(final DataQuery projects,
|
||||||
final HttpServletRequest request) {
|
final HttpServletRequest request) {
|
||||||
final String statusValue = Globalization.decodeParameter(request, STATUS_PARAM);
|
final String statusValue = Globalization.decodeParameter(request,
|
||||||
|
STATUS_PARAM);
|
||||||
if ((statusValue != null) && !(statusValue.trim().isEmpty())) {
|
if ((statusValue != null) && !(statusValue.trim().isEmpty())) {
|
||||||
statusFilter.setValue(statusValue);
|
statusFilter.setValue(statusValue);
|
||||||
}
|
}
|
||||||
|
|
@ -243,7 +249,8 @@ public class SciDepartmentProjectsTab implements GenericOrgaUnitTab {
|
||||||
|
|
||||||
private void applyTitleFilter(final DataQuery projects,
|
private void applyTitleFilter(final DataQuery projects,
|
||||||
final HttpServletRequest request) {
|
final HttpServletRequest request) {
|
||||||
final String titleValue = Globalization.decodeParameter(request, TITLE_PARAM);
|
final String titleValue = Globalization.decodeParameter(request,
|
||||||
|
TITLE_PARAM);
|
||||||
if ((titleValue != null) && !(titleValue.trim().isEmpty())) {
|
if ((titleValue != null) && !(titleValue.trim().isEmpty())) {
|
||||||
titleFilter.setValue(titleValue);
|
titleFilter.setValue(titleValue);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitSubordinateCollection;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitSubordinateCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||||
|
|
@ -59,6 +61,10 @@ public class SciDepartmentSummaryTab implements GenericOrgaUnitTab {
|
||||||
generateSubDepartmentsXml(department, departmentSummaryElem, state);
|
generateSubDepartmentsXml(department, departmentSummaryElem, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.isShowingContacts()) {
|
||||||
|
generateContactsXml(department, departmentSummaryElem, state);
|
||||||
|
}
|
||||||
|
|
||||||
logger.debug(String.format("Generated XML for summary tab of department "
|
logger.debug(String.format("Generated XML for summary tab of department "
|
||||||
+ "'%s' in %d ms.",
|
+ "'%s' in %d ms.",
|
||||||
orgaunit.getName(),
|
orgaunit.getName(),
|
||||||
|
|
@ -213,6 +219,41 @@ public class SciDepartmentSummaryTab implements GenericOrgaUnitTab {
|
||||||
System.currentTimeMillis() - start));
|
System.currentTimeMillis() - start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void generateContactsXml(final SciDepartment department,
|
||||||
|
final Element parent,
|
||||||
|
final PageState state) {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
|
final GenericOrganizationalUnitContactCollection contacts = department.
|
||||||
|
getContacts();
|
||||||
|
|
||||||
|
if ((contacts == null) || contacts.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Element contactsElem = parent.newChildElement("contacts");
|
||||||
|
|
||||||
|
while (contacts.next()) {
|
||||||
|
generateContactXml(contacts.getContact(), contactsElem, state);
|
||||||
|
}
|
||||||
|
logger.debug(String.format("Generated XML for contacts of project '%s'"
|
||||||
|
+ " in %d ms.",
|
||||||
|
department.getName(),
|
||||||
|
System.currentTimeMillis() - start));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void generateContactXml(final GenericContact contact,
|
||||||
|
final Element parent,
|
||||||
|
final PageState state) {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
|
final XmlGenerator generator = new XmlGenerator(contact);
|
||||||
|
generator.setUseExtraXml(false);
|
||||||
|
generator.setItemElemName("contact", "");
|
||||||
|
generator.generateXML(state, parent, "");
|
||||||
|
logger.debug(String.format("Generated XML for contact '%s' in %d ms.",
|
||||||
|
contact.getName(),
|
||||||
|
System.currentTimeMillis() - start));
|
||||||
|
}
|
||||||
|
|
||||||
private class XmlGenerator extends SimpleXMLGenerator {
|
private class XmlGenerator extends SimpleXMLGenerator {
|
||||||
|
|
||||||
private final ContentItem item;
|
private final ContentItem item;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public class SciDepartmentSummaryTabConfig extends AbstractConfig {
|
||||||
private final Parameter headRole;
|
private final Parameter headRole;
|
||||||
private final Parameter activeStatus;
|
private final Parameter activeStatus;
|
||||||
private final Parameter showSubDepartments;
|
private final Parameter showSubDepartments;
|
||||||
|
private final Parameter showContacts;
|
||||||
|
|
||||||
public SciDepartmentSummaryTabConfig() {
|
public SciDepartmentSummaryTabConfig() {
|
||||||
|
|
||||||
|
|
@ -41,10 +42,16 @@ public class SciDepartmentSummaryTabConfig extends AbstractConfig {
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
showContacts = new BooleanParameter(
|
||||||
|
"com.arsdigita.cms.contenttypes.scidepartment.summarytab.contacts.show",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
true);
|
||||||
|
|
||||||
register(showHeads);
|
register(showHeads);
|
||||||
register(headRole);
|
register(headRole);
|
||||||
register(activeStatus);
|
register(activeStatus);
|
||||||
register(showSubDepartments);
|
register(showSubDepartments);
|
||||||
|
register(showContacts);
|
||||||
|
|
||||||
loadInfo();
|
loadInfo();
|
||||||
}
|
}
|
||||||
|
|
@ -64,4 +71,8 @@ public class SciDepartmentSummaryTabConfig extends AbstractConfig {
|
||||||
public final boolean isShowingSubDepartment() {
|
public final boolean isShowingSubDepartment() {
|
||||||
return (Boolean) get(showSubDepartments);
|
return (Boolean) get(showSubDepartments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean isShowingContacts() {
|
||||||
|
return (Boolean) get(showContacts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,17 @@ com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.show.purpose = Sho
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.show.example = true
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.show.example = true
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.show.format = [Boolean]
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.show.format = [Boolean]
|
||||||
|
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role = Role of the heads of the department
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role.title = Role of the heads of the department
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role = Role of the heads of the department. This is an attribute of the association between GenericOrganizationalUnit and GenericPerson. This value may contains more than value, separated by ','.
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role.purpose = Role of the heads of the department. This is an attribute of the association between GenericOrganizationalUnit and GenericPerson. This value may contains more than value, separated by ','.
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role = active,heading
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role.example = active,heading
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role = [String]
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.role.format = [String]
|
||||||
|
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active = Status of active members
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active.title = Status of active members
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active = Status of the active members of the department. Used to filter out former heads. This is an attribute of the association between GenericOrganizationalUnit and GenericPerson. This value may contains more than value, separated by ','.
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active.purpose = Status of the active members of the department. Used to filter out former heads. This is an attribute of the association between GenericOrganizationalUnit and GenericPerson. This value may contains more than value, separated by ','.
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active = former,formerHead
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active.example = former,formerHead
|
||||||
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active = [String]
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.heads.status.active.format = [String]
|
||||||
|
|
||||||
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.contacts.show.title = Show contact?
|
||||||
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.contacts.show.purpose = Show contact?
|
||||||
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.contacts.show.example = true
|
||||||
|
com.arsdigita.cms.contenttypes.scidepartment.summarytab.contacts.show.format = [Boolean]
|
||||||
|
|
@ -114,20 +114,26 @@ public class SciInstituteProjectsTab implements GenericOrgaUnitTab {
|
||||||
projects.addOrder("title asc");
|
projects.addOrder("title asc");
|
||||||
|
|
||||||
if (((Globalization.decodeParameter(request, STATUS_PARAM) == null)
|
if (((Globalization.decodeParameter(request, STATUS_PARAM) == null)
|
||||||
|| Globalization.decodeParameter(request, STATUS_PARAM).trim().isEmpty()
|
|| Globalization.decodeParameter(request, STATUS_PARAM).trim().
|
||||||
|| CompareFilter.NONE.equals(Globalization.decodeParameter(request, STATUS_PARAM)))
|
isEmpty()
|
||||||
|
|| CompareFilter.NONE.equals(
|
||||||
|
Globalization.decodeParameter(request, STATUS_PARAM)))
|
||||||
&& ((Globalization.decodeParameter(request, TITLE_PARAM) == null)
|
&& ((Globalization.decodeParameter(request, TITLE_PARAM) == null)
|
||||||
|| Globalization.decodeParameter(request, TITLE_PARAM).trim().isEmpty())) {
|
|| Globalization.decodeParameter(request, TITLE_PARAM).trim().
|
||||||
|
isEmpty())) {
|
||||||
|
|
||||||
statusFilter.generateXml(filtersElem);
|
statusFilter.generateXml(filtersElem);
|
||||||
|
|
||||||
depProjectsElem.newChildElement("greeting");
|
depProjectsElem.newChildElement("greeting");
|
||||||
|
|
||||||
//projects.addOrder("projectEnd desc nulls last");
|
final Calendar now = new GregorianCalendar();
|
||||||
//projects.addOrder("projectBegin desc nulls last");
|
final String today = String.format("%d-%02d-%02d",
|
||||||
//projects.addOrderWithNull("projectEnd", null, false);
|
now.get(Calendar.YEAR),
|
||||||
//projects.addOrderWithNull("projectBegin", null, false);
|
now.get(Calendar.MONTH) + 1,
|
||||||
//projects.addOrder("title");
|
now.get(Calendar.DAY_OF_MONTH));
|
||||||
|
|
||||||
|
projects.addFilter(String.format(
|
||||||
|
"(projectEnd >= '%s') or (projectEnd is null)", today));
|
||||||
|
|
||||||
projects.setRange(1, config.getGreetingSize() + 1);
|
projects.setRange(1, config.getGreetingSize() + 1);
|
||||||
|
|
||||||
|
|
@ -153,8 +159,10 @@ public class SciInstituteProjectsTab implements GenericOrgaUnitTab {
|
||||||
config.getPageSize());
|
config.getPageSize());
|
||||||
|
|
||||||
if ((paginator.getPageCount() > config.getEnableSearchLimit())
|
if ((paginator.getPageCount() > config.getEnableSearchLimit())
|
||||||
|| ((Globalization.decodeParameter(request, TITLE_PARAM) != null)
|
|| ((Globalization.decodeParameter(request, TITLE_PARAM)
|
||||||
|| !(Globalization.decodeParameter(request, TITLE_PARAM).trim().isEmpty()))) {
|
!= null)
|
||||||
|
|| !(Globalization.decodeParameter(request, TITLE_PARAM).
|
||||||
|
trim().isEmpty()))) {
|
||||||
titleFilter.generateXml(filtersElem);
|
titleFilter.generateXml(filtersElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +238,8 @@ public class SciInstituteProjectsTab implements GenericOrgaUnitTab {
|
||||||
|
|
||||||
private void applyStatusFilter(final DataQuery projects,
|
private void applyStatusFilter(final DataQuery projects,
|
||||||
final HttpServletRequest request) {
|
final HttpServletRequest request) {
|
||||||
final String statusValue = Globalization.decodeParameter(request, STATUS_PARAM);
|
final String statusValue = Globalization.decodeParameter(request,
|
||||||
|
STATUS_PARAM);
|
||||||
if ((statusValue != null) && !(statusValue.trim().isEmpty())) {
|
if ((statusValue != null) && !(statusValue.trim().isEmpty())) {
|
||||||
statusFilter.setValue(statusValue);
|
statusFilter.setValue(statusValue);
|
||||||
}
|
}
|
||||||
|
|
@ -243,7 +252,8 @@ public class SciInstituteProjectsTab implements GenericOrgaUnitTab {
|
||||||
|
|
||||||
private void applyTitleFilter(final DataQuery projects,
|
private void applyTitleFilter(final DataQuery projects,
|
||||||
final HttpServletRequest request) {
|
final HttpServletRequest request) {
|
||||||
final String titleValue = Globalization.decodeParameter(request, TITLE_PARAM);
|
final String titleValue = Globalization.decodeParameter(request,
|
||||||
|
TITLE_PARAM);
|
||||||
if ((titleValue != null) && !(titleValue.trim().isEmpty())) {
|
if ((titleValue != null) && !(titleValue.trim().isEmpty())) {
|
||||||
titleFilter.setValue(titleValue);
|
titleFilter.setValue(titleValue);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitSubordinateCollection;
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitSubordinateCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||||
|
|
@ -59,6 +61,10 @@ public class SciInstituteSummaryTab implements GenericOrgaUnitTab {
|
||||||
generateDepartmentsXml(institute, instituteSummaryElem, state);
|
generateDepartmentsXml(institute, instituteSummaryElem, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.isShowingContacts()) {
|
||||||
|
generateContactsXml(institute, instituteSummaryElem, state);
|
||||||
|
}
|
||||||
|
|
||||||
logger.debug(String.format("Generated XML for summary tab of institute "
|
logger.debug(String.format("Generated XML for summary tab of institute "
|
||||||
+ "'%s' in %d ms.",
|
+ "'%s' in %d ms.",
|
||||||
orgaunit.getName(),
|
orgaunit.getName(),
|
||||||
|
|
@ -266,6 +272,41 @@ public class SciInstituteSummaryTab implements GenericOrgaUnitTab {
|
||||||
System.currentTimeMillis() - start));
|
System.currentTimeMillis() - start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void generateContactsXml(final SciInstitute department,
|
||||||
|
final Element parent,
|
||||||
|
final PageState state) {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
|
final GenericOrganizationalUnitContactCollection contacts = department.
|
||||||
|
getContacts();
|
||||||
|
|
||||||
|
if ((contacts == null) || contacts.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Element contactsElem = parent.newChildElement("contacts");
|
||||||
|
|
||||||
|
while (contacts.next()) {
|
||||||
|
generateContactXml(contacts.getContact(), contactsElem, state);
|
||||||
|
}
|
||||||
|
logger.debug(String.format("Generated XML for contacts of project '%s'"
|
||||||
|
+ " in %d ms.",
|
||||||
|
department.getName(),
|
||||||
|
System.currentTimeMillis() - start));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void generateContactXml(final GenericContact contact,
|
||||||
|
final Element parent,
|
||||||
|
final PageState state) {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
|
final XmlGenerator generator = new XmlGenerator(contact);
|
||||||
|
generator.setUseExtraXml(false);
|
||||||
|
generator.setItemElemName("contact", "");
|
||||||
|
generator.generateXML(state, parent, "");
|
||||||
|
logger.debug(String.format("Generated XML for contact '%s' in %d ms.",
|
||||||
|
contact.getName(),
|
||||||
|
System.currentTimeMillis() - start));
|
||||||
|
}
|
||||||
|
|
||||||
private class XmlGenerator extends SimpleXMLGenerator {
|
private class XmlGenerator extends SimpleXMLGenerator {
|
||||||
|
|
||||||
private final ContentItem item;
|
private final ContentItem item;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public class SciInstituteSummaryTabConfig extends AbstractConfig {
|
||||||
private final Parameter headRole;
|
private final Parameter headRole;
|
||||||
private final Parameter activeStatus;
|
private final Parameter activeStatus;
|
||||||
private final Parameter showDepartments;
|
private final Parameter showDepartments;
|
||||||
|
private final Parameter showContacts;
|
||||||
|
|
||||||
public SciInstituteSummaryTabConfig() {
|
public SciInstituteSummaryTabConfig() {
|
||||||
showHeads =
|
showHeads =
|
||||||
|
|
@ -42,10 +43,17 @@ public class SciInstituteSummaryTabConfig extends AbstractConfig {
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
showContacts =
|
||||||
|
new BooleanParameter(
|
||||||
|
"com.arsdigita.cms.contenttypes.sciinstitute.summarytab.contacts.show",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
true);
|
||||||
|
|
||||||
register(showHeads);
|
register(showHeads);
|
||||||
register(headRole);
|
register(headRole);
|
||||||
register(activeStatus);
|
register(activeStatus);
|
||||||
register(showDepartments);
|
register(showDepartments);
|
||||||
|
register(showContacts);
|
||||||
|
|
||||||
loadInfo();
|
loadInfo();
|
||||||
}
|
}
|
||||||
|
|
@ -65,4 +73,8 @@ public class SciInstituteSummaryTabConfig extends AbstractConfig {
|
||||||
public final Boolean isShowingDepartments() {
|
public final Boolean isShowingDepartments() {
|
||||||
return (Boolean) get(showDepartments);
|
return (Boolean) get(showDepartments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean isShowingContacts() {
|
||||||
|
return (Boolean) get(showContacts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,8 @@ com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.title =
|
||||||
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.purpose = Show departments?
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.purpose = Show departments?
|
||||||
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.example = true
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.example = true
|
||||||
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.format = [Boolean]
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.departments.show.format = [Boolean]
|
||||||
|
|
||||||
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.contacts.show.title = Show contact?
|
||||||
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.contacts.show.purpose = Show contact?
|
||||||
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.contacts.show.example = true
|
||||||
|
com.arsdigita.cms.contenttypes.sciinstitute.summarytab.contacts.show.format = [Boolean]
|
||||||
Loading…
Reference in New Issue