New content type for historic dates.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2573 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-03-19 15:43:38 +00:00
parent d35d482c7a
commit 0702b6ac53
26 changed files with 1386 additions and 150 deletions

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-types-historicdate"
prettyName="Red Hat CCM Content Types"
version="6.6.0"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
</ccm:dependencies>
<ccm:directories>
<ccm:directory name="pdl"/>
<ccm:directory name="sql"/>
<ccm:directory name="src"/>
</ccm:directories>
<ccm:contacts>
<ccm:contact uri="http://www.redhat.com/software/ccm" type="website"/>
<ccm:contact uri="mailto:ccm@redhat.com" type="support"/>
</ccm:contacts>
<ccm:description>
A content type for describing historic dates
</ccm:description>
</ccm:application>

View File

@ -0,0 +1,39 @@
//
// Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// $Id$
model com.arsdigita.cms.contenttypes;
//Object type for historic dates
object type HistoricDate extends GenericArticle {
String[0..1] lead = ct_historicdate.lead VARCHAR(4096);
//The historic date. We are not using the Java/SQL types here because they are not working
//with B.C. dates, for example the 15. March 44 B.C.
Integer[0..1] year = ct_historicdate.year INTEGER;
Integer[0..1] month = ct_historicdate.month INTEGER;
Integer[0..1] dayOfMonth = ct_historicdate.dayofmonth INTEGER;
//Boolean to indicate if the date is approximately
Boolean[0..1] dateIsApprox = ct_historicdate.dateapprox BIT;
reference key (ct_historicdate.historic_date_id);
}

View File

@ -0,0 +1,21 @@
--
-- Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id$
@@ ddl/oracle-se/create.sql
@@ ddl/oracle-se/deferred.sql

View File

@ -0,0 +1,22 @@
--
-- Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: postgres-create.sql 1594 2007-07-10 10:56:11Z p_boy $
-- $DateTime: 2004/08/17 23:15:09 $
\i ddl/postgres/create.sql
\i ddl/postgres/deferred.sql

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type
label="HistoricDate"
description="A content types for historic dates"
objectType="com.arsdigita.cms.contenttypes.HistoricDate"
classname="com.arsdigita.cms.contenttypes.HistoricDate">
<ctd:authoring-kit
createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
<ctd:authoring-step
labelKey="cms.contenttypes.shared.basic_properties.title"
labelBundle="com.arsdigita.cms.CMSResources"
descriptionKey="historicdate.authoring.body_text.description"
descriptionBundle="com.arsdigita.cms.contenttypes.HistoricDateResources"
component="com.arsdigita.cms.contenttypes.ui.HistoricDatePropertiesStep"/>
<ctd:include href="/WEB-INF/content-types/edit-body-text-step.xml"/>
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
</ctd:authoring-kit>
</ctd:content-type>
</ctd:content-types>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
<!-- No need to list all the content types here. Only
need to list a type if is adds associations that
were not in the parent type, or to remove attributes
-->
<!-- First off the adapters for ContentItemPanel -->
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.HistoricDate"
extends="com.arsdigita.cms.contenttypes.GenericArticle"
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
</xrd:adapter>
</xrd:context>
</xrd:adapters>

View File

@ -0,0 +1,16 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<table name="cms_items"/>
<initializer class="com.arsdigita.cms.Initializer"/>
</requires>
<provides>
<table name="ct_news"/>
<initializer class="com.arsdigita.cms.contenttypes.HistoricDateInitializer"/>
</provides>
<scripts>
<schema directory="ccm-cms-types-historicdate"/>
<data class="com.arsdigita.cms.contenttypes.HistoricDateLoader"/>
</scripts>
</load>

View File

@ -0,0 +1,106 @@
/*
* Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID;
import java.math.BigDecimal;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
*/
public class HistoricDate extends GenericArticle {
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.HistoricDate";
public static final String YEAR = "year";
public static final String MONTH = "month";
public static final String DAY_OF_MONTH = "dayOfMonth";
public static final String DATE_IS_APPROX = "dateIsApprox";
public static final String LEAD = "lead";
public HistoricDate() {
this(BASE_DATA_OBJECT_TYPE);
}
public HistoricDate(final BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
public HistoricDate(final OID oid) throws DataObjectNotFoundException {
super(oid);
}
public HistoricDate(final DataObject dataObject) {
super(dataObject);
}
public HistoricDate(final String type) {
super(type);
}
public Integer getYear() {
return (Integer) get(YEAR);
}
public void setYear(final Integer year) {
set(YEAR, year);
}
public Integer getMonth() {
return (Integer) get(MONTH);
}
public void setMonth(final Integer month) {
set(MONTH, month);
}
public Integer getDayOfMonth() {
return (Integer) get(DAY_OF_MONTH);
}
public void setDayOfMonth(final Integer dayOfMonth) {
set(DAY_OF_MONTH, dayOfMonth);
}
public Boolean getDateIsApprox() {
return (Boolean) get(DATE_IS_APPROX);
}
public void setDateIsApprox(final Boolean dateIsApprox) {
set(DATE_IS_APPROX, dateIsApprox);
}
public String getLead() {
return (String) get(LEAD);
}
public void setLead(final String lead) {
set(LEAD, lead);
}
@Override
public String getSearchSummary() {
return com.arsdigita.util.StringUtils.truncateString(getLead(),
200,
true);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
import com.arsdigita.globalization.GlobalizedMessage;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
*/
public class HistoricDateGlobalizationUtil {
public final static String BUNDLE_NAME = "com.arsdigita.cms.contenttypes.HistoricDateResources";
public static GlobalizedMessage globalize(final String key) {
return new GlobalizedMessage(key, BUNDLE_NAME);
}
public static GlobalizedMessage globalize(final String key, final Object[] args) {
return new GlobalizedMessage(key, BUNDLE_NAME, args);
}
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class HistoricDateLoader extends AbstractContentTypeLoader {
private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HistoricDate.xml"};
@Override
public String[] getTypes() {
return TYPES;
}
}

View File

@ -0,0 +1,9 @@
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
historicdate.ui.year=Year
historicdate.ui.month=Month
historicdate.ui.day_of_month=Day of Month
historicdate.ui.date_is_approx=Date is approximately
historicdate.ui.lead=Lead text

View File

@ -0,0 +1,9 @@
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
historicdate.ui.year=Jahr
historicdate.ui.month=Monat
historicdate.ui.day_of_month=Tag
historicdate.ui.date_is_approx=Ungef\u00e4hres Datum
historicdate.ui.lead=Zusammenfassung

View File

@ -0,0 +1,79 @@
/*
* Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.HistoricDate;
import com.arsdigita.cms.contenttypes.HistoricDateGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class HistoricDatePropertiesStep extends SimpleEditStep {
public static String EDIT_SHEET_NAME = "edit";
public HistoricDatePropertiesStep(final ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
super(itemModel, parent);
setDefaultEditKey(EDIT_SHEET_NAME);
final BasicPageForm editSheet = new HistoricDatePropertyForm(itemModel, this);
add(EDIT_SHEET_NAME,
GlobalizationUtil.globalize("cms.ui.edit"),
new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton());
setDisplayComponent(getHistoricDatePropertySheet(itemModel));
}
public static Component getHistoricDatePropertySheet(final ItemSelectionModel itemModel) {
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), HistoricDate.TITLE);
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), HistoricDate.NAME);
sheet.add(HistoricDateGlobalizationUtil.globalize("historicdate.ui.year"),
HistoricDate.YEAR);
sheet.add(HistoricDateGlobalizationUtil.globalize("historicdate.ui.month"),
HistoricDate.MONTH);
sheet.add(HistoricDateGlobalizationUtil.globalize("historicdate.ui.day_of_month"),
HistoricDate.DAY_OF_MONTH);
sheet.add(HistoricDateGlobalizationUtil.globalize("historicdate.ui.date_is_approx"),
HistoricDate.DATE_IS_APPROX);
sheet.add(HistoricDateGlobalizationUtil.globalize("historicdate.ui.lead"),
HistoricDate.LEAD);
return sheet;
}
}

View File

@ -0,0 +1,157 @@
/*
* Copyright (C) 2014 Jens Pelzetter All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.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;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.form.CheckboxGroup;
import com.arsdigita.bebop.form.Option;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.IntegerParameter;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.HistoricDate;
import com.arsdigita.cms.contenttypes.HistoricDateGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class HistoricDatePropertyForm extends BasicPageForm implements FormProcessListener,
FormSubmissionListener,
FormInitListener {
public static final String FORM_ID = "historic_date_edit";
private HistoricDatePropertiesStep step;
private static final String APPROX = "approx";
private CheckboxGroup dateIsApprox;
public HistoricDatePropertyForm(final ItemSelectionModel itemModel) {
this(itemModel, null);
}
public HistoricDatePropertyForm(final ItemSelectionModel itemModel,
final HistoricDatePropertiesStep step) {
super(FORM_ID, itemModel);
this.step = step;
addSubmissionListener(this);
}
@Override
public void addWidgets() {
super.addWidgets();
add(new Label(HistoricDateGlobalizationUtil.globalize("historicdate.ui.year")));
final IntegerParameter yearParam = new IntegerParameter(HistoricDate.YEAR);
final TextField year = new TextField(yearParam);
year.setLabel(HistoricDateGlobalizationUtil.globalize("historicdate.ui.year"));
add(year);
add(new Label(HistoricDateGlobalizationUtil.globalize("historicdate.ui.month")));
final IntegerParameter monthParam = new IntegerParameter(HistoricDate.MONTH);
final TextField month = new TextField(monthParam);
month.setLabel(HistoricDateGlobalizationUtil.globalize("historicdate.ui.month"));
add(month);
add(new Label(HistoricDateGlobalizationUtil.globalize("historicdate.ui.day_of_month")));
final IntegerParameter dayOfMonthParam = new IntegerParameter(HistoricDate.DAY_OF_MONTH);
final TextField dayOfMonth = new TextField(dayOfMonthParam);
dayOfMonth.setLabel(HistoricDateGlobalizationUtil.globalize("historicdate.ui.day_of_month"));
add(dayOfMonth);
add(new Label(HistoricDateGlobalizationUtil.globalize("historicdate.ui.date_is_approx")));
dateIsApprox = new CheckboxGroup(HistoricDate.DATE_IS_APPROX + "Group");
dateIsApprox.setLabel(HistoricDateGlobalizationUtil.globalize(
"historicdate.ui.date_is_approx"));
dateIsApprox.addOption(new Option(HistoricDate.DATE_IS_APPROX, ""));
add(dateIsApprox);
add(new Label(HistoricDateGlobalizationUtil.globalize("historicdate.ui.lead")));
final ParameterModel leadParam = new StringParameter(HistoricDate.LEAD);
final TextArea lead = new TextArea(leadParam);
lead.setCols(80);
lead.setRows(24);
lead.setLabel(HistoricDateGlobalizationUtil.globalize("historicdate.ui.lead"));
add(lead);
}
@Override
public void init(final FormSectionEvent event) throws FormProcessException {
final FormData data = event.getFormData();
final HistoricDate historicDate = (HistoricDate) super.initBasicWidgets(event);
data.put(HistoricDate.YEAR, historicDate.getYear());
data.put(HistoricDate.MONTH, historicDate.getMonth());
data.put(HistoricDate.DAY_OF_MONTH, historicDate.getDayOfMonth());
if ((historicDate.getDateIsApprox() == null) || !historicDate.getDateIsApprox()) {
dateIsApprox.setValue(event.getPageState(), "");
} else {
dateIsApprox.setValue(event.getPageState(), new String[]{APPROX});
}
data.put(HistoricDate.LEAD, historicDate.getLead());
}
@Override
public void process(final FormSectionEvent event) throws FormProcessException {
final FormData data = event.getFormData();
final HistoricDate historicDate = (HistoricDate) super.processBasicWidgets(event);
if ((historicDate != null)
&& getSaveCancelSection().getSaveButton().isSelected(event.getPageState())) {
historicDate.setYear((Integer) data.get(HistoricDate.YEAR));
historicDate.setMonth((Integer) data.get(HistoricDate.MONTH));
historicDate.setDayOfMonth((Integer) data.get(HistoricDate.DAY_OF_MONTH));
if (dateIsApprox.getValue(event.getPageState()) == null) {
historicDate.setDateIsApprox(false);
} else {
historicDate.setDateIsApprox(true);
}
historicDate.setLead((String) data.get(HistoricDate.LEAD));
historicDate.save();
}
if (step != null) {
step.maybeForwardToNextStep(event.getPageState());
}
}
@Override
public void submitted(final FormSectionEvent event) throws FormProcessException {
if ((step != null)
&& getSaveCancelSection().getCancelButton().isSelected(event.getPageState())) {
step.cancelStreamlinedCreation(event.getPageState());
}
}
}

View File

@ -38,29 +38,27 @@ public class DateParameter extends ParameterModel {
}
/**
* This method returns a new Calendar object that is manipulated
* within transformValue to create a Date Object. This method should
* be overridden if you wish to use a Calendar other than the
* This method returns a new Calendar object that is manipulated within transformValue to create
* a Date Object. This method should be overridden if you wish to use a Calendar other than the
* lenient GregorianCalendar.
*
* @param request the servlet request from which Locale can be
* extracted if needed
* @param request the servlet request from which Locale can be extracted if needed
*
* @return a new Calendar object
* */
*
*/
protected Calendar getCalendar(HttpServletRequest request) {
return new GregorianCalendar();
}
/**
* Computes a date object from multiple parameters in the
* request. This method searches for parameters named
* <code>getName() + ".year"<code>, <code>getName() +
* Computes a date object from multiple parameters in the request. This method searches for
* parameters named <code>getName() + ".year"<code>, <code>getName() +
* ".month"<code> and <code>getName() + ".day"<code>. It sets the
* fields <code>HOUR</code>, <code>MINUTE</code> and
* <code>SECOND</code> to 0, since they are by default the current
* time.
* */
* fields <code>HOUR</code>, <code>MINUTE</code> and <code>SECOND</code> to 0, since they are by
* default the current time.
*
*/
@Override
public Object transformValue(HttpServletRequest request)
throws IllegalArgumentException {
@ -73,27 +71,27 @@ public class DateParameter extends ParameterModel {
//don't accept lenient dates like June 44
c.setLenient(false);
String year = Globalization.decodeParameter(request, getName()+".year");
String month = Globalization.decodeParameter(request, getName()+".month");
String day = Globalization.decodeParameter(request, getName()+".day");
String year = Globalization.decodeParameter(request, getName() + ".year");
String month = Globalization.decodeParameter(request, getName() + ".month");
String day = Globalization.decodeParameter(request, getName() + ".day");
if ( year == null && month == null && day == null ) {
if (year == null && month == null && day == null) {
return transformSingleValue(request);
}
if (day == null || day.length() == 0) {
return null;
}
if ( year != null ) {
if (year != null) {
c.set(Calendar.YEAR, Integer.parseInt(year));
}
if ( month != null ) {
if (month != null) {
c.set(Calendar.MONTH, Integer.parseInt(month));
}
if ( day != null ) {
if (day != null) {
c.set(Calendar.DATE, Integer.parseInt(day));
}
outVal = c.getTime();
} catch ( IllegalArgumentException e) {
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Invalid Day of Month");
}
return outVal;
@ -104,7 +102,7 @@ public class DateParameter extends ParameterModel {
return new Date(Long.parseLong(encoded));
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Cannot unmarshal date '"
+ encoded +"': " + e.getMessage());
+ encoded + "': " + e.getMessage());
}
}

View File

@ -53,6 +53,7 @@
<xsl:import href="types/FileStorageItem.xsl"/>
<xsl:import href="types/Form.xsl"/>
<xsl:import href="types/GlossaryItem.xsl"/>
<xsl:import href="types/HistoricDate.xsl"/>
<xsl:import href="types/Image.xsl"/>
<!-- <xsl:import href="types/InlineSite.xsl"/> -->
<!-- <xsl:import href="types/Job.xsl"/> -->

View File

@ -0,0 +1,518 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '&#160;'>]>
<!--
Copyright: 2014 Jens Pelzetter
This file is part of Mandalay.
Mandalay is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Mandalay is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:mandalay="http://mandalay.quasiweb.de"
exclude-result-prefixes="xsl bebop cms"
version="1.0">
<!-- Lead Text -->
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.HistoricDate']" mode="lead">
<xsl:variable name="setLeadText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setLeadText'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setDateBeforeLead">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setDateBeforeLead'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setDateAfterLead">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setDateAfterLead'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="$setDateBeforeLead = 'true'">
<xsl:apply-templates select="." mode="date"/>
</xsl:if>
<xsl:if test="./lead and $setLeadText = 'true'">
<div class="lead">
<xsl:value-of disable-output-escaping="yes" select="./lead"/>
</div>
</xsl:if>
<xsl:if test="$setDateAfterLead = 'true'">
<xsl:apply-templates select="." mode="date"/>
</xsl:if>
</xsl:template>
<!-- Image -->
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.HistoricDate']" mode="image">
<xsl:variable name="setImage">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setImage'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageMaxHeight">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setImageMaxHeight'"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageMaxWidth">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setImageMaxWidth'"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageCaption">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'setImageCaption'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="$setImage = 'true'">
<xsl:call-template name="mandalay:imageAttachment">
<xsl:with-param name="showCaption" select="$setImageCaption"/>
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.HistoricDate'] | nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.HistoricDate'] | nav:item[objectType='com.arsdigita.cms.contenttypes.HistoricDate']" mode="date">
<div id="historicDate dateline">
<xsl:if test="./dateIsApprox = 'true'">
<span>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="id" select="'dateIsApprox'"/>
</xsl:call-template>
</span>
</xsl:if>
<xsl:variable name="year">
<xsl:choose>
<xsl:when test="./year &lt; 0">
<xsl:value-of select="./year * -1"/>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="id" select="'bc'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./year"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="month">
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'monthNames'"/>
<xsl:with-param name="id" select="./month"/>
</xsl:call-template>
</xsl:variable>
<span>
<xsl:if test="./dayOfMonth">
<xsl:value-of select="concat(./dayOfMonth, '. ')"/>
</xsl:if>
<xsl:if test="./month">
<xsl:value-of select="concat($month, ' ')"/>
</xsl:if>
<xsl:value-of disable-output-escaping="yes"
select="$year"/>
</span>
</div>
</xsl:template>
<!-- Detailed view -->
<xsl:template name="CT_HistoricDate_graphics"
match="cms:item[objectType='com.arsdigita.cms.contenttypes.HistoricDate']"
mode="detailed_view">
<xsl:if test="./textAsset/content">
<div id="mainBody">
<xsl:value-of disable-output-escaping="yes" select="./textAsset/content"/>
<div class="endFloat"/>
</div>
</xsl:if>
<div class="endFloat"/>
</xsl:template>
<xsl:template name="CT_HistoricDate_List"
match="nav:item[nav:attribute[@name='objectType'] = 'com.arsdigita.cms.contenttypes.HistoricDate']"
mode="list_view">
<xsl:variable name="setDate">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setDate'"/>
<xsl:with-param name="default" select="'false'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setDateFormat">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setDateFormat'"/>
<xsl:with-param name="default" select="'S'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setLinkToDetails">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setLinkToDetails'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setLeadText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setLeadText'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setLeadTextLength">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setLeadTextLength'"/>
<xsl:with-param name="default" select="'0'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImage">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setImage'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setMoreButton">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'listView/setMoreButton'"/>
<xsl:with-param name="default" select="'auto'"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="$setDate = 'true'">
<xsl:apply-templates select="." mode="date"/>
<!--<div class="dateline">
<xsl:if test="./dateIsApprox = 'true'">
<span>
<xsl:call-template name="mandalay:getStaticText">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="id" select="'dateIsApprox'"/>
</xsl:call-template>
</span>
</xsl:if>
<span>
<xsl:value-of select="concat(./dayOfMonth, '.', ./month, '.', ./year)"/>
</span>
</div>-->
</xsl:if>
<xsl:if test="$setImage = 'true' and nav:attribute[@name='imageAttachments.image.id']">
<a>
<xsl:attribute name="href">
<xsl:value-of select="nav:path"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of select="nav:attribute[@name='title']"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
<div class="image">
<img>
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&amp;maxWidth=150&amp;maxHeight=100</xsl:attribute>
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
<xsl:attribute name="alt">
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
</xsl:attribute>
</xsl:if>
</img>
</div>
</a>
</xsl:if>
<xsl:choose>
<xsl:when test="$setLinkToDetails = 'true' or (string-length(nav:attribute[@name='lead']) > $setLeadTextLength and $setLeadTextLength != '0')">
<a class="CIname">
<xsl:attribute name="href">
<xsl:value-of select="nav:path"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of select="nav:attribute[@name='title']"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='title']"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<span class="CIname">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='title']" />
</span>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="nav:attribute[@name='lead'] and $setLeadText = 'true'">
<xsl:if test="nav:attribute[@name='imageAttachments.image.id']">
<div class="image">
<img>
<xsl:attribute name="src">/ccm/cms-service/stream/image/?image_id=<xsl:value-of select="nav:attribute[@name='imageAttachments.image.id']"/>&amp;maxWidth=150&amp;maxHeight=100</xsl:attribute>
<xsl:if test="nav:attribute[@name='imageAttachments.caption']">
<xsl:attribute name="alt">
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="nav:attribute[@name='imageAttachments.caption']"/>
</xsl:attribute>
</xsl:if>
</img>
</div>
</xsl:if>
<br />
<span class="intro">
<xsl:choose>
<xsl:when test="$setLeadTextLength = '0'">
<xsl:value-of disable-output-escaping="yes" select="nav:attribute[@name='lead']" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="substring(nav:attribute[@name='lead'], 1, $setLeadTextLength)" />
<xsl:if test="string-length(nav:attribute[@name='lead']) > $setLeadTextLength">
<xsl:text>...</xsl:text>
<xsl:if test="$setMoreButton = 'auto'">
<xsl:call-template name="mandalay:moreButton">
<xsl:with-param name="href" select="nav:path"/>
<xsl:with-param name="module" select="'HistoricDate'"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$setMoreButton = 'true'">
<xsl:call-template name="mandalay:moreButton">
<xsl:with-param name="href" select="nav:path"/>
<xsl:with-param name="module" select="'HistoricDate'"/>
</xsl:call-template>
</xsl:if>
</span>
</xsl:if>
<div class="endFloat"/>
</xsl:template>
<xsl:template name="CT_HistoricDate_Link"
match="*/cms:item/links[targetItem/objectType = 'com.arsdigita.cms.contenttypes.HistoricDate']"
mode="link_view">
<xsl:variable name="setLinkToDetails">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setLinkToDetails'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageAndText">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setImageAndText'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImage">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setImage'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageMaxHeight">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setImageMaxHeight'"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageMaxWidth">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setImageMaxWidth'"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setImageCaption">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setImageCaption'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setDescription">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setDescription'"/>
<xsl:with-param name="default" select="'true'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setDescriptionLength">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setDescriptionLength'"/>
<xsl:with-param name="default" select="'0'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="setMoreButton">
<xsl:call-template name="mandalay:getSetting">
<xsl:with-param name="module" select="'HistoricDate'"/>
<xsl:with-param name="setting" select="'linkView/setMoreButton'"/>
<xsl:with-param name="default" select="'auto'"/>
</xsl:call-template>
</xsl:variable>
<!-- DE Wenn es Bilder gibt, dann soll das erste hier als Link angezeigt werden -->
<!-- EN -->
<xsl:if test="./targetItem/imageAttachments and $setImage = 'true'">
<xsl:choose>
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
<a class="CIname">
<xsl:attribute name="href">
<xsl:text>/redirect/?oid=</xsl:text>
<xsl:value-of select="./targetItem/@oid"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of select="./linkTitle"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
<xsl:for-each select="./targetItem">
<xsl:call-template name="mandalay:imageAttachment">
<xsl:with-param name="showCaption" select="$setImageCaption" />
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
</xsl:call-template>
</xsl:for-each>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="./targetItem">
<xsl:call-template name="mandalay:imageAttachment">
<xsl:with-param name="showCaption" select="$setImageCaption" />
<xsl:with-param name="maxHeight" select="$setImageMaxHeight" />
<xsl:with-param name="maxWidth" select="$setImageMaxWidth" />
</xsl:call-template>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="$setImageAndText = 'true' or not(./targetItem/imageAttachments) or $setImage = 'false'">
<xsl:choose>
<xsl:when test="$setLinkToDetails = 'true' or (string-length(./linkDescription) > $setDescriptionLength and $setDescriptionLength != '0')">
<a class="CIname">
<xsl:attribute name="href">
<xsl:text>/redirect/?oid=</xsl:text>
<xsl:value-of select="./targetItem/@oid"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of select="./linkTitle"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="mandalay:shying">
<xsl:with-param name="title">
<xsl:value-of disable-output-escaping="yes" select="./linkTitle"/>
</xsl:with-param>
<xsl:with-param name="mode">dynamic</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="./linkDescription and $setDescription">
<br />
<xsl:choose>
<xsl:when test="$setDescriptionLength = '0'">
<xsl:value-of disable-output-escaping="yes" select="./linkDescription" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="substring(./linkDescription, 1, $setDescriptionLength)" />
<xsl:if test="string-length(./linkDescription) > $setDescriptionLength">
<xsl:text>...</xsl:text>
<xsl:if test="$setMoreButton = 'auto'">
<xsl:call-template name="mandalay:moreButton">
<xsl:with-param name="href" select="./targetItem/@oid"/>
<xsl:with-param name="module" select="'HistoricDate'"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$setMoreButton = 'true'">
<xsl:call-template name="mandalay:moreButton">
<xsl:with-param name="href" select="./targetItem/@oid"/>
<xsl:with-param name="module" select="'HistoricDate'"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright: 2014 Jens Pelzetter
This file is part of Mandalay.
Mandalay is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Mandalay is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<translations>
<line id="lang">Deutsch</line>
<line id="version">0.8</line>
<line id="moreButton">mehr »</line>
<line id="moreButtonTitle">weiter lesen</line>
<line id="dateIsApprox">ca. </line>
<line id="bc"> v. Chr.</line>
</translations>

View File

@ -99,6 +99,7 @@
<line id="articleInJournal/year">Jahr</line>
<line id="articleInJournal/articles">Beiträge</line>
<line id="articleInJournal/reviewed">Referierter Artikel</line>
<line id="articleInJournal/yearFirstPublished">Erste Veröffentlichung</line>
<line id="collectedVolume/abstract">Zusammenfassung</line>
<line id="collectedVolume/articles">Artikel</line>

View File

@ -31,4 +31,5 @@
<line id="menu/name/webmaster">Webmaster</line>
<line id="menu/name/imprint">Impressum</line>
<line id="menu/name/pictures">Bildnachweis</line>
<line id="menu/name/scicms">ScientificCMS</line>
</translations>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright: 2014 Jens Pelzetter
This file is part of Mandalay.
Mandalay is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Mandalay is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<translations>
<line id="lang">English</line>
<line id="version">0.8</line>
<line id="moreButton">more »</line>
<line id="moreButtonTitle">read more</line>
<line id="dateIsApprox">approx. </line>
<line id="bc"> BC</line>
</translations>

View File

@ -96,6 +96,7 @@
<line id="articleInJournal/year">Year</line>
<line id="articleInJournal/articles">Articles</line>
<line id="articleInJournal/reviewed">Reviewed article</line>
<line id="articleInJournal/yearFirstPublished">First published</line>
<line id="collectedVolume/abstract">Abstract</line>
<line id="collectedVolume/articles">Articles</line>

View File

@ -35,28 +35,31 @@
<body>
<div id="pageWrap">
<div id="head">
<div id="header">
<div class="menu">
<div class="contentWidth">
<div id="headerOverlayTop">
<showLanguageSelector/>
<div>
<showStaticMenu name="topMenu" id="topMenu"/>
<showQuicksearch/>
</div>
</div>
<div class="headerContent contentWidth">
<showImage class="siteLogo">
<src>images/header/Logo.png</src>
<alt>layout/page/header/logo/alt</alt>
<name>layout/page/header/logo/name</name>
<title>layout/page/header/logo/title</title>
<link>/navigation/</link>
</showImage>
<showText class="siteTitle">
<line>layout/page/header/title</line>
</showText>
<showSubSiteBanner/>
<showHeaderImage class="headerImage"/>
<div id="nav">
<showNavigationMenu>
<setMinLevel>0</setMinLevel>
<setMaxLevel>1</setMaxLevel>
<setFirstLevelMode>vertical</setFirstLevelMode>
<setRootLevelStaticText>true</setRootLevelStaticText>
<setColorset>true</setColorset>
</showNavigationMenu>
<div class="endFloat"/>
</div>
</div>
<div class="endFloat"/>
</div>
<showBreadcrumbs/>
<div id="contentWrap" withColorset="true">
<div id="workspace">
<showContent>
@ -78,10 +81,8 @@
<div id="fillEmptySpace"/>
<div id="footer">
<div class="footerContent contentWidth">
<showBreadcrumbs/>
<div class="logo" />
<div class="menu contentWidth">
<div id="footerContent">
<showStaticMenu id="footerMenu" name="footerMenu"/>
<showImage class="logoScientificCMS startLeftFloat">
<src>images/footer/ScientificCMS.png</src>
<alt>layout/page/footer/scientificcms/alt</alt>
@ -89,11 +90,8 @@
<title>layout/page/footer/scientificcms/title</title>
<link>http://www.scientificcms.org</link>
</showImage>
<showStaticMenu id="footerMenu" name="footerMenu"/>
</div>
</div>
</div>
</div>

View File

@ -25,7 +25,6 @@
<setting id="setImageMaxHeight">300</setting>
<setting id="setImageMaxWidth">300</setting>
<setting id="setImageCaption">true</setting>
<setting id="setRoles">true</setting>
<setting id="setSubUnits">true</setting>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright: 2014 Jens Pelzetter
This file is part of Mandalay.
Mandalay is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Mandalay is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mandalay. If not, see <http://www.gnu.org/licenses/>.
-->
<settings>
<setting id="setDate">false</setting>
<setting id="setDateBeforeLead">true</setting>
<setting id="setDateAfterLead">false</setting>
<setting id="setImage">true</setting>
<setting id="setImageMaxHeight">300</setting>
<setting id="setImageMaxWidth">300</setting>
<setting id="setImageCaption">true</setting>
<setting id="setLeadText">true</setting>
<setting id="listView/setDate">true</setting>
<setting id="listView/setDateFormat">S</setting>
<setting id="listView/setLinkToDetails">true</setting>
<setting id="listView/setLeadText">true</setting>
<setting id="listView/setLeadTextLength">440</setting>
<setting id="listView/setMoreButton">true</setting>
<setting id="linkView/setLinkToDetails">true</setting>
<setting id="linkView/setImageAndText">true</setting>
<setting id="linkView/setImage">true</setting>
<setting id="linkView/setImageMaxHeight">200</setting>
<setting id="linkView/setImageMaxWidth">200</setting>
<setting id="linkView/setImageCaption">false</setting>
<setting id="linkView/setDescription">true</setting>
<setting id="linkView/setDescriptionLength">0</setting>
<setting id="linkView/setMoreButton">false</setting>
</settings>