[DS-381] community and collection homepage

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4567 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Ben Bosman
2009-11-30 16:31:29 +00:00
parent 9fb947f373
commit a71786249c
3 changed files with 51 additions and 6 deletions

View File

@@ -42,6 +42,8 @@ package org.dspace.app.xmlui.aspect.artifactbrowser;
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
import java.util.Map;
import java.util.HashMap;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.environment.ObjectModelHelper;
@@ -287,9 +289,29 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
"collection-browse");
browse.setHead(T_head_browse);
String url = contextPath + "/handle/" + collection.getHandle();
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
try
{
// Get a Map of all the browse tables
BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
for (BrowseIndex bix : bis)
{
// Create a Map of the query parameters for this link
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put("type", bix.getName());
// Add a link to this browse
browse.addItemXref(super.generateURL(url + "/browse", queryParams),
message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
}
}
catch (BrowseException bex)
{
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
}
}
// Add the reference

View File

@@ -42,6 +42,8 @@ package org.dspace.app.xmlui.aspect.artifactbrowser;
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
import java.util.Map;
import java.util.HashMap;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.environment.ObjectModelHelper;
@@ -308,9 +310,29 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
"community-browse");
browse.setHead(T_head_browse);
String url = contextPath + "/handle/" + community.getHandle();
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
try
{
// Get a Map of all the browse tables
BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
for (BrowseIndex bix : bis)
{
// Create a Map of the query parameters for this link
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put("type", bix.getName());
// Add a link to this browse
browse.addItemXref(super.generateURL(url + "/browse", queryParams),
message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
}
}
catch (BrowseException bex)
{
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
}
}
// Add main reference:

View File

@@ -122,6 +122,7 @@
- [DS-228] Community Admin XMLUI: Delegated Admins Patch
(Ben Bosman)
- [DS-381] community and collection homepage
- [DS-310] UTF-8 encoding in community and collection text
- [DS-307] Offer access in AbstractSearch to QueryResults for subclasses
- [DS-306] Option to disable mailserver