First part of UI classes for the dramatic arts publication types. Please note: Some classes needed are still not there, so the module does not yet compile or work.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2656 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-05-28 10:10:20 +00:00
parent 01b4b5b7bf
commit 860147b7a7
11 changed files with 52038 additions and 27067 deletions

View File

@ -32,18 +32,18 @@ object type SciPublicationPlayBundle extends PublicationWithPublisherBundle {
reference key (ct_scipublications_play_bundles.bundle_id); reference key (ct_scipublications_play_bundles.bundle_id);
} }
//Association for first production theater //Association for first production theatre
association { association {
PublicationBundle[0..n] producedPlay = join cms_orgaunit_bundles.bundle_id PublicationBundle[0..n] producedPlay = join cms_orgaunit_bundles.bundle_id
to ct_scipublications_play_firstproductiontheather.theater_id, to ct_scipublications_play_firstproductiontheatre.theatre_id,
join ct_scipublications_play_firstproductiontheather.play_id join ct_scipublications_play_firstproductiontheatre.play_id
to ct_scipublications_play_bundles.bundle_id; to ct_scipublications_play_bundles.bundle_id;
GenericOrganizationalUnitBundle[0..n] productionTheater = join ct_scipublications_play_bundles.bundle_id GenericOrganizationalUnitBundle[0..n] productionTheater = join ct_scipublications_play_bundles.bundle_id
to ct_scipublications_play_firstproductiontheather.play_id, to ct_scipublications_play_firstproductiontheatre.play_id,
join ct_scipublications_play_firstproductiontheather.theather_id join ct_scipublications_play_firstproductiontheatre.theatre_id
to cms_orgaunit_bundles.bundle_id; to cms_orgaunit_bundles.bundle_id;
Integer[0..1] theaterOrder = ct_scipublications_play_productiontheater.theater_order INTEGER; Integer[0..1] theatreOrder = ct_scipublications_play_productiontheatre.theatre_order INTEGER;
} }

View File

@ -0,0 +1,16 @@
package com.arsdigita.cms.contenttypes;
import com.arsdigita.toolbox.GlobalisationUtil;
/**
*
* @author Jens Pelzetter
* @version $Id$
*/
public class SciPublicationsDramaticArtsGlobalisationUtil extends GlobalisationUtil {
public SciPublicationsDramaticArtsGlobalisationUtil() {
super("com.arsdigita.cms.contenttypes.SciPublicationsDramaticArtsResources");
}
}

View File

@ -41,8 +41,8 @@ public class SciPublicationsPlayBundle extends PublicationWithPublisherBundle {
public static final String BASE_BASE_OBJECT_TYPE public static final String BASE_BASE_OBJECT_TYPE
= "com.arsdigita.cms.contenttypes.SciPublicationsPlayBundle"; = "com.arsdigita.cms.contenttypes.SciPublicationsPlayBundle";
public static final String PRODUCTION_THEATER = "productionTheater"; public static final String PRODUCTION_THEATER = "productionTheatre";
public static final String PRODUCTION_THEATER_ORDER = "theaterOrder"; public static final String PRODUCTION_THEATER_ORDER = "theatreOrder";
public SciPublicationsPlayBundle(final ContentItem primary) { public SciPublicationsPlayBundle(final ContentItem primary) {

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2010 Jens Pelzetter
*
* 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.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.PublicationBundle;
import com.arsdigita.cms.contenttypes.SciPublicationsMovieBundle;
import com.arsdigita.cms.ui.authoring.CreationSelector;
/**
*
* @author Jens Pelzetter
* @version $Id$
*/
public class SciPublicationsMovieCreate extends PublicationCreate {
public SciPublicationsMovieCreate(final ItemSelectionModel itemModel,
final CreationSelector parent) {
super(itemModel, parent);
}
@Override
public PublicationBundle createBundle(final ContentItem primary) {
return new SciPublicationsMovieBundle(primary);
}
}

View File

@ -0,0 +1,90 @@
/*
* Copyright (c) 2014 Jens Pelzetter
*
* 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.Label;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciPublicationsDramaticArtsGlobalisationUtil;
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.toolbox.ui.DomainObjectPropertySheet;
/**
*
* @author Jens Pelzetter
* @version $Id$
*/
public class SciPublicationsMoviePropertiesStep extends PublicationPropertiesStep {
public SciPublicationsMoviePropertiesStep(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
super(itemModel, parent);
}
public static Component getSciPublicationsMoviePropertySheet(
final ItemSelectionModel itemModel) {
final DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
getPublicationPropertySheet(itemModel);
return sheet;
}
@Override
protected void addBasicProperties(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
final SimpleEditStep basicProperties = new SimpleEditStep(itemModel,
parent,
EDIT_SHEET_NAME);
final BasicPageForm editBasicSheet = new SciPublicationsMoviePropertyForm(itemModel, this);
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil = new SciPublicationsDramaticArtsGlobalisationUtil();
basicProperties.add(EDIT_SHEET_NAME,
PublicationGlobalizationUtil.globalize(
"publications.ui.publication.edit_basic_sheet"),
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
editBasicSheet.getSaveCancelSection().getCancelButton());
basicProperties.setDisplayComponent(getSciPublicationsMoviePropertySheet(itemModel));
getSegmentedPanel().addSegment(
new Label(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.basic_properties"),
basicProperties));
}
@Override
protected void addSteps(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
super.addSteps(itemModel, parent);
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil = new SciPublicationsDramaticArtsGlobalisationUtil();
addStep(new SciPublicationsMovieDirectorStep(itemModel, parent),
globalisationUtil.globalise("publications.dramaticarts.ui.director"));
addStep(new SciPublicationsMovieProducationCompanyStep(itemModel, parent),
globalisationUtil.globalise("publications.dramaticarts.ui.producationcompany"));
}
}

View File

@ -0,0 +1,44 @@
/*
* Copyright (c) 2010 Jens Pelzetter
*
* 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.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.PublicationBundle;
import com.arsdigita.cms.contenttypes.SciPublicationsPlayBundle;
import com.arsdigita.cms.ui.authoring.CreationSelector;
/**
*
* @author Jens Pelzetter
* @version $Id$
*/
public class SciPublicationsPlayCreate extends PublicationWithPublisherCreate {
public SciPublicationsPlayCreate(final ItemSelectionModel itemModel,
final CreationSelector parent) {
super(itemModel, parent);
}
@Override
public PublicationBundle createBundle(final ContentItem primary) {
return new SciPublicationsPlayBundle(primary);
}
}

View File

@ -0,0 +1,100 @@
/*
* Copyright (c) 2014 Jens Pelzetter
*
* 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.Label;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciPublicationsDramaticArtsGlobalisationUtil;
import com.arsdigita.cms.contenttypes.SciPublicationsPlay;
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.toolbox.ui.DomainObjectPropertySheet;
/**
*
* @author Jens Pelzetter
* @version $Id$
*/
public class SciPublicationsPlayPropertiesStep extends PublicationWithPublisherPropertiesStep {
public SciPublicationsPlayPropertiesStep(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
super(itemModel, parent);
}
public static Component getSciPublicationsPlayPropertySheet(
final ItemSelectionModel itemModel) {
final DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep.
getPublicationWithPublisherPropertySheet(itemModel);
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil
= new SciPublicationsDramaticArtsGlobalisationUtil();
sheet.add(globalisationUtil.globalise(
"publications.dramaticarts.ui.play.first_production_year"),
SciPublicationsPlay.FIRST_PRODUCTION_YEAR);
return sheet;
}
@Override
protected void addBasicProperties(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
final SimpleEditStep basicProperties = new SimpleEditStep(itemModel,
parent,
EDIT_SHEET_NAME);
final BasicPageForm editBasicSheet = new SciPublicationsPlayPropertyForm(itemModel, this);
basicProperties.add(EDIT_SHEET_NAME,
PublicationGlobalizationUtil.globalize(
"publications.ui.publication.edit_basic_sheet"),
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
editBasicSheet.getSaveCancelSection().getCancelButton());
basicProperties.setDisplayComponent(getSciPublicationsPlayPropertySheet(itemModel));
getSegmentedPanel().addSegment(new Label(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.basic_properties"),
basicProperties));
}
@Override
public void addSteps(final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) {
super.addSteps(itemModel, parent);
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil = new SciPublicationsDramaticArtsGlobalisationUtil();
addStep(new SciPublicationsPlayProducationTheaterStep(itemModel, parent),
globalisationUtil.
globalise("publications.dramaticarts.ui.first_producation_theater"));
}
}

View File

@ -35,6 +35,7 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainService; import com.arsdigita.domain.DomainService;
import com.arsdigita.globalization.GlobalizedMessage;
import java.text.DateFormat; import java.text.DateFormat;
/** /**
@ -77,19 +78,22 @@ public class PublicationPropertiesStep extends SimpleEditStep {
sheet.add(PublicationGlobalizationUtil.globalize( sheet.add(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.abstract"), "publications.ui.publication.abstract"),
Publication.ABSTRACT); Publication.ABSTRACT);
//new PreFormattedTextFormatter()); //new PreFormattedTextFormatter());
sheet.add(PublicationGlobalizationUtil.globalize( sheet.add(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.misc"), "publications.ui.publication.misc"),
Publication.MISC); Publication.MISC);
if (Publication.getConfig().getEnableFirstPublishedProperty()) { if (Publication.getConfig().getEnableFirstPublishedProperty()) {
sheet.add(PublicationGlobalizationUtil.globalize("publications.ui.publication.first_published"), sheet.add(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.first_published"),
Publication.FIRST_PUBLISHED); Publication.FIRST_PUBLISHED);
} }
if (Publication.getConfig().getEnableLanguageProperty()) { if (Publication.getConfig().getEnableLanguageProperty()) {
sheet.add(PublicationGlobalizationUtil.globalize("publications.ui.publication.language"), sheet.
Publication.LANG); add(PublicationGlobalizationUtil.globalize(
"publications.ui.publication.language"),
Publication.LANG);
} }
if (!ContentSection.getConfig().getHideLaunchDate()) { if (!ContentSection.getConfig().getHideLaunchDate()) {
@ -97,19 +101,19 @@ public class PublicationPropertiesStep extends SimpleEditStep {
"cms.ui.authoring.page_launch_date"), "cms.ui.authoring.page_launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new DomainObjectPropertySheet.AttributeFormatter() {
public String format(DomainObject item, public String format(DomainObject item,
String attribute, String attribute,
PageState state) { PageState state) {
ContentPage page = (ContentPage) item; ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) { if (page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG). return DateFormat.getDateInstance(DateFormat.LONG).
format(page.getLaunchDate()); format(page.getLaunchDate());
} else { } else {
return (String) ContenttypesGlobalizationUtil.globalize( return (String) ContenttypesGlobalizationUtil.globalize(
"cms.ui.unknown").localize(); "cms.ui.unknown").localize();
} }
} }
}); });
} }
return sheet; return sheet;
@ -128,10 +132,11 @@ public class PublicationPropertiesStep extends SimpleEditStep {
BasicPageForm editBasicSheet = new PublicationPropertyForm(itemModel, BasicPageForm editBasicSheet = new PublicationPropertyForm(itemModel,
this); this);
basicProperties.add(EDIT_SHEET_NAME, (String) PublicationGlobalizationUtil. basicProperties.add(EDIT_SHEET_NAME, (String) PublicationGlobalizationUtil.
globalize("publications.ui.publication.edit_basic_sheet"). globalize("publications.ui.publication.edit_basic_sheet").
localize(), new WorkflowLockedComponentAccess(editBasicSheet, localize(), new WorkflowLockedComponentAccess(editBasicSheet,
itemModel), editBasicSheet. itemModel),
getSaveCancelSection().getCancelButton()); editBasicSheet.
getSaveCancelSection().getCancelButton());
basicProperties.setDisplayComponent(getPublicationPropertySheet( basicProperties.setDisplayComponent(getPublicationPropertySheet(
itemModel)); itemModel));
@ -152,10 +157,15 @@ public class PublicationPropertiesStep extends SimpleEditStep {
} }
protected void addStep(SimpleEditStep step, String labelKey) { protected void addStep(SimpleEditStep step, String labelKey) {
segmentedPanel.addSegment( addStep(step, PublicationGlobalizationUtil.globalize(labelKey));
new Label((String) PublicationGlobalizationUtil.globalize( // segmentedPanel.addSegment(
labelKey).localize()), // new Label((String) PublicationGlobalizationUtil.globalize(
step); // labelKey).localize()),
// step);
}
protected void addStep(SimpleEditStep step, GlobalizedMessage label) {
segmentedPanel.addSegment(new Label(label), step);
} }
protected boolean isSeriesStepEnabled() { protected boolean isSeriesStepEnabled() {

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 338 KiB

After

Width:  |  Height:  |  Size: 587 KiB