diff --git a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java index 0bf97804f..4d7738ce9 100644 --- a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java +++ b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java @@ -259,7 +259,7 @@ public class DaBInImporter extends Program { projectsRootFolder = projectsSection.getRootFolder(); publicationsRootFolder = publicationsSection.getRootFolder(); - authors = createFolder(personsRootFolder, "autoren", "Autoren"); + authors = createFolder(personsRootFolder, "externe", "Externe"); contacts = createFolder(personsRootFolder, "kontaktdaten", "Kontaktdaten"); @@ -270,7 +270,9 @@ public class DaBInImporter extends Program { organization = createFolder(root, "organisationen", "Organisation(en)"); - persons = createFolder(personsRootFolder, "personen", "Personen"); + //Personen sollen beim ZeS in den gleichen Ordner wie Autoren. + //persons = createFolder(personsRootFolder, "persons", "persons"); + persons = authors; projects = createFolder(projectsRootFolder, "projekte", "Projekte"); @@ -2733,14 +2735,14 @@ public class DaBInImporter extends Program { //bundle.save(); RelatedLink download = new RelatedLink(); - download.setTitle("Download"); + download.setTitle(config.getProperty("workingpaper.download.de")); download.setTargetType(Link.INTERNAL_LINK); download.setTargetItem(fsi); download.setLinkOwner(workingPaperDe); download = new RelatedLink(); download.setTitle("Download"); - download.setTargetType(Link.INTERNAL_LINK); + download.setTargetType(config.getProperty("workingpaper.download.en")); download.setTargetItem(fsi); download.setLinkOwner(workingPaperEn); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderBrowser.java b/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderBrowser.java index 318d15db4..5aac6988f 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderBrowser.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderBrowser.java @@ -250,7 +250,7 @@ public class FolderBrowser extends Table { } protected long getFolderSize() { - return m_folderSize; + return m_folderSize; } private class FolderTableModelBuilder @@ -286,14 +286,6 @@ public class FolderBrowser extends Table { Folder.ItemCollection itemColl = (Folder.ItemCollection) m_itemColl. get(s); s_log.debug(String.format("itemColl.size = %d", itemColl.size())); - /*if (itemColl.size() < 20) { - s_log.debug("Setting filter invisible."); - m_filterForm.setVisible(s, false); - } else { - s_log.debug("Setting filter visible."); - m_filterForm.setVisible(s, true); - }*/ - m_folderSize = itemColl.size(); if (s.getValue(m_filter) != null) { @@ -320,7 +312,7 @@ public class FolderBrowser extends Table { if (itemColl == null) { return 0; } - + if (state.getValue(m_filter) != null) { itemColl.addFilter(String.format( "lower(name) like lower('%s%%') or lower(displayName) like lower('%s%%')", diff --git a/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderManipulator.java b/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderManipulator.java index bee5e0cad..32342c7ea 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderManipulator.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/folder/FolderManipulator.java @@ -111,16 +111,16 @@ public class FolderManipulator extends SimpleContainer private ItemView m_itemView; private TargetSelector m_targetSelector; private FilterForm m_filterForm; - private StringParameter m_filter = new StringParameter("filter"); + private StringParameter m_filter = new StringParameter("filter"); public FolderManipulator(FolderSelectionModel folderSel) { m_sources = new ArrayParameter(new BigDecimalParameter("srcs")); m_action = new StringParameter("act"); m_srcFolderSel = folderSel; - s_log.debug("Adding filter form..."); - m_filterForm = new FilterForm(); - add(m_filterForm); + //s_log.debug("Adding filter form..."); + //m_filterForm = new FilterForm(); + //add(m_filterForm); m_itemView = new ItemView(); m_itemView.addProcessListener(this); @@ -138,7 +138,7 @@ public class FolderManipulator extends SimpleContainer public void register(Page p) { super.register(p); p.setVisibleDefault(m_targetSelector, false); - p.setVisibleDefault(m_filterForm, true); + //p.setVisibleDefault(m_filterForm, true); p.addComponentStateParam(this, m_sources); p.addComponentStateParam(this, m_action); p.addComponentStateParam(this, m_filter); @@ -361,26 +361,27 @@ public class FolderManipulator extends SimpleContainer m_folderTree.setCellRenderer(new FolderTreeCellRenderer()); Label l = new Label(new PrintListener() { + @Override - public void prepare(PrintEvent e) { - PageState s = e.getPageState(); - Label t = (Label) e.getTarget(); - int n = getSources(s).length; - Folder f = (Folder) m_srcFolderSel.getSelectedObject(s); - String msg = n + " " + - (String) globalize("cms.ui.folder.items").localize() + " " + - (String) globalize("cms.ui.folder.from").localize() +" /" + - f.getPathNoJsp() + " " + - (String) globalize("cms.ui.folder.to").localize(); - if ( isMove(s) ) { - t.setLabel((String) globalize("cms.ui.folder.move").localize() + - " " + msg); - } else if ( isCopy(s) ) { - t.setLabel((String) globalize("cms.ui.folder.copy").localize() + - " " + msg); - } + public void prepare(PrintEvent e) { + PageState s = e.getPageState(); + Label t = (Label) e.getTarget(); + int n = getSources(s).length; + Folder f = (Folder) m_srcFolderSel.getSelectedObject(s); + String msg = n + " " + (String) globalize( + "cms.ui.folder.items").localize() + " " + (String) globalize( + "cms.ui.folder.from").localize() + " /" + f. + getPathNoJsp() + " " + (String) globalize( + "cms.ui.folder.to").localize(); + if (isMove(s)) { + t.setLabel((String) globalize("cms.ui.folder.move"). + localize() + " " + msg); + } else if (isCopy(s)) { + t.setLabel((String) globalize("cms.ui.folder.copy"). + localize() + " " + msg); } - }); + } + }); l.setOutputEscaping(false); add(l); add(m_folderTree); @@ -449,7 +450,7 @@ public class FolderManipulator extends SimpleContainer m_browser = new FolderBrowser(m_srcFolderSel); m_browser.setFilterParameter(m_filter); - m_browser.setFilterForm(m_filterForm); + m_browser.setFilterForm(m_filterForm); m_paginator = new Paginator((PaginationModelBuilder) m_browser. getModelBuilder(), ContentSection.getConfig(). @@ -457,6 +458,11 @@ public class FolderManipulator extends SimpleContainer panel.add(m_paginator); panel.add(m_browser); + /*s_log.debug("Adding filter form..."); + m_filterForm = new FilterForm((PaginationModelBuilder) m_browser. + getModelBuilder()); + getPanel().add(m_filterForm);*/ + m_checkboxGroup = new CheckboxGroup(m_sources); panel.add(m_checkboxGroup); @@ -495,8 +501,10 @@ public class FolderManipulator extends SimpleContainer // The renderer for the first column in the itemView table private class CheckboxRenderer implements TableCellRenderer { + @Override - public Component getComponent(Table table, PageState state, Object value, + public Component getComponent(Table table, PageState state, + Object value, boolean isSelected, Object key, int row, int column) { BigDecimal n = (BigDecimal) key; @@ -513,20 +521,23 @@ public class FolderManipulator extends SimpleContainer FormSubmissionListener { private SimpleContainer panel; + private boolean visible; + private PaginationModelBuilder modelBuilder; - public FilterForm() { + public FilterForm(PaginationModelBuilder modelBuilder) { super("folderFilterForm"); - // m_browser = browser; s_log.debug("Creating filter form..."); + this.modelBuilder = modelBuilder; + addProcessListener(this); addInitListener(this); addSubmissionListener(this); panel = new BoxPanel(BoxPanel.HORIZONTAL); - ActionLink allLink = new ActionLink((String)globalize( + ActionLink allLink = new ActionLink((String) globalize( "cms.ui.folder.filter.all").localize()); allLink.addActionListener(new ActionListener() { @@ -550,30 +561,32 @@ public class FolderManipulator extends SimpleContainer }); panel.add(link); } - + /*panel.add(new Label("filter")); panel.add(new TextField(m_filter)); panel.add(new Submit("filterFolderSubmit", "filter"));*/ add(panel); - + } public void process(FormSectionEvent fse) throws FormProcessException { } - public void init(FormSectionEvent fse) throws FormProcessException { + public void init(FormSectionEvent fse) throws FormProcessException { } public void submitted(FormSectionEvent fse) throws FormProcessException { } - @Override - public void setVisible(PageState state, boolean visible) { - s_log.debug("Setting visible to..." + visible); - panel.setVisible(state, visible); - super.setVisible(state, visible); + public void setVisible(boolean visible) { + this.visible = visible; + } + @Override + public boolean isVisible(PageState state) { + //return super.isVisible(state); + return visible; } } @@ -598,9 +611,9 @@ public class FolderManipulator extends SimpleContainer * sources, any of the sources, and any subfolders of the sources. */ @Override - public Component getComponent (Tree tree, PageState state, Object value, - boolean isSelected, boolean isExpanded, - boolean isLeaf, Object key) { + public Component getComponent(Tree tree, PageState state, Object value, + boolean isSelected, boolean isExpanded, + boolean isLeaf, Object key) { // Get the list of invalid folders once per request. ArrayList invalidFolders = (ArrayList) m_invalidFolders.get(state); diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl index 1e10be31a..00d7ed1e1 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl @@ -30,7 +30,9 @@ object type InternetArticle extends Publication { Integer[0..1] numberOfPages = ct_internet_article.number_of_pages INTEGER; String[0..1] edition = ct_internet_article.edition VARCHAR(256); String[0..1] issn = ct_internet_article.issn VARCHAR(9); + Date[0..1] lastAccessed = ct_internet_article.last_accessed DATE; Date[0..1] publicationDate = ct_internet_article.publicationDate DATE; + reference key (ct_internet_article.internet_article_id); } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java index 70b0ff81e..9bdb10878 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java @@ -40,6 +40,7 @@ public class InternetArticle extends Publication { public static final String NUMBER_OF_PAGES = "numberOfPages"; public static final String EDITION = "edition"; public static final String ISSN = "issn"; + public static final String LAST_ACCESSED = "lastAccessed"; public static final String PUBLICATION_DATE = "publicationDate"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.InternetArticle"; @@ -139,6 +140,14 @@ public class InternetArticle extends Publication { set(ISSN, issn); } + public Date getLastAccessed() { + return (Date) get(LAST_ACCESSED); + } + + public void setLastAccessed(Date lastAccessed) { + set(LAST_ACCESSED, lastAccessed); + } + public Date getPublicationDate() { return (Date) get(PUBLICATION_DATE); } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java index 6c8b5faa1..80c1d1465 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java @@ -66,8 +66,8 @@ public class InternetArticlePropertiesStep extends PublicationPropertiesStep { InternetArticle.ISSN); sheet.add(PublicationGlobalizationUtil.globalize( - "publications.ui.internetarticle.publication_date"), - InternetArticle.PUBLICATION_DATE); + "publications.ui.internetarticle.lastAccessed"), + InternetArticle.LAST_ACCESSED); return sheet; } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java index 876688eca..8d373b504 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java @@ -106,10 +106,10 @@ public class InternetArticlePropertyForm Calendar today = new GregorianCalendar(); add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.internetarticle.publicationdate"). + "publications.ui.internetarticle.lastAccessed"). localize())); ParameterModel pubDateParam = - new DateParameter(InternetArticle.PUBLICATION_DATE); + new DateParameter(InternetArticle.LAST_ACCESSED); com.arsdigita.bebop.form.Date pubDate = new com.arsdigita.bebop.form.Date( pubDateParam); @@ -129,8 +129,8 @@ public class InternetArticlePropertyForm data.put(InternetArticle.NUMBER_OF_PAGES, article.getNumberOfPages()); data.put(InternetArticle.EDITION, article.getEdition()); data.put(InternetArticle.ISSN, article.getISSN()); - data.put(InternetArticle.PUBLICATION_DATE, - article.getPublicationDate()); + data.put(InternetArticle.LAST_ACCESSED, + article.getLastAccessed()); } @Override @@ -148,8 +148,8 @@ public class InternetArticlePropertyForm (Integer) data.get(InternetArticle.NUMBER_OF_PAGES)); article.setEdition((String) data.get(InternetArticle.EDITION)); article.setISSN((String) data.get(InternetArticle.ISSN)); - article.setPublicationDate( - (Date) data.get(InternetArticle.PUBLICATION_DATE)); + article.setLastAccessed( + (Date) data.get(InternetArticle.LAST_ACCESSED)); article.save(); } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources.properties b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources.properties index 3fc702fe5..e1d12c7bc 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources.properties +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources.properties @@ -301,3 +301,4 @@ publication.ui.internetarticle.organization.remove=Remove publications.ui.monograph.reviewed=Reviewed publications.ui.monograph.reviewed.yes=Yes publications.ui.monograph.reviewed.no=No +publications.ui.internetarticle.lastAccessed= diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources_de.properties b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources_de.properties index 89e545125..fa8534806 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources_de.properties +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationResources_de.properties @@ -300,3 +300,4 @@ publication.ui.internetarticle.organization.remove=Entfernen publications.ui.monograph.reviewed=Begutachtet publications.ui.monograph.reviewed.yes=Ja publications.ui.monograph.reviewed.no=Nein +publications.ui.internetarticle.lastAccessed=Letztes Zugriffsdatum diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPublicationsStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPublicationsStep.java index ec9500ca5..a30874193 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPublicationsStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPublicationsStep.java @@ -30,12 +30,16 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; */ public class SciDepartmentPublicationsStep extends RelatedLinkPropertiesStep { - protected static String s_linkListName = "SciDepartmentPublications"; - protected static ContentType s_contentType = ContentType.findByAssociatedObjectType( - "com.arsdigita.cms.contenttypes.Publication"); - public SciDepartmentPublicationsStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } + + @Override + protected void setLinkSelectionModel() { + super.setLinkSelectionModel(); + linkListName = "SciDepartmentPublications"; + contentType = ContentType.findByAssociatedObjectType( + "com.arsdigita.cms.contenttypes.Publication"); + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPublicationsStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPublicationsStep.java index f1b0f818c..e34f70a41 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPublicationsStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPublicationsStep.java @@ -29,13 +29,17 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; * @author jensp */ public class SciProjectPublicationsStep extends RelatedLinkPropertiesStep { - - protected static String s_linkListName = "SciProjectPublications"; - protected static ContentType s_contentType = ContentType.findByAssociatedObjectType( - "com.arsdigita.cms.contenttypes.Publication"); - + public SciProjectPublicationsStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } + + @Override + protected void setLinkSelectionModel() { + super.setLinkSelectionModel(); + linkListName = "SciProjectPublications"; + contentType = ContentType.findByAssociatedObjectType( + "com.arsdigita.cms.contenttypes.Publication"); + } }