diff --git a/ccm-cms-assets-imagestep/sql/ccm-cms-assets-imagestep/default/upgrade/6.6.1-6.6.2/cms_item_image_attachment.sql b/ccm-cms-assets-imagestep/sql/ccm-cms-assets-imagestep/default/upgrade/6.6.1-6.6.2/cms_item_image_attachment.sql new file mode 100644 index 000000000..605c80399 --- /dev/null +++ b/ccm-cms-assets-imagestep/sql/ccm-cms-assets-imagestep/default/upgrade/6.6.1-6.6.2/cms_item_image_attachment.sql @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_acs_objects.sql $ + + +alter table cms_item_image_attachement add column sort_key integer set default 1; \ No newline at end of file diff --git a/ccm-sci-bundle/web/templates/ccm-ldn-search/advanced.jsp b/ccm-sci-bundle/web/templates/ccm-ldn-search/advanced.jsp new file mode 100644 index 000000000..e13e9826b --- /dev/null +++ b/ccm-sci-bundle/web/templates/ccm-ldn-search/advanced.jsp @@ -0,0 +1,28 @@ + + + + + + + + DispatcherHelper.cacheDisable(response); + + + + + + + ((com.arsdigita.navigation.ui.category.Path) categoryPath).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + ((com.arsdigita.navigation.ui.category.Menu) categoryMenu).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + + + + + + diff --git a/ccm-sci-bundle/web/templates/ccm-ldn-search/index.jsp b/ccm-sci-bundle/web/templates/ccm-ldn-search/index.jsp new file mode 100644 index 000000000..d8ca3142c --- /dev/null +++ b/ccm-sci-bundle/web/templates/ccm-ldn-search/index.jsp @@ -0,0 +1,29 @@ + + + + + + + + DispatcherHelper.cacheDisable(response); + + + + + + + ((com.arsdigita.navigation.ui.category.Path) categoryPath).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + ((com.arsdigita.navigation.ui.category.Menu) categoryMenu).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + + + + + + + diff --git a/ccm-sci-bundle/web/templates/ccm-ldn-search/remote.jsp b/ccm-sci-bundle/web/templates/ccm-ldn-search/remote.jsp new file mode 100644 index 000000000..c0cbe323d --- /dev/null +++ b/ccm-sci-bundle/web/templates/ccm-ldn-search/remote.jsp @@ -0,0 +1,28 @@ + + + + + + + + DispatcherHelper.cacheDisable(response); + + + + + + + ((com.arsdigita.navigation.ui.category.Path) categoryPath).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + ((com.arsdigita.navigation.ui.category.Menu) categoryMenu).setModel(new com.arsdigita.subsite.SearchNavigationModel()); + + + + + + diff --git a/ccm-subsite/src/com/arsdigita/subsite/SearchNavigationModel.java b/ccm-subsite/src/com/arsdigita/subsite/SearchNavigationModel.java new file mode 100644 index 000000000..b8f25250e --- /dev/null +++ b/ccm-subsite/src/com/arsdigita/subsite/SearchNavigationModel.java @@ -0,0 +1,58 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.arsdigita.subsite; + +import com.arsdigita.categorization.Category; +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.navigation.AbstractNavigationModel; + +/** + * + * @author Sören Bernstein (quasimodo) + */ +public class SearchNavigationModel extends AbstractNavigationModel { + + @Override + protected ACSObject loadObject() { + Category category = getCategory(); + if (category == null) { + return null; + } + return category.getIndexObject(); + } + + @Override + protected Category loadCategory() { + Category[] path = getCategoryPath(); + if (path == null + || path.length == 0) { + return null; + } + return path[path.length - 1]; + } + + @Override + protected Category[] loadCategoryPath() { + if (Subsite.getContext().hasSite()) { + Category path[] = new Category[1]; + Site subsite = Subsite.getContext().getSite(); + path[0] = subsite.getRootCategory(); + return path; + } else { + return null; + } + } + + @Override + protected Category loadRootCategory() { + + if (Subsite.getContext().hasSite()) { + Site subsite = Subsite.getContext().getSite(); + return subsite.getRootCategory(); + } else { + return null; + } + } +}