Verschiedene Fehlerkorrekturen und Dokumentation.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1373 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
bf2f522ae6
commit
1ab1853eef
|
|
@ -96,11 +96,7 @@ public class Paginator {
|
||||||
logger.debug(String.format("Applying limits: %d, %d",
|
logger.debug(String.format("Applying limits: %d, %d",
|
||||||
getBegin(),
|
getBegin(),
|
||||||
getEnd()));
|
getEnd()));
|
||||||
/*if (getBegin() == getEnd()) {
|
|
||||||
query.setRange(getBegin(), getEnd() + 1);
|
query.setRange(getBegin(), getEnd() + 1);
|
||||||
} else {*/
|
|
||||||
query.setRange(getBegin(), getEnd() + 1);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPageCount() {
|
public int getPageCount() {
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
protected class YearFragment extends SingleSelect {
|
protected class YearFragment extends SingleSelect {
|
||||||
|
|
||||||
protected Date parent;
|
protected Date parent;
|
||||||
|
private boolean autoCurrentYear; //Decide wether to set the current year if year is null
|
||||||
|
|
||||||
public YearFragment(String name, Date parent) {
|
public YearFragment(String name, Date parent) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
@ -80,6 +81,10 @@ public class Date extends Widget implements BebopConstants {
|
||||||
return new ParameterData(getParameterModel(), value);
|
return new ParameterData(getParameterModel(), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
||||||
|
this.autoCurrentYear = autoCurrentYear;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValue(PageState ps) {
|
public Object getValue(PageState ps) {
|
||||||
ParameterModel model = parent.getParameterModel();
|
ParameterModel model = parent.getParameterModel();
|
||||||
|
|
@ -89,7 +94,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object value = parent.getFragmentValue(ps, Calendar.YEAR);
|
Object value = parent.getFragmentValue(ps, Calendar.YEAR);
|
||||||
if (value == null) {
|
if ((value == null) && autoCurrentYear) {
|
||||||
Calendar currentTime = GregorianCalendar.getInstance();
|
Calendar currentTime = GregorianCalendar.getInstance();
|
||||||
int currentYear = currentTime.get(Calendar.YEAR);
|
int currentYear = currentTime.get(Calendar.YEAR);
|
||||||
value = new Integer(currentYear);
|
value = new Integer(currentYear);
|
||||||
|
|
@ -195,6 +200,10 @@ public class Date extends Widget implements BebopConstants {
|
||||||
this(new DateParameter(name));
|
this(new DateParameter(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
||||||
|
((YearFragment) m_year).setAutoCurrentYear(autoCurrentYear);
|
||||||
|
}
|
||||||
|
|
||||||
public void setYearRange(int yearBegin, int yearEnd) {
|
public void setYearRange(int yearBegin, int yearEnd) {
|
||||||
Assert.isUnlocked(this);
|
Assert.isUnlocked(this);
|
||||||
if (yearBegin != m_year_begin || yearEnd != m_year_end) {
|
if (yearBegin != m_year_begin || yearEnd != m_year_end) {
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ public class PublicationWithPublisher extends Publication {
|
||||||
* @param publisher The publisher of the publication.
|
* @param publisher The publisher of the publication.
|
||||||
*/
|
*/
|
||||||
public void setPublisher(Publisher publisher) {
|
public void setPublisher(Publisher publisher) {
|
||||||
Publisher oldPublisher;
|
final Publisher oldPublisher;
|
||||||
|
|
||||||
oldPublisher = getPublisher();
|
oldPublisher = getPublisher();
|
||||||
if (oldPublisher != null) {
|
if (oldPublisher != null) {
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,8 @@ import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||||
import com.arsdigita.bebop.parameters.ParameterData;
|
import com.arsdigita.bebop.parameters.ParameterData;
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
import com.arsdigita.cms.ContentType;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||||
import com.arsdigita.cms.contenttypes.Publisher;
|
|
||||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class PublicationWithPublisherSetPublisherSheet
|
||||||
1,
|
1,
|
||||||
PublicationGlobalizationUtil.globalize(
|
PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.with_publisher.publisher.remove").localize(),
|
"publications.ui.with_publisher.publisher.remove").localize(),
|
||||||
TABLE_COL_EDIT));
|
TABLE_COL_DEL));
|
||||||
|
|
||||||
setModelBuilder(new PublicationWithPublisherSetPublisherSheetModelBuilder(
|
setModelBuilder(new PublicationWithPublisherSetPublisherSheetModelBuilder(
|
||||||
itemModel));
|
itemModel));
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.arsdigita.xml.Element;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Displays the description text for a project.
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ public class SciProjectPropertyForm
|
||||||
beginParam.allowSkipDay(true);
|
beginParam.allowSkipDay(true);
|
||||||
final Calendar today = new GregorianCalendar();
|
final Calendar today = new GregorianCalendar();
|
||||||
final Date begin = new Date(beginParam);
|
final Date begin = new Date(beginParam);
|
||||||
|
begin.setAutoCurrentYear(false);
|
||||||
begin.setYearRange(1970, (today.get(Calendar.YEAR) + 2));
|
begin.setYearRange(1970, (today.get(Calendar.YEAR) + 2));
|
||||||
add(begin);
|
add(begin);
|
||||||
|
|
||||||
|
|
@ -87,6 +88,7 @@ public class SciProjectPropertyForm
|
||||||
endParam.allowSkipMonth(true);
|
endParam.allowSkipMonth(true);
|
||||||
endParam.allowSkipDay(true);
|
endParam.allowSkipDay(true);
|
||||||
Date end = new Date(endParam);
|
Date end = new Date(endParam);
|
||||||
|
end.setAutoCurrentYear(false);
|
||||||
end.setYearRange(1970, (today.get(Calendar.YEAR) + 8));
|
end.setYearRange(1970, (today.get(Calendar.YEAR) + 8));
|
||||||
add(end);
|
add(end);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ import java.util.Locale;
|
||||||
import org.apache.log4j.Logger;
|
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
|
* @author Jens Pelzetter
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
|
|
@ -350,6 +353,7 @@ public class SciProjectSummaryTab implements GenericOrgaUnitTab {
|
||||||
final long start = System.currentTimeMillis();
|
final long start = System.currentTimeMillis();
|
||||||
final XmlGenerator generator = new XmlGenerator(involved);
|
final XmlGenerator generator = new XmlGenerator(involved);
|
||||||
generator.setUseExtraXml(false);
|
generator.setUseExtraXml(false);
|
||||||
|
generator.setItemElemName("organization", "");
|
||||||
generator.generateXML(state, parent, "");
|
generator.generateXML(state, parent, "");
|
||||||
logger.debug(String.format("Generated XML for involved organization "
|
logger.debug(String.format("Generated XML for involved organization "
|
||||||
+ "'%s' in %d ms.",
|
+ "'%s' in %d ms.",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue