- Step für Publikationen der Abteilung (spezieller RelatedLink) hinzugefügt

- einige Formatierungen


git-svn-id: https://svn.libreccm.org/ccm/trunk@644 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-12-06 10:37:07 +00:00
parent 47729728d7
commit e1966cbe9f
11 changed files with 120 additions and 25 deletions

View File

@ -13,7 +13,7 @@
<xrd:attributes rule="exclude">
<xrd:property name="/object/organizationDescription"/>
</xrd:attributes>
<!-- <xrd:associations rule="include">
<xrd:associations rule="include">
<xrd:property name="/object/addendum"/>
<xrd:property name="/object/contacts"/>
<xrd:property name="/object/contacts/person"/>
@ -30,7 +30,7 @@
<xrd:property name="/object/persons/contacts"/>
<xrd:property name="/object/persons/contacts/address"/>
<xrd:property name="/object/persons/contacts/contactentries"/>
</xrd:associations>-->
</xrd:associations>
</xrd:adapter>
</xrd:context>

View File

@ -25,16 +25,9 @@ import com.arsdigita.persistence.OID;
import java.math.BigDecimal;
/**
* <p>
* Specialized variant of {@link GenericPerson} for members of scientific
* organizations. Adds two fields to the fields of <code>GenericPerson</code>:
* </p>
* <dl>
* <dt><code>associatedMember</code></dt>
* <dd>Is the member an associated member?</dd>
* <dt><code>formerMember</code></dt>
* <dd>Is the member a former member?</dd>
* </ul>
* A concrete class extending {@link GenericPerson}. Does not add any new
* fields, it just makes the internal type <code>GenericPerson</code> usable
* without any other modules.
*
* @author Jens Pelzetter
*/

View File

@ -25,6 +25,7 @@ public class SciOrganizationConfig extends AbstractConfig {
private final Parameter m_departmentSetOrganizationHide;
private final Parameter m_departmentSetSuperDepartmentHide;
private final Parameter m_departmentAddContactHide;
private final Parameter m_departmentPublicationsHide;
private final Parameter m_projectAddPersonHide;
private final Parameter m_projectAddOrganizationHide;
private final Parameter m_projectAddDepartmentHide;
@ -98,6 +99,10 @@ public class SciOrganizationConfig extends AbstractConfig {
"com.arsdigita.cms.contenttypes.scidepartment.add_contact_hide",
Parameter.REQUIRED,
Boolean.FALSE);
m_departmentPublicationsHide = new BooleanParameter(
"com.arsdigita.cms.contenttypes.scidepartment.publications_hide",
Parameter.REQUIRED,
Boolean.FALSE);
m_projectAddPersonHide = new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciproject.add_person_hide",
Parameter.REQUIRED,
@ -170,6 +175,7 @@ public class SciOrganizationConfig extends AbstractConfig {
register(m_departmentAddProjectHide);
register(m_departmentSetOrganizationHide);
register(m_departmentSetSuperDepartmentHide);
register(m_departmentPublicationsHide);
register(m_projectAddPersonHide);
register(m_projectAddOrganizationHide);
@ -251,6 +257,10 @@ public class SciOrganizationConfig extends AbstractConfig {
return (Boolean) get(m_departmentAddContactHide);
}
public final boolean getDepartmentPublicationsHide() {
return (Boolean) get(m_departmentPublicationsHide);
}
public final boolean getProjectAddPersonHide() {
return (Boolean) get(m_projectAddPersonHide);
}

View File

@ -133,3 +133,7 @@ com.arsdigita.cms.contenttypes.sciorganization.members_merge.purpose = Merge mem
com.arsdigita.cms.contenttypes.sciorganization.members_merge.example = false
com.arsdigita.cms.contenttypes.sciorganization.members_merge.format = [boolean]
com.arsdigita.cms.contenttypes.scidepartment.publications_hide.title = Hides the step for linking publications with a department
com.arsdigita.cms.contenttypes.scidepartment.publications_hide.purpose = Hides the step for linking publications with a department
com.arsdigita.cms.contenttypes.scidepartment.publications_hide.example = false
com.arsdigita.cms.contenttypes.scidepartment.publications_hide.format = [boolean]

View File

@ -21,6 +21,8 @@ package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.Label;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.ContentTypeCollection;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.contenttypes.SciOrganizationConfig;
@ -130,5 +132,21 @@ public class SciDepartmentPropertiesStep
SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.department.organization"));
}
ContentTypeCollection contentTypes = ContentType.getAllContentTypes();
contentTypes.addFilter("associatedObjectType = :type").set(
"type",
"com.arsdigita.cms.contenttypes.Publication");
if ((!config.getDepartmentPublicationsHide())
&& (contentTypes.size() > 0)) {
/*
* Must add this step manually since the basic class is not
* SimpleEditStep...
*/
getSegmentedPanel().addSegment(new Label(SciOrganizationGlobalizationUtil.
globalize("sciorganization.ui.department.publications")),
new SciDepartmentPublicationsStep(
itemModel, parent));
}
}
}

View File

@ -0,0 +1,41 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contentassets.ui.RelatedLinkPropertiesStep;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
/**
*
* @author Jens Pelzetter
*/
public class SciDepartmentPublicationsStep extends RelatedLinkPropertiesStep {
protected String m_linkListName = "SciDepartmentPublications";
protected ContentType m_contentType = ContentType.findByAssociatedObjectType(
"com.arsdigita.cms.contenttypes.Publication");
public SciDepartmentPublicationsStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
super(itemModel, parent);
}
}

View File

@ -1,7 +1,25 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.PageState;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciMember;
@ -9,7 +27,6 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**

View File

@ -20,16 +20,11 @@
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.form.CheckboxGroup;
import com.arsdigita.bebop.form.Option;
import com.arsdigita.bebop.parameters.ArrayParameter;
import com.arsdigita.bebop.parameters.BooleanParameter;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciMember;
@ -49,11 +44,11 @@ public class SciMemberPropertyForm
implements FormInitListener,
FormSubmissionListener {
private static final Logger logger =
/*private static final Logger logger =
Logger.getLogger(SciMemberPropertyForm.class);
private SciMemberPropertiesStep m_step;
private CheckboxGroup m_associated;
private CheckboxGroup m_former;
private CheckboxGroup m_former;*/
public SciMemberPropertyForm(ItemSelectionModel itemModel) {
this(itemModel, null);
@ -62,7 +57,7 @@ public class SciMemberPropertyForm
public SciMemberPropertyForm(ItemSelectionModel itemModel,
SciMemberPropertiesStep step) {
super(itemModel);
m_step = step;
//m_step = step;
}
@Override

View File

@ -134,3 +134,4 @@ sciorganization.ui.project.add_member\ =Add member
sciorganization.ui.project.subproject..confirm_remove=Are you sure to remove this subproject?
sciorganization.ui.project.superproject..confirm_remove=Are you sure to remove the superior project?
sciorganization.ui.project.add_member=Add member
sciorganization.ui.department.publications=Publications of the department

View File

@ -134,3 +134,4 @@ sciorganization.ui.project.add_member\ =Mitglied hinzuf\u00fcgen
sciorganization.ui.project.subproject..confirm_remove=Sind sie sicher das sie dieses Unterprojekt entfernen wollen?
sciorganization.ui.project.superproject..confirm_remove=Wollen sie dieses \u00fcbergeordnete Projekt wirklich entfernen?
sciorganization.ui.project.add_member=Mitglied hinzuf\u00fcgen
sciorganization.ui.department.publications=Publikationen der Abteilung

View File

@ -1,6 +1,21 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;