- Disabled placeholder text for hints. A hint is shown only if there is a real hint text
- Added an option to the Date widget to show the years in descending order - Some fixes for ccm-sci-assets-publicationspersons, including the rendering in the Mandalay theme git-svn-id: https://svn.libreccm.org/ccm/trunk@2809 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
f9e7bc9c82
commit
0908a339fc
|
|
@ -43,8 +43,7 @@ abstract public class DescriptiveComponent extends SimpleComponent {
|
|||
|
||||
/** Property to store informational text for the user about the Link, e.g.
|
||||
* how to use it, or when to use it (or not to use it). */
|
||||
private GlobalizedMessage m_hint = GlobalizationUtil
|
||||
.globalize("bebop.hint.no_entry_yet");
|
||||
private GlobalizedMessage m_hint; //= GlobalizationUtil.globalize("bebop.hint.no_entry_yet");
|
||||
|
||||
/** Property to store a (localized) label (or title) of this widget. A
|
||||
* label is the text (name) displayed for the user to identify and
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
private int m_year_begin;
|
||||
private int m_year_end;
|
||||
private Locale m_locale;
|
||||
private boolean yearAsc = true;
|
||||
|
||||
/**
|
||||
* Inner class for the year fragment
|
||||
|
|
@ -70,6 +71,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param name
|
||||
* @param parent
|
||||
*/
|
||||
|
|
@ -82,6 +84,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
/**
|
||||
*
|
||||
* @param ps
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -104,6 +107,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
/**
|
||||
*
|
||||
* @param ps
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -228,6 +232,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
public Date(String name) {
|
||||
|
|
@ -250,17 +255,32 @@ public class Date extends Widget implements BebopConstants {
|
|||
// a) skipYearAllowed is true
|
||||
// b) skipDayAllowed is true and skipMonthAllowed is true, to unset a date
|
||||
if (((IncompleteDateParameter) this.getParameterModel()).isSkipYearAllowed()
|
||||
|| (((IncompleteDateParameter) this.getParameterModel()).isSkipDayAllowed()
|
||||
&& ((IncompleteDateParameter) this.getParameterModel()).isSkipMonthAllowed())) {
|
||||
|| (((IncompleteDateParameter) this.getParameterModel()).isSkipDayAllowed()
|
||||
&& ((IncompleteDateParameter) this.getParameterModel())
|
||||
.isSkipMonthAllowed())) {
|
||||
m_year.addOption(new Option("", ""));
|
||||
}
|
||||
}
|
||||
for (int year = m_year_begin; year <= m_year_end; year += 1) {
|
||||
m_year.addOption(new Option(String.valueOf(year)));
|
||||
if (yearAsc) {
|
||||
for (int year = m_year_begin; year <= m_year_end; year++) {
|
||||
m_year.addOption(new Option(String.valueOf(year)));
|
||||
}
|
||||
} else {
|
||||
for(int year = m_year_end; year >= m_year_begin; year--) {
|
||||
m_year.addOption(new Option(String.valueOf(year)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getYearAsc() {
|
||||
return yearAsc;
|
||||
}
|
||||
|
||||
public void setYearAsc(final boolean yearAsc) {
|
||||
this.yearAsc = yearAsc;
|
||||
}
|
||||
|
||||
public void addYear(java.util.Date date) {
|
||||
Calendar cal = new GregorianCalendar();
|
||||
cal.setTime(date);
|
||||
|
|
@ -276,6 +296,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
|
||||
/**
|
||||
* Returns a string naming the type of this widget.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -286,6 +307,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
/**
|
||||
* Sets the <tt>MAXLENGTH</tt> attribute for the <tt>INPUT</tt> tag used to render this form
|
||||
* element.
|
||||
*
|
||||
* @param length
|
||||
*/
|
||||
public void setMaxLength(int length) {
|
||||
|
|
@ -299,6 +321,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
|
||||
/**
|
||||
* The XML tag for this derived class of Widget.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class SciPublicationsPersonsService {
|
|||
if (publicationsAsset == null) {
|
||||
SciPublicationsPersonsPersonsPublications.create(person);
|
||||
} else {
|
||||
final SciPublicationsPersonsPublicationsPersons publications = new SciPublicationsPersonsPublicationsPersons(publicationsAsset);
|
||||
final SciPublicationsPersonsPersonsPublications publications = new SciPublicationsPersonsPersonsPublications(publicationsAsset);
|
||||
publications.update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,14 +86,16 @@ public class SciPublicationsPersonsPersonForm extends BasicItemForm {
|
|||
final ParameterModel relationParam = new StringParameter(RELATION);
|
||||
final SingleSelect relationSelect = new SingleSelect(relationParam);
|
||||
relationSelect.addValidationListener(new NotNullValidationListener());
|
||||
relationSelect.addOption(new Option("", new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.ui.select_one"))));
|
||||
|
||||
try {
|
||||
relationSelect.addPrintListener(new PrintListener() {
|
||||
|
||||
@Override
|
||||
public void prepare(final PrintEvent event) {
|
||||
final SingleSelect target = (SingleSelect) event.getTarget();
|
||||
target.clearOptions();
|
||||
target.addOption(new Option("", new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.ui.select_one"))));
|
||||
final RelationAttributeCollection relations = new RelationAttributeCollection(
|
||||
SciPublicationsPersonsService.RELATION_ATTRIBUTE);
|
||||
relations.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
<line id="discussingPublications/heading">Wird in folgenden Publikationen behandelt</line>
|
||||
<line id="discussedPublications/heading">Behandelt folgende Publikationen</line>
|
||||
<line id="librarySignatures/heading">Bibliotheken</line>
|
||||
<line id="relatedPersons/heading">Personen in dieser Publikation</line>
|
||||
|
||||
<line id="assignedTerms">Schlüsselwörter</line>
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
<line id="assignedTerms">Keywords</line>
|
||||
|
||||
<line id="librarySignatures/heading">Libraries</line>
|
||||
<line id="relatedPersons/heading">Persons discussed by this publication</line>
|
||||
|
||||
<line id="articleInCollectedVolume/abstract">Abstract</line>
|
||||
<line id="articleInCollectedVolume/authors">Authors</line>
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@ XSL file for displaying the informations from the related persons asset.
|
|||
<xsl:text>, </xsl:text>
|
||||
<xsl:value-of select="./titlepost"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(./@relation) > 0">
|
||||
<span>
|
||||
<xsl:value-of select="concat(' (', ./@relation, ')')"/>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class ArticleInJournalPropertyForm
|
|||
com.arsdigita.bebop.form.Date pubDate =
|
||||
new com.arsdigita.bebop.form.Date(
|
||||
pubDateParam);
|
||||
pubDate.setYearAsc(false);
|
||||
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
||||
pubDate.setLabel(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.articleinjournal.publicationDate"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue