diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java index 896d16b51..277a2282d 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java @@ -95,12 +95,8 @@ public class Paginator { logger.debug(String.format("Applying limits: %d, %d", getBegin(), - getEnd())); - /*if (getBegin() == getEnd()) { - query.setRange(getBegin(), getEnd() + 1); - } else {*/ - query.setRange(getBegin(), getEnd() + 1); - //} + getEnd())); + query.setRange(getBegin(), getEnd() + 1); } public int getPageCount() { diff --git a/ccm-core/src/com/arsdigita/bebop/form/Date.java b/ccm-core/src/com/arsdigita/bebop/form/Date.java index b80e3773b..abea49267 100755 --- a/ccm-core/src/com/arsdigita/bebop/form/Date.java +++ b/ccm-core/src/com/arsdigita/bebop/form/Date.java @@ -59,18 +59,19 @@ public class Date extends Widget implements BebopConstants { protected TextField m_day; private int m_year_begin; private int m_year_end; - private Locale m_locale; + private Locale m_locale; // Inner classes for the fragment widgets protected class YearFragment extends SingleSelect { protected Date parent; - + private boolean autoCurrentYear; //Decide wether to set the current year if year is null + public YearFragment(String name, Date parent) { super(name); this.parent = parent; } - + @Override protected ParameterData getParameterData(PageState ps) { Object value = getValue(ps); @@ -79,6 +80,10 @@ public class Date extends Widget implements BebopConstants { } return new ParameterData(getParameterModel(), value); } + + public void setAutoCurrentYear(final boolean autoCurrentYear) { + this.autoCurrentYear = autoCurrentYear; + } @Override public Object getValue(PageState ps) { @@ -89,7 +94,7 @@ public class Date extends Widget implements BebopConstants { } } Object value = parent.getFragmentValue(ps, Calendar.YEAR); - if (value == null) { + if ((value == null) && autoCurrentYear) { Calendar currentTime = GregorianCalendar.getInstance(); int currentYear = currentTime.get(Calendar.YEAR); value = new Integer(currentYear); @@ -195,6 +200,10 @@ public class Date extends Widget implements BebopConstants { this(new DateParameter(name)); } + public void setAutoCurrentYear(final boolean autoCurrentYear) { + ((YearFragment) m_year).setAutoCurrentYear(autoCurrentYear); + } + public void setYearRange(int yearBegin, int yearEnd) { Assert.isUnlocked(this); if (yearBegin != m_year_begin || yearEnd != m_year_end) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java index 1c9049e6b..68255fb2f 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java @@ -163,7 +163,7 @@ public class PublicationWithPublisher extends Publication { * @param publisher The publisher of the publication. */ public void setPublisher(Publisher publisher) { - Publisher oldPublisher; + final Publisher oldPublisher; oldPublisher = getPublisher(); if (oldPublisher != null) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java index 0baa3f5a1..354d73d4e 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java @@ -33,10 +33,8 @@ import com.arsdigita.bebop.parameters.IntegerParameter; import com.arsdigita.bebop.parameters.ParameterData; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.PublicationWithPublisher; -import com.arsdigita.cms.contenttypes.Publisher; import com.arsdigita.cms.ui.ItemSearchWidget; import org.apache.log4j.Logger; diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherSetPublisherSheet.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherSetPublisherSheet.java index 14f6d06f9..2c9080259 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherSetPublisherSheet.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherSetPublisherSheet.java @@ -54,7 +54,7 @@ public class PublicationWithPublisherSetPublisherSheet 1, PublicationGlobalizationUtil.globalize( "publications.ui.with_publisher.publisher.remove").localize(), - TABLE_COL_EDIT)); + TABLE_COL_DEL)); setModelBuilder(new PublicationWithPublisherSetPublisherSheetModelBuilder( itemModel)); diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/SciProjectConfig.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/SciProjectConfig.java index 6f356c640..2b0d31744 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/SciProjectConfig.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/SciProjectConfig.java @@ -29,7 +29,7 @@ public class SciProjectConfig extends AbstractConfig { private final Parameter tabs; public SciProjectConfig() { - + enableSubProjectsStep = new BooleanParameter( "com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step", diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectDescTab.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectDescTab.java index 3987a8c6c..454287b5b 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectDescTab.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectDescTab.java @@ -7,7 +7,8 @@ import com.arsdigita.xml.Element; import org.apache.log4j.Logger; /** - * + * Displays the description text for a project. + * * @author Jens Pelzetter * @version $Id$ */ diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java index 29ae24735..08df3895a 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java @@ -68,6 +68,7 @@ public class SciProjectPropertyForm beginParam.allowSkipDay(true); final Calendar today = new GregorianCalendar(); final Date begin = new Date(beginParam); + begin.setAutoCurrentYear(false); begin.setYearRange(1970, (today.get(Calendar.YEAR) + 2)); add(begin); @@ -87,6 +88,7 @@ public class SciProjectPropertyForm endParam.allowSkipMonth(true); endParam.allowSkipDay(true); Date end = new Date(endParam); + end.setAutoCurrentYear(false); end.setYearRange(1970, (today.get(Calendar.YEAR) + 8)); add(end); diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSummaryTab.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSummaryTab.java index 392386b41..fea69754d 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSummaryTab.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSummaryTab.java @@ -25,7 +25,10 @@ import java.util.Locale; import org.apache.log4j.Logger; /** - * + * Summary tab for projects, displays lifespan of the project, the short + * description, the project team (aka members), a contact, the involved + * organizations and the information about the funding of the project. + * * @author Jens Pelzetter * @version $Id$ */ @@ -350,7 +353,8 @@ public class SciProjectSummaryTab implements GenericOrgaUnitTab { final long start = System.currentTimeMillis(); final XmlGenerator generator = new XmlGenerator(involved); generator.setUseExtraXml(false); - generator.generateXML(state, parent, ""); + generator.setItemElemName("organization", ""); + generator.generateXML(state, parent, ""); logger.debug(String.format("Generated XML for involved organization " + "'%s' in %d ms.", involved.getName(),