Last part of adaptation to setLabel attribute in widgets.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2744 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c5cf1f9e93
commit
a2d02f8a0a
|
|
@ -56,8 +56,7 @@ import org.apache.log4j.Logger;
|
|||
public class GenericOrganizationalUnitSubordinateOrgaUnitsTable
|
||||
extends Table {
|
||||
|
||||
private final Logger logger =
|
||||
Logger.getLogger(
|
||||
private final Logger logger = Logger.getLogger(
|
||||
GenericOrganizationalUnitSubordinateOrgaUnitsTable.class);
|
||||
private final String TABLE_COL_EDIT = "table_col_edit";
|
||||
private final String TABLE_COL_DEL = "table_col_del";
|
||||
|
|
@ -69,7 +68,9 @@ public class GenericOrganizationalUnitSubordinateOrgaUnitsTable
|
|||
public GenericOrganizationalUnitSubordinateOrgaUnitsTable(
|
||||
final ItemSelectionModel itemModel,
|
||||
final GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer customizer) {
|
||||
|
||||
super();
|
||||
|
||||
this.itemModel = itemModel;
|
||||
this.customizer = customizer;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,14 +50,18 @@ public class SciPublicationsMovieDirectorForm extends BasicItemForm implements F
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
|
||||
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil
|
||||
= new SciPublicationsDramaticArtsGlobalisationUtil();
|
||||
add(new Label(globalisationUtil.globalize("publications.dramaticarts.ui.movie.director")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH, ContentType.findByAssociatedObjectType(
|
||||
GenericPerson.BASE_DATA_OBJECT_TYPE));
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(globalisationUtil.globalize(
|
||||
"publications.dramaticarts.ui.movie.director"));
|
||||
add(itemSearch);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public class SciPublicationsMovieExtraXMLGenerator implements ExtraXMLGenerator
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGlobalStateParams(final Page page) {
|
||||
//nothing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,12 +56,13 @@ public class SciPublicationsMovieProductionCompanyForm
|
|||
public void addWidgets() {
|
||||
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil
|
||||
= new SciPublicationsDramaticArtsGlobalisationUtil();
|
||||
add(new Label(globalisationUtil.globalize(
|
||||
"publications.dramaticarts.ui.movie.production_company")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH, ContentType.findByAssociatedObjectType(
|
||||
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(globalisationUtil.globalize(
|
||||
"publications.dramaticarts.ui.movie.production_company"));
|
||||
add(itemSearch);
|
||||
}
|
||||
|
||||
|
|
@ -81,8 +82,8 @@ public class SciPublicationsMovieProductionCompanyForm
|
|||
.getSelectedObject(state);
|
||||
|
||||
if (getSaveCancelSection().getSaveButton().isSelected(state)) {
|
||||
final GenericOrganizationalUnit productionCompany = (GenericOrganizationalUnit) data
|
||||
.get(ITEM_SEARCH);
|
||||
final GenericOrganizationalUnit productionCompany
|
||||
= (GenericOrganizationalUnit) data.get(ITEM_SEARCH);
|
||||
movie.setProductionCompany(productionCompany);
|
||||
itemSearch.publishCreatedItem(data, productionCompany);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ public class SciPublicationsMovieProductionCompanyStep extends SimpleEditStep {
|
|||
setProductionCompanyForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
final SciPublicationsMovieProductionCompanySheet sheet
|
||||
= new SciPublicationsMovieProductionCompanySheet(
|
||||
itemModel);
|
||||
= new SciPublicationsMovieProductionCompanySheet(itemModel);
|
||||
setDisplayComponent(sheet);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,12 +56,15 @@ public class SciPublicationsPlayProductionTheaterForm
|
|||
public void addWidgets() {
|
||||
final SciPublicationsDramaticArtsGlobalisationUtil globalisationUtil
|
||||
= new SciPublicationsDramaticArtsGlobalisationUtil();
|
||||
add(new Label(globalisationUtil.globalize(
|
||||
"publications.dramaticarts.play.ui.productiontheater")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH, ContentType.findByAssociatedObjectType(
|
||||
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
|
||||
ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(
|
||||
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE)
|
||||
);
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(globalisationUtil.globalize(
|
||||
"publications.dramaticarts.play.ui.productiontheater"));
|
||||
add(itemSearch);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ public class SciPublicationsPlayProductionTheaterStep extends SimpleEditStep {
|
|||
setProductionTheaterForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
final SciPublicationsPlayProductionTheaterSheet sheet
|
||||
= new SciPublicationsPlayProductionTheaterSheet(
|
||||
itemModel);
|
||||
= new SciPublicationsPlayProductionTheaterSheet(itemModel);
|
||||
setDisplayComponent(sheet);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package com.arsdigita.cms.contenttypes.ui;
|
|||
|
||||
import com.arsdigita.bebop.FormData;
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.event.FormInitListener;
|
||||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
|
|
@ -65,7 +64,7 @@ public class SciPublicationsPlayPropertyForm
|
|||
final TextField firstProdYear = new TextField(firstProdYearParam);
|
||||
firstProdYear.setMaxLength(4);
|
||||
firstProdYear.setLabel(globalisationUtil.globalize("publications.dramaticarts.ui.play.first_production_year"));
|
||||
add(new Label(globalisationUtil.globalize("publications.dramaticarts.ui.play.first_production_year")));
|
||||
// add(new Label(globalisationUtil.globalize("publications.dramaticarts.ui.play.first_production_year")));
|
||||
add(firstProdYear);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,23 +46,26 @@ public class ResearchReportPropertiesStep extends UnPublishedPropertiesStep {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void addBasicProperties(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) {
|
||||
final SimpleEditStep basicProperties = new SimpleEditStep(itemModel, parent, EDIT_SHEET_NAME);
|
||||
protected void addBasicProperties(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent) {
|
||||
final SimpleEditStep basicProperties = new SimpleEditStep(itemModel,
|
||||
parent,
|
||||
EDIT_SHEET_NAME);
|
||||
|
||||
final BasicPageForm editBasicSheet = new ResearchReportPropertyForm(itemModel, this);
|
||||
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize("publications.ui.publication.edit_basic_sheet").
|
||||
localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(getResearchReportPropertiesSheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.
|
||||
globalize("publications.ui.publication.basic_properties").localize()),
|
||||
new Label(PublicationGlobalizationUtil.
|
||||
globalize("publications.ui.publication.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
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.cms.ItemSelectionModel;
|
||||
|
||||
|
|
@ -30,7 +28,8 @@ import com.arsdigita.cms.ItemSelectionModel;
|
|||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
*/
|
||||
public class ResearchReportPropertyForm extends UnPublishedPropertyForm implements FormInitListener,
|
||||
public class ResearchReportPropertyForm extends UnPublishedPropertyForm
|
||||
implements FormInitListener,
|
||||
FormProcessListener,
|
||||
FormSubmissionListener{
|
||||
|
||||
|
|
@ -40,7 +39,8 @@ public class ResearchReportPropertyForm extends UnPublishedPropertyForm implemen
|
|||
this(itemModel, null);
|
||||
}
|
||||
|
||||
public ResearchReportPropertyForm(final ItemSelectionModel itemModel, ResearchReportPropertiesStep step) {
|
||||
public ResearchReportPropertyForm(final ItemSelectionModel itemModel,
|
||||
ResearchReportPropertiesStep step) {
|
||||
super(itemModel, step);
|
||||
addSubmissionListener(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,9 +165,8 @@ public class CollectedVolumeArticlesTable
|
|||
case 0:
|
||||
return m_article.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.article.remove").
|
||||
localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.article.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,18 +134,20 @@ public class ExpertiseOrdererSheet
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
return orga.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.expertise.orderer.remove").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.expertise.orderer.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKeyAt(final int columnIndex) {
|
||||
return orga.getID();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,19 +134,20 @@ public class ExpertiseOrganizationSheet
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
return orga.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.expertise.organization.remove").
|
||||
localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.expertise.organization.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKeyAt(final int columnIndex) {
|
||||
return orga.getID();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,12 +54,15 @@ public class PublicationGenericOrganizationalUnitAddForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(PublicationGlobalizationUtil.globalize("publications.ui.orgaunit.select")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
|
||||
findByAssociatedObjectType(GenericOrganizationalUnit.class.
|
||||
getName()));
|
||||
itemSearch.setDisableCreatePane(true);
|
||||
itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunit.select"));
|
||||
add(itemSearch);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -65,13 +65,13 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
final TableColumnModel columnModel = getColumnModel();
|
||||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.columns.name").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.columns.name")),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.columns.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.columns.remove")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
|
|
@ -92,6 +92,7 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
this.itemModel = itemModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableModel makeModel(final Table table,
|
||||
final PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
|
@ -115,10 +116,12 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
orgaunits = publication.getOrganizationalUnits();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return table.getColumnModel().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
boolean ret;
|
||||
|
||||
|
|
@ -131,18 +134,20 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
return orgaunits.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.remove").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKeyAt(final int columnIndex) {
|
||||
return orgaunits.getID();
|
||||
}
|
||||
|
|
@ -217,9 +222,8 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
|
||||
if (canEdit) {
|
||||
final ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize("publications.ui.orgaunits.remove.confirm").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
final Label label = new Label("");
|
||||
|
|
|
|||
|
|
@ -79,32 +79,31 @@ public class PublicationPropertyForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.year_of_publication")));
|
||||
final ParameterModel yearOfPublicationParam = new IntegerParameter(
|
||||
Publication.YEAR_OF_PUBLICATION);
|
||||
final TextField yearOfPublication = new TextField(yearOfPublicationParam);
|
||||
yearOfPublication.setMaxLength(4);
|
||||
//yearOfPublication.addValidationListener(new NotNullValidationListener());
|
||||
//yearOfPublication.addValidationListener(new NotEmptyValidationListener());
|
||||
yearOfPublication.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.year_of_publication"));
|
||||
add(yearOfPublication);
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.first_published")));
|
||||
final ParameterModel firstPublishedParam = new IntegerParameter(Publication.FIRST_PUBLISHED);
|
||||
final TextField firstPublished = new TextField(firstPublishedParam);
|
||||
firstPublished.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.first_published"));
|
||||
add(firstPublished);
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize("publications.ui.publication.language")));
|
||||
final ParameterModel langParam = new StringParameter(Publication.LANG);
|
||||
//final TextField lang = new TextField(langParam);
|
||||
final SingleSelect lang = new SingleSelect(langParam);
|
||||
final Locale[] locales = Locale.getAvailableLocales();
|
||||
lang.addOption(new Option("", ""));
|
||||
Arrays.sort(locales, new Comparator<Locale>() {
|
||||
|
||||
@Override
|
||||
public int compare(final Locale locale1, final Locale locale2) {
|
||||
return locale1.getDisplayName().compareTo(locale2.getDisplayName());
|
||||
}
|
||||
|
|
@ -125,10 +124,10 @@ public class PublicationPropertyForm
|
|||
});
|
||||
lang.addOption(new Option(locale.toString(), optionLabel));
|
||||
}
|
||||
lang.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.language"));
|
||||
add(lang);
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.abstract")));
|
||||
ParameterModel abstractParam = new StringParameter(Publication.ABSTRACT);
|
||||
TextArea abstractArea;
|
||||
if (config.getEnableAbstractHTML()) {
|
||||
|
|
@ -138,10 +137,10 @@ public class PublicationPropertyForm
|
|||
}
|
||||
abstractArea.setCols(60);
|
||||
abstractArea.setRows(18);
|
||||
abstractArea.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.abstract"));
|
||||
add(abstractArea);
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.misc")));
|
||||
ParameterModel miscParam = new StringParameter(Publication.MISC);
|
||||
TextArea misc;
|
||||
if (config.getEnableMiscHTML()) {
|
||||
|
|
@ -149,6 +148,8 @@ public class PublicationPropertyForm
|
|||
} else {
|
||||
misc = new TextArea(miscParam);
|
||||
}
|
||||
misc.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.misc"));
|
||||
misc.setCols(60);
|
||||
misc.setRows(18);
|
||||
add(misc);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import com.arsdigita.bebop.form.TextField;
|
|||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.Folder;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.contenttypes.PublicationsConfig;
|
||||
|
|
@ -72,19 +71,20 @@ public class PublicationSeriesAddForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.select_series").localize()));
|
||||
|
||||
m_itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(Series.class.getName()));
|
||||
m_itemSearch.setDefaultCreationFolder(config.getDefaultSeriesFolder());
|
||||
m_itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.select_series"));
|
||||
add(m_itemSearch);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volume_of_series").localize()));
|
||||
ParameterModel volumeOfSeriesParam = new StringParameter(
|
||||
VolumeInSeriesCollection.VOLUME_OF_SERIES);
|
||||
volumeOfSeries = new TextField(volumeOfSeriesParam);
|
||||
volumeOfSeries.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volume_of_series"));
|
||||
add(volumeOfSeries);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ public class PublicationSeriesPropertyStep extends SimpleEditStep {
|
|||
|
||||
BasicItemForm addSeriesSheet = new PublicationSeriesAddForm(itemModel);
|
||||
add(ADD_SERIES_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.add_series").localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.add_series"),
|
||||
new WorkflowLockedComponentAccess(addSeriesSheet, itemModel),
|
||||
addSeriesSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import com.arsdigita.bebop.table.TableColumn;
|
|||
import com.arsdigita.bebop.table.TableColumnModel;
|
||||
import com.arsdigita.bebop.table.TableModel;
|
||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.CMS;
|
||||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.SecurityManager;
|
||||
|
|
@ -43,7 +42,7 @@ import com.arsdigita.cms.dispatcher.Utilities;
|
|||
import com.arsdigita.dispatcher.ObjectNotFoundException;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
|
@ -69,15 +68,18 @@ public class PublicationSeriesTable
|
|||
final TableColumnModel colModel = getColumnModel();
|
||||
colModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize("publications.ui.series.title").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.title")),
|
||||
TABLE_COL_EDIT));
|
||||
colModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize("publications.ui.series.number").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.number")),
|
||||
TABLE_COL_NUMBER));
|
||||
colModel.add(new TableColumn(
|
||||
2,
|
||||
PublicationGlobalizationUtil.globalize("publications.ui.series.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.remove")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(
|
||||
|
|
@ -153,8 +155,8 @@ public class PublicationSeriesTable
|
|||
case 1:
|
||||
return m_series.getTitle();
|
||||
case 2:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.remove").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -256,7 +258,7 @@ public class PublicationSeriesTable
|
|||
seriesCol.close();
|
||||
|
||||
if (volumeOfSeries == null) {
|
||||
return new Label("");
|
||||
return new Label();
|
||||
} else {
|
||||
return new Label(volumeOfSeries);
|
||||
}
|
||||
|
|
@ -288,10 +290,8 @@ public class PublicationSeriesTable
|
|||
|
||||
if (canDelete) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize(
|
||||
"publications.ui.series.confirm_remove").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.confirm_remove"));
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
|
|
|
|||
|
|
@ -80,22 +80,21 @@ public class PublicationWithPublisherPropertiesStep
|
|||
BasicPageForm editBasicSheet =
|
||||
new PublicationWithPublisherPropertyForm(itemModel, this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.edit_basic_sheet").
|
||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getPublicationWithPublisherPropertySheet(
|
||||
itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties").
|
||||
localize()), basicProperties);
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -104,6 +103,7 @@ public class PublicationWithPublisherPropertiesStep
|
|||
super.addSteps(itemModel, parent);
|
||||
|
||||
addStep(new PublicationWithPublisherSetPublisherStep(itemModel, parent),
|
||||
"publications.ui.with_publisher.publisher");
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,10 +69,9 @@ public class PublicationWithPublisherPropertyForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.isbn").localize()));
|
||||
ParameterModel isbnParam = new StringParameter(
|
||||
PublicationWithPublisher.ISBN);
|
||||
TextField isbn = new TextField(isbnParam);
|
||||
|
|
@ -105,38 +104,36 @@ public class PublicationWithPublisherPropertyForm
|
|||
}
|
||||
}
|
||||
});
|
||||
isbn.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.isbn"));
|
||||
add(isbn);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.volume").localize()));
|
||||
ParameterModel volumeParam = new IntegerParameter(
|
||||
PublicationWithPublisher.VOLUME);
|
||||
TextField volume = new TextField(volumeParam);
|
||||
volume.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.volume"));
|
||||
add(volume);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.number_of_volumes").
|
||||
localize()));
|
||||
ParameterModel numberOfVolumesParam =
|
||||
new IntegerParameter(
|
||||
ParameterModel numberOfVolumesParam = new IntegerParameter(
|
||||
PublicationWithPublisher.NUMBER_OF_VOLUMES);
|
||||
TextField numberOfVolumes = new TextField(numberOfVolumesParam);
|
||||
numberOfVolumes.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.number_of_volumes"));
|
||||
add(numberOfVolumes);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.number_of_pages").
|
||||
localize()));
|
||||
ParameterModel numberOfPagesParam = new IntegerParameter(
|
||||
PublicationWithPublisher.NUMBER_OF_PAGES);
|
||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
||||
numberOfPages.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.number_of_pages"));
|
||||
add(numberOfPages);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.edition").
|
||||
localize()));
|
||||
ParameterModel editionModel = new StringParameter(
|
||||
PublicationWithPublisher.EDITION);
|
||||
TextField edition = new TextField(editionModel);
|
||||
edition.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.collected_volume.edition"));
|
||||
add(edition);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import com.arsdigita.bebop.event.FormInitListener;
|
|||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.Folder;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||
import com.arsdigita.cms.contenttypes.PublicationsConfig;
|
||||
|
|
@ -34,7 +33,7 @@ import com.arsdigita.cms.contenttypes.Publisher;
|
|||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -61,13 +60,14 @@ public class PublicationWithPublisherSetPublisherForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher")));
|
||||
itemSearch =
|
||||
new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType(Publisher.class.
|
||||
getName()));
|
||||
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(
|
||||
Publisher.class.getName()));
|
||||
itemSearch.setDefaultCreationFolder(config.getDefaultPublisherFolder());
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher"));
|
||||
add(itemSearch);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,13 +64,13 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
TableColumnModel columnModel = getColumnModel();
|
||||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher")),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new PublicationWithPublisherSetPublisherSheetModelBuilder(
|
||||
|
|
@ -107,8 +107,8 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
private class PublicationWithPublisherSetPublisherSheetModel
|
||||
implements TableModel {
|
||||
|
||||
private Table table;
|
||||
private Publisher publisher;
|
||||
private final Table table;
|
||||
private final Publisher publisher;
|
||||
private boolean m_done;
|
||||
|
||||
public PublicationWithPublisherSetPublisherSheetModel(final Table table,
|
||||
|
|
@ -123,10 +123,12 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return table.getColumnModel().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
boolean ret;
|
||||
|
||||
|
|
@ -140,19 +142,20 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
return publisher.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove").
|
||||
localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKeyAt(final int columnIndex) {
|
||||
return publisher.getID();
|
||||
}
|
||||
|
|
@ -239,10 +242,8 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
|
||||
if (canEdit) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize(
|
||||
"publications.ui.with_publisher.publisher.remove.confirm").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
|
|
@ -251,6 +252,7 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cellSelected(final TableActionEvent event) {
|
||||
PageState state = event.getPageState();
|
||||
|
||||
|
|
@ -267,6 +269,7 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void headSelected(final TableActionEvent event) {
|
||||
//Nothing to do
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public class PublicationWithPublisherSetPublisherStep extends SimpleEditStep {
|
|||
BasicItemForm setPublisherForm = new PublicationWithPublisherSetPublisherForm(
|
||||
itemModel);
|
||||
add(SET_PUBLICATION_PUBLISHER_STEP,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.setPublisher").localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.setPublisher"),
|
||||
new WorkflowLockedComponentAccess(setPublisherForm, itemModel),
|
||||
setPublisherForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class PublisherCreate extends PageCreate {
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
ContentType type = getItemSelectionModel().getContentType();
|
||||
m_workflowSection = new ApplyWorkflowFormSection(type);
|
||||
add(m_workflowSection, ColumnPanel.INSERT);
|
||||
|
|
@ -70,8 +71,6 @@ public class PublisherCreate extends PageCreate {
|
|||
PublisherPropertyForm.addMandatoryFieldWidgets(this);
|
||||
|
||||
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(
|
||||
|
|
@ -82,13 +81,16 @@ public class PublisherCreate extends PageCreate {
|
|||
// if launch date is required, help user by suggesting today's date
|
||||
launchDateParam.setDefaultValue(new Date());
|
||||
}
|
||||
launchDate.setLabel(GlobalizationUtil.globalize(
|
||||
"cms.ui.authoring.page_launch_date"));
|
||||
add(launchDate);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate(FormSectionEvent fse) throws FormProcessException {
|
||||
//We don't call super.validate(fse); here because the name (URL fragment) of a publisher is generated in a different manner
|
||||
//We don't call super.validate(fse); here because the name
|
||||
//(URL fragment) of a publisher is generated in a different manner
|
||||
//than the name (URL fragment) of other content items.
|
||||
Folder folder = m_parent.getFolder(fse.getPageState());
|
||||
Assert.exists(folder);
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ public class PublisherPropertiesStep
|
|||
|
||||
public static Component getPublisherPropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getGenericOrganizationalUnitPropertySheet(
|
||||
itemModel);
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet)
|
||||
getGenericOrganizationalUnitPropertySheet(itemModel);
|
||||
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.name"),
|
||||
|
|
@ -65,20 +65,19 @@ public class PublisherPropertiesStep
|
|||
EDIT_SHEET_NAME);
|
||||
BasicPageForm editBasicSheet = new PublisherPropertyForm(itemModel,
|
||||
this);
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.edit_basic_properties").localize(),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.edit_basic_properties"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getPublisherPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.basic_properties").localize()),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,19 +69,21 @@ public class PublisherPropertyForm
|
|||
}
|
||||
|
||||
public static void addMandatoryFieldWidgets(FormSection form) {
|
||||
form.add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.name").localize()));
|
||||
|
||||
ParameterModel nameParam = new StringParameter(PUBLISHER_NAME);
|
||||
TextField name = new TextField(nameParam);
|
||||
name.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.name"));
|
||||
name.addValidationListener(new NotNullValidationListener());
|
||||
name.addValidationListener(new NotEmptyValidationListener());
|
||||
form.add(name);
|
||||
|
||||
form.add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.place").localize()));
|
||||
ParameterModel placeParam = new StringParameter(PLACE);
|
||||
TextField place = new TextField(placeParam);
|
||||
place.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.place"));
|
||||
form.add(place);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
|||
*/
|
||||
public class PublisherPublicationsStep extends SimpleEditStep {
|
||||
|
||||
public PublisherPublicationsStep(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) {
|
||||
public PublisherPublicationsStep(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent) {
|
||||
this(itemModel, parent, null);
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +39,8 @@ public class PublisherPublicationsStep extends SimpleEditStep {
|
|||
final String prefix) {
|
||||
super(itemModel, parent, prefix);
|
||||
|
||||
final PublisherPublicationsTable publicationsTable = new PublisherPublicationsTable(itemModel);
|
||||
final PublisherPublicationsTable publicationsTable =
|
||||
new PublisherPublicationsTable(itemModel);
|
||||
setDisplayComponent(publicationsTable);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,20 +56,24 @@ public class PublisherPublicationsTable extends Table {
|
|||
|
||||
this.itemModel = itemModel;
|
||||
|
||||
setEmptyView(new Label(PublicationGlobalizationUtil.globalize("publisher.ui.publications.none")));
|
||||
setEmptyView(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publisher.ui.publications.none")));
|
||||
|
||||
final TableColumnModel columnModel = getColumnModel();
|
||||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize("publisher.ui.publications.name").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publisher.ui.publications.name")),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize("publisher.ui.publications.columns.year").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publisher.ui.publications.columns.year")),
|
||||
TABLE_COL_YEAR));
|
||||
columnModel.add(new TableColumn(
|
||||
2,
|
||||
PublicationGlobalizationUtil.globalize("publisher.ui.publications.columns.type").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publisher.ui.publications.columns.type")),
|
||||
TABLE_COL_TYPE));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
|
|
@ -85,6 +89,7 @@ public class PublisherPublicationsTable extends Table {
|
|||
this.itemModel = itemModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableModel makeModel(final Table table, final PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
||||
|
|
@ -97,8 +102,8 @@ public class PublisherPublicationsTable extends Table {
|
|||
|
||||
private class Model implements TableModel {
|
||||
|
||||
private Table table;
|
||||
private PublicationBundleCollection publications;
|
||||
private final Table table;
|
||||
private final PublicationBundleCollection publications;
|
||||
|
||||
public Model(final Table table, final PageState state, final Publisher publisher) {
|
||||
this.table = table;
|
||||
|
|
@ -110,6 +115,7 @@ public class PublisherPublicationsTable extends Table {
|
|||
return table.getColumnModel().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
boolean ret;
|
||||
|
||||
|
|
@ -145,6 +151,7 @@ public class PublisherPublicationsTable extends Table {
|
|||
|
||||
private class EditCellRenderer extends LockableImpl implements TableCellRenderer {
|
||||
|
||||
@Override
|
||||
public Component getComponent(final Table table,
|
||||
final PageState state,
|
||||
final Object value,
|
||||
|
|
|
|||
|
|
@ -98,21 +98,20 @@ public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
|||
BasicPageForm editBasicSheet =
|
||||
new ReviewPropertyForm(itemModel, this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.review.edit_basic_sheet").
|
||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.review.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getReviewPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties").
|
||||
localize()), basicProperties);
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ public class SciAuthorPropertiesStep extends SimpleEditStep {
|
|||
BasicPageForm editSheet;
|
||||
editSheet = new SciAuthorPropertyForm(itemModel, this);
|
||||
add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"sciauthor.ui.edit_basic_properties").localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"sciauthor.ui.edit_basic_properties"),
|
||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||
editSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -80,17 +80,18 @@ public class SeriesEditshipAddForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.selectEditors")));
|
||||
|
||||
m_itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(GenericPerson.class.
|
||||
getName()));
|
||||
m_itemSearch.setDefaultCreationFolder(config.getDefaultAuthorsFolder());
|
||||
m_itemSearch.setEditAfterCreate(false);
|
||||
m_itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.selectEditors"));
|
||||
add(m_itemSearch);
|
||||
|
||||
selectedEditorLabel = new Label("");
|
||||
selectedEditorLabel = new Label();
|
||||
add(selectedEditorLabel);
|
||||
|
||||
final ParameterModel fromSkipMonthParam =
|
||||
|
|
@ -105,8 +106,6 @@ public class SeriesEditshipAddForm
|
|||
Hidden fromSkipDay = new Hidden(fromSkipDayParam);
|
||||
add(fromSkipDay);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.from").localize()));
|
||||
IncompleteDateParameter fromParam =
|
||||
new IncompleteDateParameter(
|
||||
EditshipCollection.FROM);
|
||||
|
|
@ -116,6 +115,8 @@ public class SeriesEditshipAddForm
|
|||
fromParam);
|
||||
Calendar today = new GregorianCalendar();
|
||||
from.setYearRange(1900, today.get(Calendar.YEAR));
|
||||
from.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.from"));
|
||||
add(from);
|
||||
|
||||
final ParameterModel toSkipMonthParam =
|
||||
|
|
@ -129,8 +130,6 @@ public class SeriesEditshipAddForm
|
|||
Hidden toSkipDay = new Hidden(toSkipDayParam);
|
||||
add(toSkipDay);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.to").localize()));
|
||||
IncompleteDateParameter toParam =
|
||||
new IncompleteDateParameter(
|
||||
EditshipCollection.TO);
|
||||
|
|
@ -139,6 +138,8 @@ public class SeriesEditshipAddForm
|
|||
com.arsdigita.bebop.form.Date to = new com.arsdigita.bebop.form.Date(
|
||||
toParam);
|
||||
to.setYearRange(1900, today.get(Calendar.YEAR));
|
||||
to.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.to"));
|
||||
add(to);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ public class SeriesEditshipStep extends SimpleEditStep {
|
|||
BasicItemForm addEditorSheet = new SeriesEditshipAddForm(itemModel,
|
||||
this);
|
||||
add(ADD_EDITOR_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.add_editship").localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.add_editship"),
|
||||
new WorkflowLockedComponentAccess(addEditorSheet, itemModel),
|
||||
addEditorSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -77,26 +77,26 @@ public class SeriesEditshipTable extends Table implements TableActionListener {
|
|||
TableColumnModel colModel = getColumnModel();
|
||||
colModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.name").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.name")),
|
||||
TABLE_COL_EDIT));
|
||||
colModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.from").localize()));
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.from"))));
|
||||
colModel.add(new TableColumn(
|
||||
2,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.to").localize()));
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.to"))));
|
||||
colModel.add(new TableColumn(
|
||||
3,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.edit").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.edit")),
|
||||
TABLE_COL_EDIT_EDITSHIP));
|
||||
colModel.add(new TableColumn(
|
||||
4,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.remove")),
|
||||
TABLE_COL_DEL));
|
||||
/* Just in the case someone want's to sort editships manually..." */
|
||||
/* colModel.add(new TableColumn(
|
||||
|
|
@ -198,12 +198,11 @@ public class SeriesEditshipTable extends Table implements TableActionListener {
|
|||
m_editshipCollection.getTo());
|
||||
}
|
||||
case 3:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.edit").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.edit"));
|
||||
case 4:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.remove").
|
||||
localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -331,10 +330,8 @@ public class SeriesEditshipTable extends Table implements TableActionListener {
|
|||
|
||||
if (canDelete) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize(
|
||||
"publications.ui.series.editship.remove.confirm").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.editship.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
|
|
|
|||
|
|
@ -108,16 +108,15 @@ public class SeriesPropertiesStep extends SimpleEditStep {
|
|||
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.edit_basic_sheet").localize(),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(getSeriesPropertySheet(itemModel));
|
||||
|
||||
segmentedPanel.addSegment(new Label((String) PublicationGlobalizationUtil.
|
||||
globalize("publications.ui.series.basic_properties").localize()),
|
||||
segmentedPanel.addSegment(new Label(PublicationGlobalizationUtil.
|
||||
globalize("publications.ui.series.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ public class SeriesPropertyForm
|
|||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.abstract").localize()));
|
||||
ParameterModel abstractParam = new StringParameter(Series.ABSTRACT);
|
||||
TextArea abstractArea = new TextArea(abstractParam);
|
||||
abstractArea.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.abstract"));
|
||||
abstractArea.setCols(60);
|
||||
abstractArea.setRows(18);
|
||||
add(abstractArea);
|
||||
|
|
|
|||
|
|
@ -62,16 +62,17 @@ public class SeriesVolumeAddForm extends BasicItemForm {
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.select_publication")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(
|
||||
ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(
|
||||
Publication.class.getName()));
|
||||
itemSearch.setDisableCreatePane(true);
|
||||
itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.select_publication"));
|
||||
add(itemSearch);
|
||||
|
||||
selectedVolumeLabel = new Label("");
|
||||
selectedVolumeLabel = new Label();
|
||||
selectedVolumeLabel.addPrintListener(new PrintListener() {
|
||||
|
||||
@Override
|
||||
|
|
@ -84,9 +85,10 @@ public class SeriesVolumeAddForm extends BasicItemForm {
|
|||
});
|
||||
add(selectedVolumeLabel);
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize("publications.ui.series.volume_of_series")));
|
||||
ParameterModel volumeOfSeriesParam = new StringParameter(VolumeInSeriesCollection.VOLUME_OF_SERIES);
|
||||
volumeOfSeries = new TextField(volumeOfSeriesParam);
|
||||
volumeOfSeries.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volume_of_series"));
|
||||
add(volumeOfSeries);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,22 +72,22 @@ public class SeriesVolumesTable extends Table {
|
|||
final TableColumnModel colModel = getColumnModel();
|
||||
colModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.name").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.name")),
|
||||
TABLE_COL_EDIT));
|
||||
colModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.volume_of_series").localize()));
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.volume_of_series"))));
|
||||
colModel.add(new TableColumn(
|
||||
2,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.edit_assoc").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.edit_assoc")),
|
||||
TABLE_COL_EDIT_ASSOC));
|
||||
colModel.add(new TableColumn(
|
||||
3,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.remove")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new SeriesVolumesTableModelBuilder(itemModel));
|
||||
|
|
@ -154,11 +154,11 @@ public class SeriesVolumesTable extends Table {
|
|||
case 1:
|
||||
return volumesCollection.getVolumeOfSeries();
|
||||
case 2:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.edit_assoc").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.edit_assoc"));
|
||||
case 3:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publication.ui.series.volumes.remove").localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publication.ui.series.volumes.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -285,10 +285,8 @@ public class SeriesVolumesTable extends Table {
|
|||
|
||||
if (canDelete) {
|
||||
final ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize(
|
||||
"publications.ui.series.volumes.remove.confirm").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.volumes.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
final Label label = new Label(value.toString());
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import com.arsdigita.bebop.event.FormInitListener;
|
|||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.Folder;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.PublicationsConfig;
|
||||
|
|
@ -34,7 +33,7 @@ import com.arsdigita.cms.contenttypes.UnPublished;
|
|||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -60,14 +59,16 @@ public class UnPublishedOrganizationForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization").localize()));
|
||||
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(
|
||||
GenericOrganizationalUnit.class.getName()));
|
||||
itemSearch.setDefaultCreationFolder(config.getDefaultOrganizationsFolder());
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization"));
|
||||
add(itemSearch);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -64,13 +64,13 @@ public class UnPublishedOrganizationSheet
|
|||
TableColumnModel columnModel = getColumnModel();
|
||||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization")),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization.remove").localize(),
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization.remove")),
|
||||
TABLE_COL_DELETE));
|
||||
|
||||
setModelBuilder(new UnPublishedOrganizationSheetModelBuilder(itemModel));
|
||||
|
|
@ -141,14 +141,14 @@ public class UnPublishedOrganizationSheet
|
|||
case 0:
|
||||
return orga.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization.remove").
|
||||
localize();
|
||||
return new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKeyAt(int columnIndex) {
|
||||
return orga.getID();
|
||||
}
|
||||
|
|
@ -235,10 +235,8 @@ public class UnPublishedOrganizationSheet
|
|||
|
||||
if (canEdit) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||
globalize(
|
||||
"publications.ui.unpublished.organization.confirm_remove").
|
||||
localize());
|
||||
link.setConfirmation(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization.confirm_remove"));
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
|
|
@ -247,6 +245,7 @@ public class UnPublishedOrganizationSheet
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cellSelected(final TableActionEvent event) {
|
||||
PageState state = event.getPageState();
|
||||
|
||||
|
|
@ -260,6 +259,7 @@ public class UnPublishedOrganizationSheet
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void headSelected(final TableActionEvent event) {
|
||||
//Nothing to do
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ public class UnPublishedOrganizationStep extends SimpleEditStep {
|
|||
|
||||
BasicItemForm setOrgaForm = new UnPublishedOrganizationForm(itemModel);
|
||||
add(SET_UNPUBLISHED_ORGANIZATION_STEP,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.setOrganization").localize(),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.setOrganization"),
|
||||
new WorkflowLockedComponentAccess(setOrgaForm, itemModel),
|
||||
setOrgaForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -71,21 +71,20 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep {
|
|||
BasicPageForm editBasicSheet = new UnPublishedPropertyForm(itemModel,
|
||||
this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.edit_basic_sheet").
|
||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getUnPublishedPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties").
|
||||
localize()), basicProperties);
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -93,8 +92,8 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep {
|
|||
AuthoringKitWizard parent) {
|
||||
super.addSteps(itemModel, parent);
|
||||
|
||||
addStep(new UnPublishedOrganizationStep(itemModel,
|
||||
parent),
|
||||
"publications.ui.unpublished.organization");
|
||||
addStep(new UnPublishedOrganizationStep(itemModel,parent),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.organization"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,28 +62,30 @@ public class UnPublishedPropertyForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.place").localize()));
|
||||
ParameterModel placeParam =
|
||||
new StringParameter(InternetArticle.PLACE);
|
||||
TextField place = new TextField(placeParam);
|
||||
place.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.place"));
|
||||
add(place);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.number").localize()));
|
||||
ParameterModel numberParam =
|
||||
new StringParameter(UnPublished.NUMBER);
|
||||
TextField number = new TextField(numberParam);
|
||||
number.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.number"));
|
||||
add(number);
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.number_of_pages").localize()));
|
||||
ParameterModel numberOfPagesParam =
|
||||
new IntegerParameter(UnPublished.NUMBER_OF_PAGES);
|
||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
||||
numberOfPages.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.unpublished.number_of_pages"));
|
||||
add(numberOfPages);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -66,21 +66,20 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep {
|
|||
BasicPageForm editBasicSheet =
|
||||
new WorkingPaperPropertyForm(itemModel, this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.workingpaper.edit_basic_sheet").
|
||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.workingpaper.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getWorkingPaperPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties").
|
||||
localize()), basicProperties);
|
||||
new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
private static class ReviewedFormatter
|
||||
|
|
@ -91,6 +90,7 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(DomainObject obj, String attribute, PageState state) {
|
||||
if ((get(obj, attribute) != null)
|
||||
&& (get(obj, attribute) instanceof Boolean)
|
||||
|
|
|
|||
|
|
@ -59,12 +59,13 @@ public class WorkingPaperPropertyForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.workingpaper.reviewed")));
|
||||
reviewed = new CheckboxGroup("reviewedGroup");
|
||||
reviewed.addOption(new Option(REVIEWED, ""));
|
||||
reviewed.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.workingpaper.reviewed"));
|
||||
add(reviewed);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ public class SciDepartmentDescriptionEditForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.description")));
|
||||
|
||||
final ParameterModel descParam = new StringParameter(
|
||||
SciDepartment.DEPARTMENT_DESCRIPTION);
|
||||
final TextArea desc;
|
||||
|
|
@ -63,9 +62,12 @@ public class SciDepartmentDescriptionEditForm
|
|||
} else {
|
||||
desc = new TextArea(descParam);
|
||||
}
|
||||
desc.setLabel(SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.description"));
|
||||
desc.setCols(75);
|
||||
desc.setRows(25);
|
||||
add(desc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -51,17 +51,16 @@ public class SciDepartmentDescriptionStep extends SimpleEditStep {
|
|||
final BasicItemForm editDescFrom = new SciDepartmentDescriptionEditForm(
|
||||
itemModel);
|
||||
add(EDIT_DEPARTMENT_DESC_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.desc.edit").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.desc.edit"),
|
||||
new WorkflowLockedComponentAccess(editDescFrom, itemModel),
|
||||
editDescFrom.getSaveCancelSection().getCancelButton());
|
||||
|
||||
final SciDepartmentDescriptionUploadForm updateDescForm =
|
||||
new SciDepartmentDescriptionUploadForm(
|
||||
itemModel);
|
||||
new SciDepartmentDescriptionUploadForm(itemModel);
|
||||
add(UPDATE_DEPARTMENT_DESC_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.desc.upload").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.desc.upload"),
|
||||
new WorkflowLockedComponentAccess(updateDescForm, itemModel),
|
||||
updateDescForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import com.arsdigita.cms.contenttypes.SciDepartment;
|
|||
|
||||
/**
|
||||
* Table displaying the members of an SciDepartment. Based on the
|
||||
* {@link GenericOrganizationalUnitPersonsTable} it overwrites only the methods provided by the
|
||||
* superclass for customising the form.
|
||||
* {@link GenericOrganizationalUnitPersonsTable} it overwrites only the methods
|
||||
* provided by the superclass for customising the form.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
|
|
|
|||
|
|
@ -50,37 +50,44 @@ public class SciDepartmentProjectsStep extends SimpleEditStep {
|
|||
itemModel,
|
||||
new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() {
|
||||
|
||||
@Override
|
||||
public String getSelectSubordinateOrgaUnitLabel() {
|
||||
return (String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.select").localize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubordinateOrgaUnitType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciProject";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNothingSelectedMessage() {
|
||||
return (String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.select.nothing").
|
||||
localize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNoSuitableLanguageVariantMessage() {
|
||||
return (String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.no_suitable_language_variant").
|
||||
localize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAddingToItselfMessage() {
|
||||
return (String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.adding_to_itself").
|
||||
localize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAlreadyAddedMessage() {
|
||||
return (String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.already_added").
|
||||
|
|
@ -88,8 +95,8 @@ public class SciDepartmentProjectsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_PROJECT_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.add").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.add"),
|
||||
new WorkflowLockedComponentAccess(addProjectSheet, itemModel),
|
||||
addProjectSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -68,20 +68,19 @@ public class SciDepartmentPropertiesStep
|
|||
final BasicPageForm editBasicSheet = new SciDepartmentPropertyForm(
|
||||
itemModel, this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.edit_basic_sheet").localize(),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(getSciDepartmentPropertySheet(
|
||||
itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.edit_basic_properties").localize()),
|
||||
new Label(SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.edit_basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,16 +62,17 @@ public class SciDepartmentPropertyForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.shortdesc")));
|
||||
ParameterModel shortDescParam = new StringParameter(
|
||||
SciDepartment.DEPARTMENT_SHORT_DESCRIPTION);
|
||||
TextArea shortDesc = new TextArea(shortDescParam);
|
||||
shortDesc.addValidationListener(
|
||||
new StringInRangeValidationListener(0,
|
||||
shortDesc.addValidationListener(new StringInRangeValidationListener(
|
||||
0,
|
||||
config.getShortDescMaxLength()));
|
||||
shortDesc.setLabel(SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.shortdesc"));
|
||||
shortDesc.setCols(75);
|
||||
shortDesc.setRows(5);
|
||||
add(shortDesc);
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_SUBDEPARTMENT_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.subdepartment.add").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.subdepartment.add"),
|
||||
new WorkflowLockedComponentAccess(addSubDepartmentSheet,itemModel),
|
||||
addSubDepartmentSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ public class SciDepartmentSuperDepartmentsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_SUPER_DEPARTMENT_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.superdepartment.add").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.superdepartment.add"),
|
||||
new WorkflowLockedComponentAccess(addSuperDepartmentSheet,itemModel),
|
||||
addSuperDepartmentSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ public class SciProjectDepartmentsStep extends SimpleEditStep {
|
|||
});
|
||||
|
||||
add(ADD_DEPARTMENT_SHEET_NAME,
|
||||
(String) SciDepartmentGlobalizationUtil.globalize(
|
||||
"sciproject.ui.department.add").localize(),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"sciproject.ui.department.add"),
|
||||
new WorkflowLockedComponentAccess(addDepartmentSheet, itemModel),
|
||||
addDepartmentSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ public class SciDepartmentInstitutesStep extends SimpleEditStep {
|
|||
});
|
||||
|
||||
add(ADD_INSTITUTE_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.institute.add").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.institute.add"),
|
||||
new WorkflowLockedComponentAccess(addInstituteSheet, itemModel),
|
||||
addInstituteSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ public class SciInstituteDepartmentsStep extends SimpleEditStep {
|
|||
});
|
||||
|
||||
add(ADD_DEPARTMENT_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.departments.add").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.departments.add"),
|
||||
new WorkflowLockedComponentAccess(addDepartmentSheet, itemModel),
|
||||
addDepartmentSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ public class SciInstituteDescriptionEditForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.description")));
|
||||
|
||||
final ParameterModel descParam = new StringParameter(
|
||||
SciInstitute.INSTITUTE_DESCRIPTION);
|
||||
final TextArea desc;
|
||||
|
|
@ -44,9 +43,12 @@ public class SciInstituteDescriptionEditForm
|
|||
} else {
|
||||
desc = new TextArea(descParam);
|
||||
}
|
||||
desc.setLabel(SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.description"));
|
||||
desc.setCols(75);
|
||||
desc.setRows(25);
|
||||
add(desc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ public class SciInstituteDescriptionStep extends SimpleEditStep {
|
|||
final BasicItemForm editDescFrom = new SciInstituteDescriptionEditForm(
|
||||
itemModel);
|
||||
add(EDIT_INSTITUTE_DESC_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.desc.edit").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.desc.edit"),
|
||||
new WorkflowLockedComponentAccess(editDescFrom, itemModel),
|
||||
editDescFrom.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
@ -42,8 +42,8 @@ public class SciInstituteDescriptionStep extends SimpleEditStep {
|
|||
new SciInstituteDescriptionUploadForm(
|
||||
itemModel);
|
||||
add(UPDATE_INSTITUTE_DESC_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.desc.upload").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.desc.upload"),
|
||||
new WorkflowLockedComponentAccess(updateDescForm, itemModel),
|
||||
updateDescForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ public class SciInstituteMembersStep
|
|||
final BasicItemForm addMemberSheet = new SciInstituteMemberAddForm(
|
||||
itemModel, this);
|
||||
add(ADD_INSTITUTE_MEMBER_STEP,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.members.add").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.members.add"),
|
||||
new WorkflowLockedComponentAccess(addMemberSheet,itemModel),
|
||||
addMemberSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
@ -47,30 +47,37 @@ public class SciInstituteMembersStep
|
|||
setDisplayComponent(memberTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericPerson getSelectedPerson() {
|
||||
return selectedPerson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPerson(final GenericPerson selectedPerson) {
|
||||
this.selectedPerson = selectedPerson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedPersonRole() {
|
||||
return selectedPersonRole;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPersonRole(final String selectedPersonRole) {
|
||||
this.selectedPersonRole = selectedPersonRole;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedPersonStatus() {
|
||||
return selectedPersonStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPersonStatus(final String selectedPersonStatus) {
|
||||
this.selectedPersonStatus = selectedPersonStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showEditComponent(final PageState state) {
|
||||
showComponent(state, ADD_INSTITUTE_MEMBER_STEP);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ public class SciInstituteProjectsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_INSTITUTE_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.projects.add").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.projects.add"),
|
||||
new WorkflowLockedComponentAccess(addProjectSheet, itemModel),
|
||||
addProjectSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -50,19 +50,17 @@ public class SciInstitutePropertiesStep
|
|||
itemModel, this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.edit_basic_sheet").localize(),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(getSciInstitutePropertySheet(
|
||||
itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.edit_basic_properties").localize()),
|
||||
new Label(SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.edit_basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,16 +43,17 @@ public class SciInstitutePropertyForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.shortdesc")));
|
||||
ParameterModel shortDescParam = new StringParameter(
|
||||
SciInstitute.INSTITUTE_SHORT_DESCRIPTION);
|
||||
TextArea shortDesc = new TextArea(shortDescParam);
|
||||
shortDesc.addValidationListener(
|
||||
new StringInRangeValidationListener(0,
|
||||
config.getShortDescMaxLength()));
|
||||
shortDesc.setLabel(SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.shortdesc"));
|
||||
shortDesc.setCols(75);
|
||||
shortDesc.setRows(5);
|
||||
add(shortDesc);
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ public class SciProjectInstitutesStep extends SimpleEditStep {
|
|||
});
|
||||
|
||||
add(ADD_INSTITUTE_SHEET_NAME,
|
||||
(String) SciInstituteGlobalizationUtil.globalize(
|
||||
"sciproject.ui.institut.add").localize(),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciproject.ui.institut.add"),
|
||||
new WorkflowLockedComponentAccess(addInstitutesSheet, itemModel),
|
||||
addInstitutesSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ public class SciProjectDescriptionEditForm
|
|||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.description")));
|
||||
|
||||
final ParameterModel descParam = new StringParameter(
|
||||
SciProject.PROJECT_DESCRIPTION);
|
||||
final TextArea desc;
|
||||
|
|
@ -59,6 +58,8 @@ public class SciProjectDescriptionEditForm
|
|||
} else {
|
||||
desc = new TextArea(descParam);
|
||||
}
|
||||
desc.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.description"));
|
||||
desc.setCols(75);
|
||||
desc.setRows(25);
|
||||
add(desc);
|
||||
|
|
@ -88,9 +89,11 @@ public class SciProjectDescriptionEditForm
|
|||
});
|
||||
add(sponsorLabel);
|
||||
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize("sciproject.ui.choose_sponsor")));
|
||||
//add(new Label(SciProjectGlobalizationUtil.globalize("sciproject.ui.choose_sponsor")));
|
||||
sponsorSearch = new ItemSearchWidget(SPONSOR_SEARCH, ContentType.
|
||||
findByAssociatedObjectType(CONFIG.getSponsorType()));
|
||||
sponsorSearch.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.choose_sponsor"));
|
||||
add(sponsorSearch);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ public class SciProjectDescriptionTextEditForm extends BasicItemForm implements
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.description")));
|
||||
|
||||
final ParameterModel descParam = new StringParameter(
|
||||
SciProject.PROJECT_DESCRIPTION);
|
||||
final TextArea desc;
|
||||
|
|
@ -42,9 +41,12 @@ public class SciProjectDescriptionTextEditForm extends BasicItemForm implements
|
|||
} else {
|
||||
desc = new TextArea(descParam);
|
||||
}
|
||||
desc.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.description"));
|
||||
desc.setCols(75);
|
||||
desc.setRows(25);
|
||||
add(desc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ public class SciProjectFundingEditForm extends BasicItemForm implements FormProc
|
|||
public void addWidgets() {
|
||||
|
||||
if (CONFIG.getEnableFunding()) {
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.funding")));
|
||||
final ParameterModel fundingParam = new StringParameter(
|
||||
SciProject.FUNDING);
|
||||
final TextArea funding;
|
||||
|
|
@ -64,20 +62,22 @@ public class SciProjectFundingEditForm extends BasicItemForm implements FormProc
|
|||
} else {
|
||||
funding = new TextArea(fundingParam);
|
||||
}
|
||||
funding.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.funding"));
|
||||
funding.setCols(75);
|
||||
funding.setRows(8);
|
||||
add(funding);
|
||||
}
|
||||
|
||||
if (CONFIG.getEnableFundingVolume()) {
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.funding.volume")));
|
||||
final ParameterModel fundingVolumeParam = new StringParameter(
|
||||
SciProject.FUNDING_VOLUME);
|
||||
final TextField fundingVolume = new TextField(fundingVolumeParam);
|
||||
fundingVolume.addValidationListener(new StringInRangeValidationListener(
|
||||
0,
|
||||
CONFIG.getFundingVolumeLength()));
|
||||
fundingVolume.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.funding.volume"));
|
||||
add(fundingVolume);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class SciProjectInvolvedOrganizationsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_INVOLVED_ORGANIZATION_STEP,
|
||||
(String) SciProjectGlobalizationUtil.globalize("sciproject.ui.involved_orgas.add").localize(),
|
||||
SciProjectGlobalizationUtil.globalize("sciproject.ui.involved_orgas.add"),
|
||||
new WorkflowLockedComponentAccess(addInvolvedOrgaSheet, itemModel),
|
||||
addInvolvedOrgaSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ implements GenericOrganizationalUnitPersonSelector{
|
|||
final BasicItemForm addMemberSheet = new SciProjectMemberAddForm(
|
||||
itemModel, this);
|
||||
add(ADD_PROJECT_MEMBER_SHEET_NAME,
|
||||
(String) SciProjectGlobalizationUtil.globalize("sciproject.ui.members.add").localize(),
|
||||
SciProjectGlobalizationUtil.globalize("sciproject.ui.members.add"),
|
||||
new WorkflowLockedComponentAccess(addMemberSheet, itemModel),
|
||||
addMemberSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
@ -47,30 +47,37 @@ implements GenericOrganizationalUnitPersonSelector{
|
|||
setDisplayComponent(memberTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericPerson getSelectedPerson() {
|
||||
return selectedPerson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPerson(final GenericPerson selectedPerson) {
|
||||
this.selectedPerson = selectedPerson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedPersonRole() {
|
||||
return selectedPersonRole;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPersonRole(final String selectedPersonRole) {
|
||||
this.selectedPersonRole = selectedPersonRole;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedPersonStatus() {
|
||||
return selectedPersonStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedPersonStatus(final String selectedPersonStatus) {
|
||||
this.selectedPersonStatus = selectedPersonStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showEditComponent(final PageState state) {
|
||||
showComponent(state, ADD_PROJECT_MEMBER_SHEET_NAME);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,21 +133,19 @@ public class SciProjectPropertiesStep
|
|||
itemModel,
|
||||
this);
|
||||
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
(String) SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.edit_basic_sheet").localize(),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection().
|
||||
getCancelButton());
|
||||
basicProperties.add(
|
||||
EDIT_SHEET_NAME,
|
||||
SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.edit_basic_sheet"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,itemModel),
|
||||
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getSciProjectPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.edit_basic_properties").
|
||||
localize()),
|
||||
new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.edit_basic_properties")),
|
||||
basicProperties);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ public class SciProjectPropertyForm
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
|
||||
super.addWidgets();
|
||||
|
||||
final ParameterModel beginSkipMonthParam =
|
||||
|
|
@ -61,14 +62,14 @@ public class SciProjectPropertyForm
|
|||
final Hidden beginSkipDay = new Hidden(beginSkipDayParam);
|
||||
add(beginSkipDay);
|
||||
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.begin")));
|
||||
final IncompleteDateParameter beginParam =
|
||||
new IncompleteDateParameter(SciProject.BEGIN);
|
||||
beginParam.allowSkipMonth(true);
|
||||
beginParam.allowSkipDay(true);
|
||||
final Calendar today = new GregorianCalendar();
|
||||
final Date begin = new Date(beginParam);
|
||||
begin.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.begin"));
|
||||
begin.setAutoCurrentYear(false);
|
||||
begin.setYearRange(1970, (today.get(Calendar.YEAR) + 2));
|
||||
add(begin);
|
||||
|
|
@ -81,26 +82,27 @@ public class SciProjectPropertyForm
|
|||
final ParameterModel endSkipDayParam = new BooleanParameter(
|
||||
SciProject.END_SKIP_DAY);
|
||||
final Hidden endSkipDay = new Hidden(endSkipDayParam);
|
||||
// endSkipDay.setLabel(null);
|
||||
add(endSkipDay);
|
||||
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.end")));
|
||||
final IncompleteDateParameter endParam = new IncompleteDateParameter(SciProject.END);
|
||||
endParam.allowSkipMonth(true);
|
||||
endParam.allowSkipDay(true);
|
||||
Date end = new Date(endParam);
|
||||
end.setAutoCurrentYear(false);
|
||||
end.setYearRange(1970, (today.get(Calendar.YEAR) + 8));
|
||||
end.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.end"));
|
||||
add(end);
|
||||
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.shortdesc")));
|
||||
ParameterModel shortDescParam = new StringParameter(
|
||||
SciProject.PROJECT_SHORT_DESCRIPTION);
|
||||
TextArea shortDesc = new TextArea(shortDescParam);
|
||||
shortDesc.addValidationListener(
|
||||
new StringInRangeValidationListener(0,
|
||||
config.getShortDescMaxLength()));
|
||||
shortDesc.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.shortdesc"));
|
||||
shortDesc.setCols(75);
|
||||
shortDesc.setRows(5);
|
||||
add(shortDesc);
|
||||
|
|
|
|||
|
|
@ -13,12 +13,10 @@ import com.arsdigita.cms.ContentType;
|
|||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.SciProject;
|
||||
import com.arsdigita.cms.contenttypes.SciProjectConfig;
|
||||
import com.arsdigita.cms.contenttypes.SciProjectSponsorCollection;
|
||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,17 +44,20 @@ public class SciProjectSponsorForm extends BasicItemForm implements FormInitList
|
|||
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize("sciproject.ui.sponsor")));
|
||||
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType(
|
||||
GenericOrganizationalUnit.class.getName()));
|
||||
itemSearch.setEditAfterCreate(false);
|
||||
itemSearch.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor"));
|
||||
add(itemSearch);
|
||||
|
||||
selectedSponsorLabel = new Label("");
|
||||
selectedSponsorLabel = new Label();
|
||||
add(selectedSponsorLabel);
|
||||
|
||||
add(new Label(SciProjectGlobalizationUtil.globalize("sciproject.ui.sponsor_fundingcode")));
|
||||
fundingCode = new TextField(FUNDING_CODE);
|
||||
fundingCode.setLabel(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor_fundingcode"));
|
||||
add(fundingCode);
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +160,8 @@ public class SciProjectSponsorForm extends BasicItemForm implements FormInitList
|
|||
|
||||
if ((((SciProjectSponsorStep) editStep).getSelectedSponsor() == null)
|
||||
&& (data.get(ITEM_SEARCH) == null)) {
|
||||
data.addError(SciProjectGlobalizationUtil.globalize("sciproject.ui.sponsor_no_sponsor_selected"));
|
||||
data.addError(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor_no_sponsor_selected"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,11 +143,11 @@ public class SciProjectSponsorSheet extends Table {
|
|||
case 1:
|
||||
return sponsors.getFundingCode();
|
||||
case 2:
|
||||
return SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.edit_assoc").localize();
|
||||
return new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.edit_assoc"));
|
||||
case 3:
|
||||
return SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.remove").localize();
|
||||
return new Label(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.remove"));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -251,8 +251,8 @@ public class SciProjectSponsorSheet extends Table {
|
|||
sponsor);
|
||||
if (canEdit) {
|
||||
final ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation((String) SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.remove.confirm").localize());
|
||||
link.setConfirmation(SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.sponsor.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
return new Label("");
|
||||
|
|
@ -273,7 +273,7 @@ public class SciProjectSponsorSheet extends Table {
|
|||
int row,
|
||||
int col) {
|
||||
if (0 == row) {
|
||||
final Label label = new Label("");
|
||||
final Label label = new Label();
|
||||
return label;
|
||||
} else {
|
||||
final ControlLink link = new ControlLink("up");
|
||||
|
|
@ -301,7 +301,7 @@ public class SciProjectSponsorSheet extends Table {
|
|||
final SciProjectSponsorCollection sponsors = project.getSponsors();
|
||||
|
||||
if ((sponsors.size() - 1) == row) {
|
||||
final Label label = new Label("");
|
||||
final Label label = new Label();
|
||||
return label;
|
||||
} else {
|
||||
final ControlLink link = new ControlLink("down");
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class SciProjectSponsorStep extends SimpleEditStep {
|
|||
|
||||
final BasicItemForm sponsorForm = new SciProjectSponsorForm(itemModel, this);
|
||||
add(SCIPROJECT_SPONSOR_STEP,
|
||||
(String) SciProjectGlobalizationUtil.globalize("sciproject.ui.sponsor.add").localize(),
|
||||
SciProjectGlobalizationUtil.globalize("sciproject.ui.sponsor.add"),
|
||||
new WorkflowLockedComponentAccess(sponsorForm, itemModel),
|
||||
sponsorForm.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ public class SciProjectSubProjectsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_SUBPROJECT_SHEET_NAME,
|
||||
(String) SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.subproject.add").localize(),
|
||||
SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.subproject.add"),
|
||||
new WorkflowLockedComponentAccess(addSubProjectSheet, itemModel),
|
||||
addSubProjectSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class SciProjectSuperProjectsStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
add(ADD_SUPERPROJECT_SHEET_NAME,
|
||||
(String) SciProjectGlobalizationUtil.globalize("sciproject.ui.superproject.add").localize(),
|
||||
SciProjectGlobalizationUtil.globalize("sciproject.ui.superproject.add"),
|
||||
new WorkflowLockedComponentAccess(addSuperProjectSheet, itemModel),
|
||||
addSuperProjectSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.shortcuts.ui;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -81,9 +80,9 @@ public class ShortcutForm extends Form {
|
|||
ParameterData data = e.getParameterData();
|
||||
|
||||
String key = (String) data.getValue();
|
||||
if (key == null)
|
||||
if (key == null) {
|
||||
return; // Something else will handle
|
||||
// this
|
||||
} // this
|
||||
|
||||
Perl5Util perl = new Perl5Util();
|
||||
try {
|
||||
|
|
@ -107,23 +106,26 @@ public class ShortcutForm extends Form {
|
|||
ParameterData data = e.getParameterData();
|
||||
|
||||
String url = (String) data.getValue();
|
||||
if (url == null)
|
||||
if (url == null) {
|
||||
return; // Something else will handle
|
||||
// this
|
||||
} // this
|
||||
|
||||
url = url.toLowerCase();
|
||||
|
||||
// Absolute local url is ok
|
||||
if (url.startsWith("/"))
|
||||
if (url.startsWith("/")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fully qualified url is ok
|
||||
if (url.startsWith("http://"))
|
||||
if (url.startsWith("http://")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// And secure ones too
|
||||
if (url.startsWith("https://"))
|
||||
if (url.startsWith("https://")) {
|
||||
return;
|
||||
}
|
||||
|
||||
data
|
||||
.addError("You must enter an absolute path "
|
||||
|
|
@ -147,6 +149,7 @@ public class ShortcutForm extends Form {
|
|||
}
|
||||
|
||||
private class ShortcutInitListener implements FormInitListener {
|
||||
|
||||
@Override
|
||||
public void init(FormSectionEvent ev) throws FormProcessException {
|
||||
PageState state = ev.getPageState();
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ public class SiteForm extends Form {
|
|||
m_title.setMetaDataAttribute("title", "Title");
|
||||
m_title.setHint(SubsiteGlobalizationUtil.globalize("subsite.ui.title.hint"));
|
||||
m_title.setSize(40);
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.title.label")));
|
||||
m_title.setLabel(SubsiteGlobalizationUtil.globalize("subsite.ui.title.label"));
|
||||
add(m_title); // adds title input field to form
|
||||
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ public class SiteForm extends Form {
|
|||
m_hostname.setMetaDataAttribute("title", "Hostname");
|
||||
m_hostname.setSize(40);
|
||||
m_hostname.setHint(SubsiteGlobalizationUtil.globalize("subsite.ui.hostname.hint"));
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.hostname.label")));
|
||||
m_hostname.setLabel(SubsiteGlobalizationUtil.globalize("subsite.ui.hostname.label"));
|
||||
add(m_hostname); // adds hostname input field to form
|
||||
|
||||
|
||||
|
|
@ -144,7 +144,8 @@ public class SiteForm extends Form {
|
|||
m_description.setRows(4);
|
||||
m_description.setHint(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.description.hint"));
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.description.label")));
|
||||
m_description.setLabel(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.description.label"));
|
||||
add(m_description); // adds description input field to form
|
||||
|
||||
|
||||
|
|
@ -161,7 +162,8 @@ public class SiteForm extends Form {
|
|||
} catch (TooManyListenersException ex) {
|
||||
throw new UncheckedWrapperException("This cannot happen", ex);
|
||||
}
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.customfrontpage.label")));
|
||||
m_customFrontpageApp.setLabel(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.customfrontpage.label"));
|
||||
add(m_customFrontpageApp); // adds selectfield start page to form
|
||||
|
||||
|
||||
|
|
@ -174,7 +176,7 @@ public class SiteForm extends Form {
|
|||
} catch (TooManyListenersException ex) {
|
||||
throw new UncheckedWrapperException("This cannot happen", ex);
|
||||
}
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.theme.label")));
|
||||
m_themes.setLabel(SubsiteGlobalizationUtil.globalize("subsite.ui.theme.label"));
|
||||
add(m_themes); // adds themes selection box to form
|
||||
|
||||
|
||||
|
|
@ -183,11 +185,11 @@ public class SiteForm extends Form {
|
|||
m_styleDir.setMetaDataAttribute("title", "XSLT Directory (Other)");
|
||||
m_styleDir.setSize(40);
|
||||
m_styleDir.setHint(globalize("subsite.ui.styledir.hint") );
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.styledir.label")));
|
||||
m_styleDir.setLabel(SubsiteGlobalizationUtil.globalize("subsite.ui.styledir.label"));
|
||||
add(m_styleDir); // adds inputfield style dir to form
|
||||
|
||||
|
||||
/* Setup selection box for cagtegory domain */
|
||||
/* Setup selection box for category domain */
|
||||
m_rootCategory = (CategoryPicker) Classes.newInstance(
|
||||
Subsite.getConfig().getRootCategoryPicker(),
|
||||
new Class[]{String.class},
|
||||
|
|
@ -196,8 +198,12 @@ public class SiteForm extends Form {
|
|||
((Widget) m_rootCategory).setMetaDataAttribute("title", "Root category");
|
||||
((Widget) m_rootCategory).setHint(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.root_category.hint"));
|
||||
((Widget) m_rootCategory).setLabel(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.root_category.label"));
|
||||
} else {
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.root_category.label")));
|
||||
}
|
||||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.root_category.label")));
|
||||
add(m_rootCategory); // adds domain category selection box to form
|
||||
|
||||
m_buttons = new SaveCancelSection();
|
||||
|
|
|
|||
|
|
@ -37,26 +37,20 @@ import com.arsdigita.bebop.parameters.GlobalizedParameterListener;
|
|||
import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
|
||||
import com.arsdigita.bebop.parameters.ParameterData;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
//import com.arsdigita.util.IO;
|
||||
import com.arsdigita.themedirector.ThemeDirectorConstants;
|
||||
import com.arsdigita.themedirector.ThemeDirector;
|
||||
import com.arsdigita.themedirector.util.GlobalizationUtil;
|
||||
//import com.arsdigita.themedirector.util.ManifestReader;
|
||||
import com.arsdigita.subsite.Subsite;
|
||||
import com.arsdigita.subsite.Site;
|
||||
import com.arsdigita.toolbox.ui.Cancellable;
|
||||
import com.arsdigita.web.Web;
|
||||
|
||||
import java.io.File;
|
||||
//import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
//import java.io.InputStream;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
//import org.apache.commons.io.filefilter.DirectoryFileFilter;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -105,19 +99,14 @@ public class ThemeForm extends Form implements Cancellable, ThemeDirectorConstan
|
|||
m_theme = theme; // Initialize ThemeSelectionModel
|
||||
|
||||
// Add the Title input field
|
||||
// add(new Label(GlobalizationUtil.globalize("theme.title")));
|
||||
m_title = new TextField(new StringParameter("title"));
|
||||
// Experimental. We are migrating the Label if a widget as part of the
|
||||
// widgets's xml properties.
|
||||
m_title.setLabel(GlobalizationUtil.globalize("theme.title"));
|
||||
m_title.addValidationListener(new NotEmptyValidationListener());
|
||||
m_title.setHint(GlobalizationUtil.globalize("theme.title_hint"));
|
||||
m_title.setSize(40);
|
||||
add(m_title);
|
||||
|
||||
// add(new Label(GlobalizationUtil.globalize("theme.description")));
|
||||
m_description = new TextArea(new StringParameter("description"));
|
||||
// Experimental, see above
|
||||
m_description.setLabel(GlobalizationUtil.globalize("theme.description"));
|
||||
m_description.setCols(40);
|
||||
m_description.setRows(4);
|
||||
|
|
@ -125,9 +114,7 @@ public class ThemeForm extends Form implements Cancellable, ThemeDirectorConstan
|
|||
.globalize("theme.description_hint"));
|
||||
add(m_description);
|
||||
|
||||
// add(new Label(GlobalizationUtil.globalize("theme.url")));
|
||||
m_url = new TextField(new StringParameter("url"));
|
||||
// Experimental, see above
|
||||
m_url.setLabel(GlobalizationUtil.globalize("theme.url"));
|
||||
m_url.addValidationListener(new NotEmptyValidationListener());
|
||||
m_url.addValidationListener(new URLFormValidationListener());
|
||||
|
|
|
|||
Loading…
Reference in New Issue