Author: chathura
Date: Tue Dec 11 00:22:36 2007
New Revision: 10896
Log:
Fixed the breadcrumb.
Modified:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Modified:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
==============================================================================
---
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
(original)
+++
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
Tue Dec 11 00:22:36 2007
@@ -574,7 +574,7 @@
setErrorMessage(request, e.getMessage());
}
- forwardToResources(request, response, path);
+ response.sendRedirect("/wso2registry/web" + path);
}
}
}
Modified:
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Tue Dec 11 00:22:36 2007
@@ -7,6 +7,7 @@
<%@ page import="org.wso2.registry.Tag" %>
<%@ page import="org.wso2.registry.Comment" %>
<%@ page import="org.wso2.registry.web.actions.utils.ResourcePath" %>
+<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
@@ -42,12 +43,28 @@
<% } %>
<div class="breadcrumb">
<%
- Iterator iNavPaths = details.getNavigatablePaths().iterator();
- while (iNavPaths.hasNext()) {
- ResourcePath resourcePath = (ResourcePath) iNavPaths.next();
- %>
- / <a
href="/wso2registry/web<%=resourcePath.getNavigatePath()%>"><%=resourcePath.getNavigateName()%></a>
- <% } %>
+ List iNavPaths = details.getNavigatablePaths();
+ if (iNavPaths.size() > 0) {
+ ResourcePath rootPath = (ResourcePath) iNavPaths.get(0);
+ %>
+ <a
href="/wso2registry/web<%=rootPath.getNavigatePath()%>"><%=rootPath.getNavigateName()%></a>
+ <%
+
+ if (iNavPaths.size() > 1) {
+ ResourcePath childPath = (ResourcePath) iNavPaths.get(1);
+ %>
+ <a
href="/wso2registry/web<%=childPath.getNavigatePath()%>"><%=childPath.getNavigateName()%></a>
+ <%
+ }
+
+ if (iNavPaths.size() > 2) {
+ for (int i = 2; i < iNavPaths.size(); i++) {
+ ResourcePath resourcePath = (ResourcePath)
iNavPaths.get(i);
+ %>
+ /<a
href="/wso2registry/web<%=resourcePath.getNavigatePath()%>"><%=resourcePath.getNavigateName()%></a>
+ <% }
+ }
+ } %>
</div>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
@@ -60,15 +77,15 @@
<% } else { %>
<div class="resource-small headding1"><%=details.getName()%></div>
<% } %>
-
+
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td>
- <div><strong>Created:
</strong><%=details.getCreatedOn().toString()%><strong> Author:
</strong><%=details.getAuthor()%></div>
- <div><strong>Last Updated:
</strong><%=details.getLastModified().toString()%><strong>
By:</strong><%=details.getLastUpdater()%></div>
+ <div><strong>Created:
</strong><%=details.getCreatedOn().toString()%><strong> Author:
</strong><%=details.getAuthor()%></div>
+ <div><strong>Last Updated:
</strong><%=details.getLastModified().toString()%><strong>
By:</strong><%=details.getLastUpdater()%></div>
</td>
<td align="right">
- <div id="ratingDiv"><img
src="/wso2registry/admin/images/ajax-loader.gif" /></div>
+ <div id="ratingDiv"><img
src="/wso2registry/admin/images/ajax-loader.gif" /></div>
</td>
</tr>
</table>
@@ -266,7 +283,7 @@
<%
Iterator iTags = details.getTags().iterator();
while (iTags.hasNext()) {
- Tag tag = (Tag) iTags.next();
+ Tag tag = (Tag) iTags.next();
%>
<a href="#"
class="cloud-x<%=tag.getCategary()%>"><%=tag.getTagName()%></a>
<% } %>
@@ -292,31 +309,31 @@
<div class="title-heading" style="margin-top:5px;">Versions</div>
-
-
-
-<div class="resource-content">
- <%
- Iterator iVersions = details.getVersionPaths().iterator();
- while (iVersions.hasNext()) {
- VersionPath versionPath = (VersionPath) iVersions.next();
- %>
-
- <h3>Version <%=versionPath.getVersionNumber()%></h3>
-
- <strong style="color:#696969;">Last
Modified:</strong><br>
- <%=versionPath.getUpdatedOn().toString()%>
- <br><strong style="color:#696969;">By:</strong>
<%=versionPath.getUpdater()%>
- <br>
- <div style="margin-bottom:10px;">
- <a
href="/wso2registry/web<%=versionPath.getCompleteVersionPath()%>"
title="Details">Details <img src="/wso2registry/admin/images/icon-details.gif"
border="0" hspace="3" /></a>
- <a href="#" title="Restore"
style="margin-left:5px;">Restore <img
src="/wso2registry/admin/images/icon-restore.gif" border="0" /></a>
- </div>
-
-
- <% } %>
-</div>
-
+
+
+
+ <div class="resource-content">
+ <%
+ Iterator iVersions = details.getVersionPaths().iterator();
+ while (iVersions.hasNext()) {
+ VersionPath versionPath = (VersionPath) iVersions.next();
+ %>
+
+ <h3>Version <%=versionPath.getVersionNumber()%></h3>
+
+ <strong style="color:#696969;">Last Modified:</strong><br>
+ <%=versionPath.getUpdatedOn().toString()%>
+ <br><strong style="color:#696969;">By:</strong>
<%=versionPath.getUpdater()%>
+ <br>
+ <div style="margin-bottom:10px;">
+ <a
href="/wso2registry/web<%=versionPath.getCompleteVersionPath()%>"
title="Details">Details <img src="/wso2registry/admin/images/icon-details.gif"
border="0" hspace="3" /></a>
+ <a href="#" title="Restore" style="margin-left:5px;">Restore <img
src="/wso2registry/admin/images/icon-restore.gif" border="0" /></a>
+ </div>
+
+
+ <% } %>
+ </div>
+
</td>
</tr>
</table>
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev