mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
[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:
@@ -42,6 +42,8 @@ package org.dspace.app.xmlui.aspect.artifactbrowser;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.apache.cocoon.caching.CacheableProcessingComponent;
|
import org.apache.cocoon.caching.CacheableProcessingComponent;
|
||||||
import org.apache.cocoon.environment.ObjectModelHelper;
|
import org.apache.cocoon.environment.ObjectModelHelper;
|
||||||
@@ -287,10 +289,30 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
"collection-browse");
|
"collection-browse");
|
||||||
browse.setHead(T_head_browse);
|
browse.setHead(T_head_browse);
|
||||||
String url = contextPath + "/handle/" + collection.getHandle();
|
String url = contextPath + "/handle/" + collection.getHandle();
|
||||||
|
|
||||||
|
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=title",T_browse_titles);
|
||||||
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
||||||
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add the reference
|
// Add the reference
|
||||||
{
|
{
|
||||||
|
@@ -42,6 +42,8 @@ package org.dspace.app.xmlui.aspect.artifactbrowser;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.apache.cocoon.caching.CacheableProcessingComponent;
|
import org.apache.cocoon.caching.CacheableProcessingComponent;
|
||||||
import org.apache.cocoon.environment.ObjectModelHelper;
|
import org.apache.cocoon.environment.ObjectModelHelper;
|
||||||
@@ -308,10 +310,30 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
"community-browse");
|
"community-browse");
|
||||||
browse.setHead(T_head_browse);
|
browse.setHead(T_head_browse);
|
||||||
String url = contextPath + "/handle/" + community.getHandle();
|
String url = contextPath + "/handle/" + community.getHandle();
|
||||||
|
|
||||||
|
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=title",T_browse_titles);
|
||||||
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
||||||
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add main reference:
|
// Add main reference:
|
||||||
{
|
{
|
||||||
|
@@ -122,6 +122,7 @@
|
|||||||
- [DS-228] Community Admin XMLUI: Delegated Admins Patch
|
- [DS-228] Community Admin XMLUI: Delegated Admins Patch
|
||||||
|
|
||||||
(Ben Bosman)
|
(Ben Bosman)
|
||||||
|
- [DS-381] community and collection homepage
|
||||||
- [DS-310] UTF-8 encoding in community and collection text
|
- [DS-310] UTF-8 encoding in community and collection text
|
||||||
- [DS-307] Offer access in AbstractSearch to QueryResults for subclasses
|
- [DS-307] Offer access in AbstractSearch to QueryResults for subclasses
|
||||||
- [DS-306] Option to disable mailserver
|
- [DS-306] Option to disable mailserver
|
||||||
|
Reference in New Issue
Block a user