diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java
index f4b724698..61bf8b72c 100644
--- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java
+++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java
@@ -145,7 +145,7 @@ public class ArticleInJournalPropertyForm
super.process(fse);
FormData data = fse.getFormData();
- ArticleInJournal article = (ArticleInJournal) initBasicWidgets(fse);
+ ArticleInJournal article = (ArticleInJournal) processBasicWidgets(fse);
if ((article != null) && getSaveCancelSection().getSaveButton().
isSelected(fse.getPageState())) {
diff --git a/ccm-sci-publicpersonalprofile/application.xml b/ccm-sci-publicpersonalprofile/application.xml
index 5b80d01be..06c8a632d 100644
--- a/ccm-sci-publicpersonalprofile/application.xml
+++ b/ccm-sci-publicpersonalprofile/application.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/PublicPersonalProfile.pdl b/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/PublicPersonalProfile.pdl
deleted file mode 100644
index d0bed321e..000000000
--- a/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/PublicPersonalProfile.pdl
+++ /dev/null
@@ -1,25 +0,0 @@
-model com.arsdigita.cms.contenttypes;
-
-import com.arsdigita.kernel.ACSObject;
-import com.arsdigita.cms.*;
-
-object type PublicPersonalProfile extends ContentPage {
-
- String homepageUrl = homepage_url VARCHAR(256);
-
- reference key (ct_public_personal_profiles.profile_id);
-}
-
-association {
-
- PublicPersonalProfile[0..n] profile = join ct_sciorga_members.member_id
- to ct_public_personal_profile_owner_map.owner_id,
- join ct_public_personal_profile_owner_map.profile_id
- to ct_public_personal_profile.profile_id;
-
- SciMember[0..n] owner = join ct_public_personal_profile.profile_id
- to ct_public_personal_profile_owner_map.profile_id,
- join ct_public_personal_profile_owner_map.owner_id
- to ct_sciorga_members.member_id
-}
-
diff --git a/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/SciPublicPersonalProfile.pdl b/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/SciPublicPersonalProfile.pdl
new file mode 100644
index 000000000..18ba3ffab
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/pdl/com/arsdigita/content-types/SciPublicPersonalProfile.pdl
@@ -0,0 +1,27 @@
+model com.arsdigita.cms.contenttypes;
+
+import com.arsdigita.kernel.ACSObject;
+import com.arsdigita.cms.*;
+
+object type SciPublicPersonalProfile extends ContentPage {
+
+ String[0..1] profileUrl = ct_sci_public_personal_profiles.profile_url VARCHAR(256);
+ Boolean[0..1] showPublicationList = ct_sci_public_personal_profiles.show_publication_list BIT;
+ Boolean[0..1] showProjectList = ct_sci_public_personal_profiles.show_project_list BIT;
+
+ reference key (ct_sci_public_personal_profiles.profile_id);
+}
+
+association {
+
+ SciPublicPersonalProfile[0..n] profile = join ct_sciorga_members.member_id
+ to ct_sci_public_personal_profile_owner_map.owner_id,
+ join ct_sci_public_personal_profile_owner_map.profile_id
+ to ct_sci_public_personal_profiles.profile_id;
+
+ SciMember[0..n] owner = join ct_sci_public_personal_profiles.profile_id
+ to ct_sci_public_personal_profile_owner_map.profile_id,
+ join ct_sci_public_personal_profile_owner_map.owner_id
+ to ct_sciorga_members.member_id;
+}
+
diff --git a/ccm-sci-publicpersonalprofile/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml b/ccm-sci-publicpersonalprofile/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml
new file mode 100644
index 000000000..26b4690da
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ccm-sci-publicpersonalprofile/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml b/ccm-sci-publicpersonalprofile/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml
new file mode 100644
index 000000000..42333aa0e
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ccm-sci-publicpersonalprofile/src/ccm-sci-publicpersonalprofile.load b/ccm-sci-publicpersonalprofile/src/ccm-sci-publicpersonalprofile.load
index bf5d0268e..2b35e6e0b 100644
--- a/ccm-sci-publicpersonalprofile/src/ccm-sci-publicpersonalprofile.load
+++ b/ccm-sci-publicpersonalprofile/src/ccm-sci-publicpersonalprofile.load
@@ -1,11 +1,11 @@
-
+
-
-
-
+
+
+
@@ -16,10 +16,10 @@
-
-
+
\ No newline at end of file
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.java
new file mode 100644
index 000000000..f61954dbc
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.java
@@ -0,0 +1,101 @@
+package com.arsdigita.cms.contenttypes;
+
+import com.arsdigita.cms.ContentPage;
+import com.arsdigita.domain.DataObjectNotFoundException;
+import java.math.BigDecimal;
+import com.arsdigita.persistence.OID;
+import com.arsdigita.persistence.DataObject;
+import com.arsdigita.persistence.DataCollection;
+import com.arsdigita.domain.DomainObjectFactory;
+import com.arsdigita.util.Assert;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfile extends ContentPage {
+
+ public static final String OWNER = "owner";
+ public static final String PROFILE_URL = "profileUrl";
+ public static final String SHOW_PUBLICATION_LIST = "showPublicationList";
+ public static final String SHOW_PROJECT_LIST = "showProjectList";
+ public static final String BASE_DATA_OBJECT_TYPE =
+ "com.arsdigita.cms.contenttypes.SciPublicPersonalProfile";
+
+ public SciPublicPersonalProfile() {
+ this(BASE_DATA_OBJECT_TYPE);
+ }
+
+ public SciPublicPersonalProfile(BigDecimal id)
+ throws DataObjectNotFoundException {
+ this(new OID(BASE_DATA_OBJECT_TYPE, id));
+ }
+
+ public SciPublicPersonalProfile(OID oid)
+ throws DataObjectNotFoundException {
+ super(oid);
+ }
+
+ public SciPublicPersonalProfile(DataObject dobj) {
+ super(dobj);
+ }
+
+ public SciPublicPersonalProfile(String type) {
+ super(type);
+ }
+
+ public SciMember getOwner() {
+ final DataCollection collection = (DataCollection) get(OWNER);
+
+ if (0 == collection.size()) {
+ return null;
+ } else {
+ DataObject dobj;
+
+ collection.next();
+ dobj = collection.getDataObject();
+ collection.close();
+
+ return (SciMember) DomainObjectFactory.newInstance(dobj);
+ }
+ }
+
+ public void setOwner(SciMember owner) {
+ SciMember oldOwner;
+
+ oldOwner = getOwner();
+ if (oldOwner != null) {
+ remove(OWNER, oldOwner);
+ }
+
+ if (null != owner) {
+ Assert.exists(owner, SciMember.class);
+ add(OWNER, owner);
+ }
+ }
+
+ public String getProfileUrl() {
+ return (String) get(PROFILE_URL);
+ }
+
+ public void setProfileUrl(String profileUrl) {
+ set(PROFILE_URL, profileUrl);
+ }
+
+ public Boolean getShowPublicationList() {
+ return (Boolean) get(SHOW_PUBLICATION_LIST);
+ }
+
+ public void setShowPublicationList(Boolean showPublicationList) {
+ set(SHOW_PUBLICATION_LIST, showPublicationList);
+ }
+
+ public Boolean getShowProjectList() {
+ return (Boolean) get(SHOW_PROJECT_LIST);
+ }
+
+ public void setShowProjectList(Boolean showProjectList) {
+ set(SHOW_PROJECT_LIST, showProjectList);
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileInitializer.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileInitializer.java
new file mode 100644
index 000000000..1a5cf8f89
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileInitializer.java
@@ -0,0 +1,31 @@
+package com.arsdigita.cms.contenttypes;
+
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfileInitializer extends ContentTypeInitializer {
+
+ private static final Logger logger = Logger.getLogger(SciPublicPersonalProfileInitializer.class);
+
+ public SciPublicPersonalProfileInitializer() {
+ super("ccm-sci-publicpersonalprofile.pdl.mf",
+ SciPublicPersonalProfile.BASE_DATA_OBJECT_TYPE);
+ }
+
+ @Override
+ public String[] getStylesheets() {
+ return new String[]{
+ "/static/content-types/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xsl"
+ };
+ }
+
+ @Override
+ public String getTraversalXML() {
+ return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml";
+
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileLoader.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileLoader.java
new file mode 100644
index 000000000..0baadd849
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/SciPublicPersonalProfileLoader.java
@@ -0,0 +1,23 @@
+package com.arsdigita.cms.contenttypes;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfileLoader extends AbstractContentTypeLoader {
+
+ public SciPublicPersonalProfileLoader() {
+ super();
+ }
+
+ private static final String[] TYPES = {
+ "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/"
+ + "SciPublicPersonalProfile.xml"
+ };
+
+ @Override
+ public String[] getTypes() {
+ return TYPES;
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileCreate.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileCreate.java
new file mode 100644
index 000000000..d09db7916
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileCreate.java
@@ -0,0 +1,143 @@
+package com.arsdigita.cms.contenttypes.ui;
+
+import com.arsdigita.bebop.ColumnPanel;
+import com.arsdigita.bebop.FormData;
+import com.arsdigita.bebop.FormProcessException;
+import com.arsdigita.bebop.Label;
+import com.arsdigita.bebop.PageState;
+import com.arsdigita.bebop.event.FormSectionEvent;
+import com.arsdigita.bebop.parameters.DateParameter;
+import com.arsdigita.bebop.parameters.ParameterModel;
+import com.arsdigita.bebop.util.GlobalizationUtil;
+import com.arsdigita.cms.ContentBundle;
+import com.arsdigita.cms.ContentPage;
+import com.arsdigita.cms.ItemSelectionModel;
+import com.arsdigita.cms.ui.ItemSearchWidget;
+import com.arsdigita.cms.ui.authoring.CreationSelector;
+import com.arsdigita.cms.ui.authoring.PageCreate;
+import com.arsdigita.cms.ContentSection;
+import com.arsdigita.cms.ContentType;
+import com.arsdigita.cms.Folder;
+import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection;
+import com.arsdigita.cms.ui.authoring.LanguageWidget;
+import com.arsdigita.cms.contenttypes.SciMember;
+import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile;
+import com.arsdigita.util.Assert;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfileCreate extends PageCreate {
+
+ private ItemSearchWidget itemSearch;
+ private final String ITEM_SEARCH = "owner";
+
+ public SciPublicPersonalProfileCreate(final ItemSelectionModel itemModel,
+ final CreationSelector parent) {
+ super(itemModel, parent);
+ }
+
+ @Override
+ public void addWidgets() {
+ ContentType type = getItemSelectionModel().getContentType();
+ m_workflowSection = new ApplyWorkflowFormSection(type);
+ add(m_workflowSection, ColumnPanel.INSERT);
+ add(new Label(GlobalizationUtil.globalize(
+ "cms.ui.authoring.content_type")));
+ add(new Label(type.getLabel()));
+ add(new Label(GlobalizationUtil.globalize("cms.ui.language.field")));
+ add(new LanguageWidget(LANGUAGE));
+
+ itemSearch = new ItemSearchWidget(ITEM_SEARCH,
+ ContentType.findByAssociatedObjectType(
+ SciMember.class.getName()));
+ add(itemSearch);
+
+ if (!ContentSection.getConfig().getHideLaunchDate()) {
+ add(new Label(GlobalizationUtil.globalize(
+ "cms.ui.authoring.page_launch_date")));
+ ParameterModel launchDateParam = new DateParameter(LAUNCH_DATE);
+ com.arsdigita.bebop.form.Date launchDate =
+ new com.arsdigita.bebop.form.Date(
+ launchDateParam);
+ if (ContentSection.getConfig().getRequireLaunchDate()) {
+ launchDate.addValidationListener(
+ new LaunchDateValidationListener());
+ // if launch date is required, help user by suggesting today's date
+ launchDateParam.setDefaultValue(new Date());
+ }
+ add(launchDate);
+ }
+ }
+
+ @Override
+ public void validate(FormSectionEvent fse) throws FormProcessException {
+ final Folder folder = m_parent.getFolder(fse.getPageState());
+ Assert.exists(folder);
+ validateNameUniqueness(folder, fse, getProfileName(fse));
+ }
+
+ @Override
+ public void process(FormSectionEvent fse) throws FormProcessException {
+ final FormData data = fse.getFormData();
+ final PageState state = fse.getPageState();
+ final ContentSection section = m_parent.getContentSection(state);
+ final Folder folder = m_parent.getFolder(state);
+
+ final String profileName = getProfileName(fse);
+ final SciMember owner = (SciMember) data.get(ITEM_SEARCH);
+
+ Assert.exists(section, ContentSection.class);
+
+ final ContentPage item = createContentPage(state);
+ item.setLanguage((String) data.get(LANGUAGE));
+ item.setName(profileName);
+ item.setTitle(getProfileTitle(fse));
+ if (!ContentSection.getConfig().getHideLaunchDate()) {
+ item.setLaunchDate((Date) data.get(LAUNCH_DATE));
+ }
+
+ final ContentBundle bundle = new ContentBundle(item);
+ bundle.setParent(folder);
+ bundle.setContentSection(m_parent.getContentSection(state));
+ bundle.save();
+
+ m_workflowSection.applyWorkflow(state, item);
+
+ SciPublicPersonalProfile profile = new SciPublicPersonalProfile(item.getID());
+ profile.setOwner(owner);
+ profile.save();
+
+ m_parent.editItem(state, item);
+ }
+
+ private String getProfileName(FormSectionEvent fse) {
+ final FormData data = fse.getFormData();
+
+ SciMember owner = (SciMember) data.get(ITEM_SEARCH);
+ if (owner == null) {
+ return null;
+ } else {
+ return String.format("profile_%s_%s",
+ owner.getGivenName(),
+ owner.getSurname());
+ }
+ }
+
+ private String getProfileTitle(FormSectionEvent fse) {
+ final FormData data = fse.getFormData();
+
+ SciMember owner = (SciMember) data.get(ITEM_SEARCH);
+ if (owner == null) {
+ return null;
+ } else {
+ return String.format("Profile %s %s",
+ owner.getGivenName(),
+ owner.getSurname());
+ }
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileGlobalizationUtil.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileGlobalizationUtil.java
new file mode 100644
index 000000000..285d56342
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfileGlobalizationUtil.java
@@ -0,0 +1,23 @@
+package com.arsdigita.cms.contenttypes.ui;
+
+import com.arsdigita.globalization.GlobalizedMessage;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfileGlobalizationUtil {
+
+ public static final String BUNDLE_NAME =
+ "com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources";
+
+ public static GlobalizedMessage globalize(String key) {
+ return new GlobalizedMessage(key, BUNDLE_NAME);
+ }
+
+ public static GlobalizedMessage globalize(String key, Object[] args) {
+ return new GlobalizedMessage(key, BUNDLE_NAME, args);
+ }
+
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertiesStep.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertiesStep.java
new file mode 100644
index 000000000..f0caf1642
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertiesStep.java
@@ -0,0 +1,80 @@
+package com.arsdigita.cms.contenttypes.ui;
+
+import com.arsdigita.bebop.Component;
+import com.arsdigita.bebop.Label;
+import com.arsdigita.bebop.PageState;
+import com.arsdigita.bebop.SegmentedPanel;
+import com.arsdigita.cms.ContentPage;
+import com.arsdigita.cms.ContentSection;
+import com.arsdigita.cms.ItemSelectionModel;
+import com.arsdigita.cms.contenttypes.GenericPerson;
+import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile;
+import com.arsdigita.domain.DomainObject;
+import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
+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;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfilePropertiesStep extends SimpleEditStep {
+
+ public static final String EDIT_SHEET_NAME = "edit";
+
+ public SciPublicPersonalProfilePropertiesStep(
+ final ItemSelectionModel itemModel,
+ final AuthoringKitWizard parent) {
+ super(itemModel, parent);
+
+ //Use a segemented panel to provide an easy for adding addional forms
+ //to the step.
+ SegmentedPanel segmentedPanel = new SegmentedPanel();
+
+ setDefaultEditKey(EDIT_SHEET_NAME);
+
+ SimpleEditStep basicProperties = new SimpleEditStep(itemModel, parent,
+ EDIT_SHEET_NAME);
+
+ BasicPageForm editBasicSheet =
+ new SciPublicPersonalProfilePropertyForm(itemModel,
+ this);
+ basicProperties.add(EDIT_SHEET_NAME,
+ (String) SciPublicPersonalProfileGlobalizationUtil.
+ globalize(
+ "scipublicpersonalprofile.ui.profile.edit_basic_properties").
+ localize(),
+ new WorkflowLockedComponentAccess(editBasicSheet,
+ itemModel),
+ editBasicSheet.getSaveCancelSection().
+ getCancelButton());
+
+ basicProperties.setDisplayComponent(getSciPublicPersonalProfilePropertySheet(
+ itemModel));
+
+ segmentedPanel.addSegment(new Label((String) SciPublicPersonalProfileGlobalizationUtil.
+ globalize("scipublicpersonalprofile.ui.profile.basic_properties").
+ localize()), basicProperties);
+
+ setDisplayComponent(segmentedPanel);
+ }
+
+ public static Component getSciPublicPersonalProfilePropertySheet(
+ ItemSelectionModel itemModel) {
+ DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
+ itemModel);
+
+ sheet.add(SciPublicPersonalProfileGlobalizationUtil.globalize("scipublicpersonalprofile.ui.profile_url"),
+ SciPublicPersonalProfile.PROFILE_URL);
+
+ sheet.add(SciPublicPersonalProfileGlobalizationUtil.globalize("scipublicpersonalprofile.ui.show_publication_list"),
+ SciPublicPersonalProfile.SHOW_PUBLICATION_LIST);
+ sheet.add(SciPublicPersonalProfileGlobalizationUtil.globalize("scipublicpersonalprofile.ui.show_project_list"),
+ SciPublicPersonalProfile.SHOW_PROJECT_LIST);
+
+ return sheet;
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertyForm.java b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertyForm.java
new file mode 100644
index 000000000..18f8856a0
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicPersonalProfilePropertyForm.java
@@ -0,0 +1,136 @@
+package com.arsdigita.cms.contenttypes.ui;
+
+import com.arsdigita.bebop.FormData;
+import com.arsdigita.bebop.FormProcessException;
+import com.arsdigita.bebop.FormSection;
+import com.arsdigita.bebop.Label;
+import com.arsdigita.bebop.PageState;
+import com.arsdigita.bebop.event.FormInitListener;
+import com.arsdigita.bebop.event.FormProcessListener;
+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.form.SingleSelect;
+import com.arsdigita.bebop.form.TextArea;
+import com.arsdigita.bebop.form.TextField;
+import com.arsdigita.bebop.parameters.DateParameter;
+import com.arsdigita.bebop.parameters.NotNullValidationListener;
+import com.arsdigita.bebop.parameters.ParameterModel;
+import com.arsdigita.bebop.parameters.StringParameter;
+import com.arsdigita.cms.ItemSelectionModel;
+import com.arsdigita.cms.contenttypes.GenericPerson;
+import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile;
+import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
+import com.arsdigita.cms.ui.authoring.BasicPageForm;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import javax.swing.text.StyledEditorKit.BoldAction;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Jens Pelzetter
+ * @version $Id$
+ */
+public class SciPublicPersonalProfilePropertyForm
+ extends BasicPageForm
+ implements FormProcessListener,
+ FormInitListener {
+
+ private SciPublicPersonalProfilePropertiesStep step;
+ private CheckboxGroup showPublicationList;
+ private CheckboxGroup showProjectList;
+ private String SHOW_PUBLICATION_LIST = "showPublicationList";
+ private String SHOW_PROJECT_LIST = "showProjectList";
+ public static final String ID = "SciPublicPersonalProfile_edit";
+
+ public SciPublicPersonalProfilePropertyForm(ItemSelectionModel itemModel) {
+ this(itemModel, null);
+ }
+
+ public SciPublicPersonalProfilePropertyForm(
+ ItemSelectionModel itemModel,
+ SciPublicPersonalProfilePropertiesStep step) {
+ super(ID, itemModel);
+ this.step = step;
+ }
+
+ @Override
+ public void addWidgets() {
+ super.addWidgets();
+
+ add(new Label(SciPublicPersonalProfileGlobalizationUtil.globalize(
+ "scipublicpersonalprofile.ui.profile.url")));
+ ParameterModel profileUrlParam =
+ new StringParameter(SciPublicPersonalProfile.PROFILE_URL);
+ TextField profileUrl = new TextField(profileUrlParam);
+ add(profileUrl);
+
+ add(new Label((String) SciPublicPersonalProfileGlobalizationUtil.
+ globalize(
+ "scipublicpersonalprofile.ui.profile.show_publication_list").
+ localize()));
+ showPublicationList = new CheckboxGroup(SHOW_PUBLICATION_LIST + "Group");
+ showPublicationList.addOption(new Option(SHOW_PUBLICATION_LIST, ""));
+ add(showPublicationList);
+
+ add(new Label((String) SciPublicPersonalProfileGlobalizationUtil.
+ globalize(
+ "scipublicpersonalprofile.ui.profile.show_project_list").
+ localize()));
+ showProjectList = new CheckboxGroup(SHOW_PROJECT_LIST + "Group");
+ showProjectList.addOption(new Option(SHOW_PROJECT_LIST, ""));
+ add(showProjectList);
+ }
+
+ @Override
+ public void init(FormSectionEvent fse) throws FormProcessException {
+ final PageState state = fse.getPageState();
+ final FormData data = fse.getFormData();
+ final SciPublicPersonalProfile profile =
+ (SciPublicPersonalProfile) super.
+ initBasicWidgets(fse);
+
+ data.put(SciPublicPersonalProfile.PROFILE_URL, profile.getProfileUrl());
+ if ((profile.getShowPublicationList() != null)
+ && profile.getShowPublicationList()) {
+ showPublicationList.setValue(state, new String[]{
+ SHOW_PUBLICATION_LIST});
+ }
+ if ((profile.getShowProjectList() != null)
+ && profile.getShowProjectList()) {
+ showProjectList.setValue(state, new String[]{SHOW_PROJECT_LIST});
+ }
+ }
+
+ @Override
+ public void process(FormSectionEvent fse) throws FormProcessException {
+ final SciPublicPersonalProfile profile =
+ (SciPublicPersonalProfile) processBasicWidgets(
+ fse);
+ final FormData data = fse.getFormData();
+ final PageState state = fse.getPageState();
+
+ if ((profile != null)
+ && getSaveCancelSection().getSaveButton().isSelected(state)) {
+ profile.setProfileUrl((String) data.get(
+ SciPublicPersonalProfile.PROFILE_URL));
+
+ if (showPublicationList.getValue(state) == null) {
+ profile.setShowPublicationList(Boolean.FALSE);
+ } else {
+ profile.setShowPublicationList(Boolean.TRUE);
+ }
+
+ if (showProjectList.getValue(state) == null) {
+ profile.setShowProjectList(Boolean.FALSE);
+ } else {
+ profile.setShowProjectList(Boolean.TRUE);
+ }
+
+ profile.save();
+ }
+ }
+}
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources.properties b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources.properties
new file mode 100644
index 000000000..e71a89bde
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources.properties
@@ -0,0 +1,5 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+scipublicpersonalprofile.ui.profile.basic_properties=Basic properties
+scipublicpersonalprofile.ui.profile.edit_basic_properties=Edit basic properties
diff --git a/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources_de.properties b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources_de.properties
new file mode 100644
index 000000000..7be40d125
--- /dev/null
+++ b/ccm-sci-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/SciPublicationPersonalProfileResources_de.properties
@@ -0,0 +1,5 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+scipublicpersonalprofile.ui.profile.basic_properties=Basiseigenschaften
+scipublicpersonalprofile.ui.profile.edit_basic_properties=Basiseigenschaften bearbeiten