Deutsche Übersetzung hinzugefügt, static variable versionId entfernt. Nachführen von fedorahosted.
git-svn-id: https://svn.libreccm.org/ccm/trunk@344 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
e5777472ef
commit
cd083214d3
|
|
@ -1,7 +1,15 @@
|
|||
<?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="MultiPartArticle" description="Article with multiple distinct sections" objectType="com.arsdigita.cms.contenttypes.MultiPartArticle" classname="com.arsdigita.cms.contenttypes.MultiPartArticle">
|
||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.mparticle.MultiPartArticleCreate">
|
||||
<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="MultiPartArticle"
|
||||
description="Article with multiple distinct sections"
|
||||
objectType="com.arsdigita.cms.contenttypes.MultiPartArticle"
|
||||
classname="com.arsdigita.cms.contenttypes.MultiPartArticle">
|
||||
|
||||
<ctd:authoring-kit
|
||||
createComponent="com.arsdigita.cms.contenttypes.ui.mparticle.MultiPartArticleCreate">
|
||||
|
||||
<ctd:authoring-step
|
||||
labelKey="cms.contenttypes.shared.basic_properties.title"
|
||||
|
|
|
|||
|
|
@ -27,15 +27,14 @@ import com.arsdigita.persistence.PersistenceException;
|
|||
/**
|
||||
* This class contains a collection of ArticleSections.
|
||||
*
|
||||
* @author <a href="mailto:hbrock@redhat.com">Hugh Brock</a>
|
||||
*
|
||||
* @see DomainCollection
|
||||
* @see DataCollection
|
||||
*
|
||||
* @author <a href="mailto:hbrock@redhat.com">Hugh Brock</a>
|
||||
* @version $Id: ArticleSectionCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public class ArticleSectionCollection extends DomainCollection {
|
||||
|
||||
public static final String versionId = "$Id: ArticleSectionCollection.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.arsdigita.domain.DomainObject;
|
|||
* provides a more meaningful title for a multipart article section
|
||||
*
|
||||
* @author Chris Gilbert
|
||||
* @version $Id: ArticleSectionMetadataProvider.java,v 1.2 2006/05/16 15:23:21 cgyg9330 Exp $
|
||||
*/
|
||||
public class ArticleSectionMetadataProvider
|
||||
extends ContentPageMetadataProvider {
|
||||
|
|
@ -35,10 +36,6 @@ extends ContentPageMetadataProvider {
|
|||
private static final Logger s_log =
|
||||
Logger.getLogger(ArticleSectionMetadataProvider.class);
|
||||
|
||||
public final static String versionId =
|
||||
"$Id: ArticleSectionMetadataProvider.java,v 1.2 2006/05/16 15:23:21 cgyg9330 Exp $"
|
||||
+ " by $Author: cgyg9330 $, $DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
public String getTitle(DomainObject dobj) {
|
||||
ArticleSection section = (ArticleSection)dobj;
|
||||
StringBuffer title = new StringBuffer();
|
||||
|
|
|
|||
|
|
@ -26,12 +26,9 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
* A set of configuration parameters for multipart articles.
|
||||
*
|
||||
* @author Chris Gilbert <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: MultiPartArticleConfig.java,v 1.3 2006/03/28 07:40:17 cgyg9330 Exp $
|
||||
*/
|
||||
public class MultiPartArticleConfig extends AbstractConfig {
|
||||
public final static String versionId =
|
||||
"$Id: MultiPartArticleConfig.java,v 1.3 2006/03/28 07:40:17 cgyg9330 Exp $" +
|
||||
"$Author: cgyg9330 $" +
|
||||
"$DateTime: 2004/08/17 23:26:27 $";
|
||||
|
||||
public static final String SHORT_TITLE = "short";
|
||||
public static final String PAGE_TOP_TITLE = "page_top";
|
||||
|
|
|
|||
|
|
@ -26,17 +26,16 @@ import com.arsdigita.runtime.LegacyInitEvent;
|
|||
import com.arsdigita.search.MetadataProviderRegistry;
|
||||
|
||||
/**
|
||||
* The CMS initializer.
|
||||
* The MultiPartArticle initializer.
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: MultiPartArticleInitializer.java 1500 2007-03-20 09:25:45Z chrisgilbert23 $
|
||||
* @version $Id: MultiPartArticleInitializer.java 1500 2007-03-20 09:25:45Z chrisgilbert23 $
|
||||
*/
|
||||
public class MultiPartArticleInitializer extends ContentTypeInitializer {
|
||||
public final static String versionId =
|
||||
"$Id: MultiPartArticleInitializer.java 1500 2007-03-20 09:25:45Z chrisgilbert23 $" +
|
||||
"$Author: chrisgilbert23 $" +
|
||||
"$DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
/**
|
||||
* MultiPartArticleInitializer Constructor
|
||||
*/
|
||||
public MultiPartArticleInitializer() {
|
||||
super("ccm-cms-types-mparticle.pdl.mf", MultiPartArticle.BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
|
@ -58,7 +57,7 @@ public class MultiPartArticleInitializer extends ContentTypeInitializer {
|
|||
|
||||
MetadataProviderRegistry.registerAdapter(
|
||||
ArticleSection.BASE_DATA_OBJECT_TYPE,
|
||||
new ArticleSectionMetadataProvider());
|
||||
new ArticleSectionMetadataProvider());
|
||||
|
||||
URLService.registerFinder(
|
||||
ArticleSection.BASE_DATA_OBJECT_TYPE,
|
||||
|
|
|
|||
|
|
@ -30,41 +30,40 @@ import java.io.InputStream;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Loader.
|
||||
* MultiPartArticle Loader.
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $
|
||||
*/
|
||||
public class MultiPartArticleLoader extends AbstractContentTypeLoader {
|
||||
|
||||
public final static String versionId =
|
||||
"$Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $" +
|
||||
"$Author: apevec $" +
|
||||
"$DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(MultiPartArticleLoader.class);
|
||||
|
||||
private static final String[] TYPES = {
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml"
|
||||
};
|
||||
|
||||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
private ResourceParameter m_template;
|
||||
|
||||
|
||||
/**
|
||||
* MultiPartArticleLoader Constructor
|
||||
*/
|
||||
public MultiPartArticleLoader() {
|
||||
|
||||
m_template = new ResourceParameter
|
||||
("com.arsdigita.cms.contenttypes.mparticle.template",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
|
||||
"/mparticle-item.jsp");
|
||||
"/mparticle-item.jsp");
|
||||
|
||||
register(m_template);
|
||||
}
|
||||
|
||||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void prepareSection(final ContentSection section,
|
||||
final ContentType type,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
mparticle.authoring.body_text.description=Edit the body text in sections
|
||||
cms.contenttypes.ui.mparticle.add_new_section=Neuen Abschnitt hinzuf\u00FCgen
|
||||
cms.contenttypes.ui.mparticle.add_section=Abschnitt hinzuf\u00FCgen
|
||||
cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=Ein Element mit dem Namen existiert bereits.
|
||||
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=Ein Element mit diesem Namen existiert bereits.
|
||||
cms.contenttypes.ui.mparticle.article_summary=Artikel Zusammenfassung
|
||||
cms.contenttypes.ui.mparticle.article_title=Articel Titel
|
||||
cms.contenttypes.ui.mparticle.body_text=Haupttext:
|
||||
cms.contenttypes.ui.mparticle.caption=Bildtext:
|
||||
cms.contenttypes.ui.mparticle.current_image=Aktuelles Bild:
|
||||
cms.contenttypes.ui.mparticle.delete_section=Abschnitt l\u00F6schen
|
||||
cms.contenttypes.ui.mparticle.edit_section=Abschnitt bearbeiten
|
||||
cms.contenttypes.ui.mparticle.image=Bild:
|
||||
cms.contenttypes.ui.mparticle.move_section_name=Abschnitt verschieben
|
||||
cms.contenttypes.ui.mparticle.move_to_beginning=An den Anfang verschieben
|
||||
cms.contenttypes.ui.mparticle.name=Name:
|
||||
cms.contenttypes.ui.mparticle.no_sections_yet=Zur Zeit keine Abschnitte
|
||||
cms.contenttypes.ui.mparticle.no_text_available=Kein Text verf\u00FCgbar
|
||||
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
||||
cms.contenttypes.ui.mparticle.section_title=Section Title
|
||||
cms.contenttypes.ui.mparticle.select_image=Select image:
|
||||
cms.contenttypes.ui.mparticle.submission_cancelled=Vorlage verworfen
|
||||
cms.contenttypes.ui.mparticle.summary=Beschreibung:
|
||||
cms.contenttypes.ui.mparticle.title=Titel:
|
||||
cms.contenttypes.ui.mparticle.view_all_sections=Alle Abschnitte anschauen
|
||||
cms.contenttypes.ui.mparticle.no_launch_date=Ver\u00F6ffentlichungsdatum fehlt
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
mparticle.authoring.body_text.description=Edit the body text in sections
|
||||
cms.contenttypes.ui.mparticle.add_new_section=Add new section
|
||||
cms.contenttypes.ui.mparticle.add_section=Add Section
|
||||
cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=An item with name already exists
|
||||
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=An item with this name already exists
|
||||
cms.contenttypes.ui.mparticle.article_summary=Article Summary
|
||||
cms.contenttypes.ui.mparticle.article_title=Article Title
|
||||
cms.contenttypes.ui.mparticle.body_text=Body text:
|
||||
cms.contenttypes.ui.mparticle.caption=Caption:
|
||||
cms.contenttypes.ui.mparticle.current_image=Current image:
|
||||
cms.contenttypes.ui.mparticle.delete_section=Delete section
|
||||
cms.contenttypes.ui.mparticle.edit_section=Edit Section
|
||||
cms.contenttypes.ui.mparticle.image=Image:
|
||||
cms.contenttypes.ui.mparticle.move_section_name=Move section
|
||||
cms.contenttypes.ui.mparticle.move_to_beginning=Move to beginning
|
||||
cms.contenttypes.ui.mparticle.name=Name:
|
||||
cms.contenttypes.ui.mparticle.no_sections_yet=No sections yet
|
||||
cms.contenttypes.ui.mparticle.no_text_available=No Text Available
|
||||
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
||||
cms.contenttypes.ui.mparticle.section_title=Section Title
|
||||
cms.contenttypes.ui.mparticle.select_image=Select image:
|
||||
cms.contenttypes.ui.mparticle.submission_cancelled=Submission cancelled
|
||||
cms.contenttypes.ui.mparticle.summary=Description:
|
||||
cms.contenttypes.ui.mparticle.title=Title:
|
||||
cms.contenttypes.ui.mparticle.view_all_sections=View all sections
|
||||
cms.contenttypes.ui.mparticle.no_launch_date=launch date is required
|
||||
|
|
@ -32,13 +32,14 @@ import com.arsdigita.web.ParameterMap;
|
|||
import com.arsdigita.web.URL;
|
||||
|
||||
/**
|
||||
* @author cgyg9330
|
||||
*
|
||||
* Implementation of URLFinder for a specific ArticleSection
|
||||
*
|
||||
* @author cgyg9330
|
||||
*
|
||||
*/
|
||||
public class MultiPartArticleSectionURLFinder implements URLFinder {
|
||||
public static final String FIND_PAGE_FOR_SECTION_QUERY = "com.arsdigita.cms.contenttypes.PageNumberForArticleSection";
|
||||
public static final String FIND_PAGE_FOR_SECTION_QUERY =
|
||||
"com.arsdigita.cms.contenttypes.PageNumberForArticleSection";
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -59,7 +60,8 @@ public class MultiPartArticleSectionURLFinder implements URLFinder {
|
|||
|
||||
Integer sectionNumber = thisSection.getRank();
|
||||
if (sectionNumber.intValue() != 1) {
|
||||
DataQuery pageNumber = SessionManager.getSession().retrieveQuery(FIND_PAGE_FOR_SECTION_QUERY);
|
||||
DataQuery pageNumber = SessionManager.getSession().
|
||||
retrieveQuery(FIND_PAGE_FOR_SECTION_QUERY);
|
||||
pageNumber.setParameter("section", thisSection.getID());
|
||||
while (pageNumber.next()) {
|
||||
// just in case there are existing parameters on the url
|
||||
|
|
@ -77,8 +79,9 @@ public class MultiPartArticleSectionURLFinder implements URLFinder {
|
|||
}
|
||||
|
||||
/**
|
||||
* We are redirected to the correct page to edit the multipart article, ignoring the section.
|
||||
* This is the current default behaviour for live links to unpublished Multi-part articles
|
||||
* We are redirected to the correct page to edit the multipart article,
|
||||
* ignoring the section. This is the current default behaviour for live links
|
||||
* to unpublished Multi-part articles.
|
||||
*/
|
||||
public String find(OID oid, String context) throws NoValidURLException {
|
||||
if(!"draft".equals(context)) {
|
||||
|
|
@ -93,14 +96,17 @@ public class MultiPartArticleSectionURLFinder implements URLFinder {
|
|||
ContentSection contentSection = thisSection.getContentSection();
|
||||
ItemResolver resolver = contentSection.getItemResolver();
|
||||
|
||||
String url = resolver.generateItemURL(null, article, contentSection, context);
|
||||
String url = resolver.generateItemURL(null, article,
|
||||
contentSection,
|
||||
context);
|
||||
final int sep = url.indexOf('?');
|
||||
URL destination = null;
|
||||
|
||||
if (sep == -1) {
|
||||
destination = URL.there(url, null);
|
||||
} else {
|
||||
final ParameterMap params = ParameterMap.fromString(url.substring(sep + 1));
|
||||
final ParameterMap params = ParameterMap.fromString(
|
||||
url.substring(sep + 1));
|
||||
destination = URL.there(url.substring(0, sep), params);
|
||||
}
|
||||
return destination.toString();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import org.apache.log4j.Logger;
|
|||
*
|
||||
* @author Michael Pih (pihman@arsdigita.com)
|
||||
* @version $Revision: #7 $ $Date: 2004/08/17 $
|
||||
* @version $Id: ArticleSectionPanel.java 1167 2006-06-14 12:27:28Z fabrice $
|
||||
*/
|
||||
public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGenerator {
|
||||
|
||||
|
|
@ -63,8 +64,6 @@ public class ArticleSectionPanel extends SimpleComponent implements ExtraXMLGene
|
|||
|
||||
public static final String PAGE_NUMBER_PARAM = "page";
|
||||
|
||||
public static final String versionId = "$Id: ArticleSectionPanel.java 1167 2006-06-14 12:27:28Z fabrice $ by $Author: fabrice $, $DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
public ArticleSectionPanel() {
|
||||
super();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue