diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Template.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Template.java index ae77a3d78..c54a90c30 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Template.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/Template.java @@ -128,6 +128,7 @@ public class Template extends DomainObject { public static TemplateCollection retrieveAll() { Session session = SessionManager.getSession(); DataCollection temp = session.retrieve(BASE_DATA_OBJECT_TYPE); + temp.addOrder("title"); return new TemplateCollection(temp); } diff --git a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java index 145582c37..27e95aee4 100644 --- a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java +++ b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java @@ -242,6 +242,59 @@ public class Loader extends PackageLoader { "/packages/navigation/templates/" + "SciOrganizationDescription.jsp"); + template = Template.create( + "SciProject List", + "List of SciProjects", + "/packages/navigation/templates/SciProjectList.jsp"); + + template = Template.create( + "SciOrganization Description Only", + "Display only the description of a SciOrganization", + "/packages/navigation/templates/" + + "SciOrganizationDescription.jsp"); + + template = Template.create( + "SciOrganization Members", + "Displays only the members of a SciOrganization " + + "(and the short description)", + "/packages/navigation/templates/SciOrganizationMembers.jsp"); + + template = Template.create( + "SciOrganization Departments", + "Displays only the departments of a SciOrganization", + "/packages/naviagation/templates/" + + "SciOrganizationDepartments.jsp"); + + template = Template.create( + "SciOrganization Projects", + "Displays only the projects of a SciOrganization (and its " + + "departments", + "/packages/navigation/templates/SciOrganizationProjects.jsp"); + + template = Template.create( + "SciDepartment Description Only", + "Display only the description of a SciDepartment", + "/packages/navigation/templates/" + + "SciDepartmentDescription.jsp"); + + template = Template.create( + "SciDepartment Members", + "Displays only the members of a SciDepartment " + + "(and the short description)", + "/packages/navigation/templates/SciDepartmentMembers.jsp"); + + template = Template.create( + "SciDepartment Departments", + "Displays only the departments of a SciDepartment", + "/packages/naviagation/templates/" + + "SciDepartmentDepartments.jsp"); + + template = Template.create( + "SciDepartment Projects", + "Displays only the projects of a SciDepartment (and its " + + "departments", + "/packages/navigation/templates/SciDepartmentProjects.jsp"); + } /** diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentDescription.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentDescription.jsp new file mode 100644 index 000000000..2e1d5a139 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentDescription.jsp @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciDepartment", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentMembers.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentMembers.jsp new file mode 100644 index 000000000..87af629b7 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentMembers.jsp @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciDepartment", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/departmentDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/persons"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setOrder("surname asc, givenname asc"); + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentProjects.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentProjects.jsp new file mode 100644 index 000000000..15b32d4c1 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentProjects.jsp @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciDepartment", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/departmentDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/projects"); + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentSubDepartments.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentSubDepartments.jsp new file mode 100644 index 000000000..f4ee43330 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciDepartmentSubDepartments.jsp @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciDepartment", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/departmentDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/subDepartments"); + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDepartments.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDepartments.jsp new file mode 100644 index 000000000..7ff218392 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDepartments.jsp @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciOrganization", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/organizationDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/departments"); + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp new file mode 100644 index 000000000..9fcaecf02 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciOrganization", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp~ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp~ new file mode 100644 index 000000000..6eb9e031a --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationDescription.jsp~ @@ -0,0 +1,45 @@ + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationMembers.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationMembers.jsp new file mode 100644 index 000000000..0289f84c1 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationMembers.jsp @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciOrganization", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/organizationDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/persons"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/departments/persons"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setOrder("surname asc, givenname asc"); + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationProjects.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationProjects.jsp new file mode 100644 index 000000000..286fb0f0a --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciOrganizationProjects.jsp @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).loadTraversalAdapter("com.arsdigita.cms.contenttypes.SciOrganization", + SimpleXMLGenerator.ADAPTER_CONTEXT); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAttributeProperty("/object/organizationDescription"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().clearAssociationProperties(); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/projects"); + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).getTraversalAdapter().addAssociationProperty("/object/departments/projects"); + + + ((com.arsdigita.london.navigation.ui.CustomizableGreetingItem) greetingItem).setPageSize(20); + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SciProjectList.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SciProjectList.jsp new file mode 100644 index 000000000..fe63144a3 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SciProjectList.jsp @@ -0,0 +1,56 @@ + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + + + + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).setDefinition(new CMSDataCollectionDefinition()); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).setRenderer(new CMSDataCollectionRenderer()); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage"); + + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setDescendCategories(false); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getDefinition().addOrder("parent.categories.link.sortKey"); + + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().setPageSize(20); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("objectType"); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("persons"); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("projectbegin"); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("projectend"); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("projectShortDesc"); + + + + + + + + +