Author: chathura
Date: Mon Jan 28 22:35:51 2008
New Revision: 13105

Log:


Merged the 1.0 branch to trunk.



Added:
   trunk/registry/modules/webapps/src/main/webapp/admin/images/back.gif
      - copied unchanged from r13102, 
branches/registry/1_0/modules/webapps/src/main/webapp/admin/images/back.gif
   
trunk/registry/modules/webapps/src/main/webapp/admin/images/icon-about-big.jpg
      - copied unchanged from r13102, 
branches/registry/1_0/modules/webapps/src/main/webapp/admin/images/icon-about-big.jpg
   trunk/registry/modules/webapps/src/main/webapp/admin/images/icon-details.jpg
      - copied unchanged from r13102, 
branches/registry/1_0/modules/webapps/src/main/webapp/admin/images/icon-details.jpg
Modified:
   
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/AbstractRegistryAction.java
   
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/RecentActivityAction.java
   
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
   
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/utils/ResourceData.java
   
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/CommonUtil.java
   trunk/registry/modules/webapps/src/main/webapp/admin/about.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/advanced-search.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/ajax/entry-list.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/css/main.css
   trunk/registry/modules/webapps/src/main/webapp/admin/images/icon-restore.gif
   trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/search.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/versions.jsp

Modified: 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/AbstractRegistryAction.java
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/AbstractRegistryAction.java
      (original)
+++ 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/AbstractRegistryAction.java
      Mon Jan 28 22:35:51 2008
@@ -63,6 +63,12 @@
         return registry;
     }
 
+    public String getServerBaseURL() {
+        String reqURL = request.getRequestURL().toString();
+        String serverBaseURL = reqURL.substring(0, 
reqURL.indexOf("/wso2registry"));
+        return serverBaseURL;
+    }
+
     public boolean isLoggedIn() throws RegistryException {
 
         Registry registry = getRegistry();

Modified: 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/RecentActivityAction.java
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/RecentActivityAction.java
        (original)
+++ 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/RecentActivityAction.java
        Mon Jan 28 22:35:51 2008
@@ -18,6 +18,7 @@
 
 import org.wso2.registry.LogEntry;
 import org.wso2.registry.RegistryException;
+import org.wso2.registry.web.utils.CommonUtil;
 import org.wso2.registry.secure.SecureRegistry;
 
 import javax.servlet.http.HttpServletRequest;
@@ -82,23 +83,23 @@
             LogEntry logEntry = logs[i];
 
             if (logEntry.getAction() == LogEntry.UPDATE) {
-                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has updated 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> on " + logEntry.getDate().toString() 
+ ".";
+                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has updated 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> on " + 
CommonUtil.formatDate(logEntry.getDate()) + ".";
                 activity.add(entry);
 
             } else if (logEntry.getAction() == LogEntry.DELETE_RESOURCE) {
-                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has deleted 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> on " + logEntry.getDate().toString() 
+ ".";
+                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has deleted 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> on " + 
CommonUtil.formatDate(logEntry.getDate()) + ".";
                 activity.add(entry);
 
             } else if (logEntry.getAction() == LogEntry.COMMENT) {
-                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has 
commented on resource '" + "<a href='/wso2registry/web" + 
logEntry.getResourcePath() + "'>" + logEntry.getResourcePath() + "</a> on " + 
logEntry.getDate().toString() + " with the following comment.<br/>" + 
logEntry.getActionData();
+                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has 
commented on resource '" + "<a href='/wso2registry/web" + 
logEntry.getResourcePath() + "'>" + logEntry.getResourcePath() + "</a> on " + 
CommonUtil.formatDate(logEntry.getDate()) + " with the following comment.<br/>" 
+ logEntry.getActionData();
                 activity.add(entry);
 
             } else if (logEntry.getAction() == LogEntry.TAG) {
-                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has tagged 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> with tag '" + 
logEntry.getActionData() + "' on " + logEntry.getDate().toString() + ".";
+                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has tagged 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> with tag '" + 
logEntry.getActionData() + "' on " + CommonUtil.formatDate(logEntry.getDate()) 
+ ".";
                 activity.add(entry);
 
             } else if (logEntry.getAction() == LogEntry.RATING) {
-                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has rated 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> with rating " + 
logEntry.getActionData() + " on " + logEntry.getDate().toString() + ".";
+                String entry = "<a href='/wso2registry/system/people/" + 
logEntry.getUserName() + "'>" + logEntry.getUserName() + "</a>" + " has rated 
the resource '" + "<a href='/wso2registry/web" + logEntry.getResourcePath() + 
"'>" + logEntry.getResourcePath() + "</a> with rating " + 
logEntry.getActionData() + " on " + CommonUtil.formatDate(logEntry.getDate()) + 
".";
                 activity.add(entry);
 
             }

Modified: 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
       (original)
+++ 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
       Mon Jan 28 22:35:51 2008
@@ -21,6 +21,7 @@
 import org.wso2.registry.secure.SecureRegistry;
 import org.wso2.registry.web.actions.utils.Permission;
 import org.wso2.registry.web.actions.utils.ResourcePath;
+import org.wso2.registry.web.utils.CommonUtil;
 import org.wso2.usermanager.Realm;
 import org.wso2.usermanager.UserManagerException;
 import org.wso2.usermanager.UserManagerConstants;
@@ -31,6 +32,16 @@
 public class ResourceDetailsAction extends AbstractRegistryAction {
 
     private String path;
+
+    /**
+     * This class may contain details of the current version of resources or 
older versions of
+     * resources. When browsing an older version of a resource, it may be 
necessary to get the
+     * path of the current version of that resource. This field contains the 
path of the
+     * current (active) version of the resource. If this object contains the 
details of the
+     * current version, path feild and the activeResourcePath field will be 
identical. 
+     */
+    private String activeResourcePath;
+
     private String relativePath;
     private String contentPath;
     private String permalink;
@@ -178,6 +189,19 @@
             permalink = path;
         }
 
+        if (versionView) {
+
+            String[] parts = path.split("\\?v=");
+            if (parts.length == 2) {
+                activeResourcePath = parts[0];
+            } else {
+                activeResourcePath = path;
+            }
+            
+        } else {
+            activeResourcePath = path;
+        }
+
         if (resource.getAuthorUserName() != null) {
             this.author = resource.getAuthorUserName();
         }
@@ -488,6 +512,14 @@
         this.path = path;
     }
 
+    public String getActiveResourcePath() {
+        return activeResourcePath;
+    }
+
+    public void setActiveResourcePath(String activeResourcePath) {
+        this.activeResourcePath = activeResourcePath;
+    }
+
     public String getRelativePath() {
         return relativePath;
     }
@@ -540,6 +572,10 @@
         return createdOn;
     }
 
+    public String getFormattedCreatedOn() {
+        return CommonUtil.formatDate(createdOn);
+    }
+
     public void setCreatedOn(Date createdOn) {
         this.createdOn = createdOn;
     }
@@ -548,6 +584,10 @@
         return lastModified;
     }
 
+    public String getFormattedLastModified() {
+        return CommonUtil.formatDate(lastModified);
+    }
+
     public void setLastModified(Date lastModified) {
         this.lastModified = lastModified;
     }

Modified: 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/utils/ResourceData.java
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/utils/ResourceData.java
  (original)
+++ 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/utils/ResourceData.java
  Mon Jan 28 22:35:51 2008
@@ -17,6 +17,7 @@
 package org.wso2.registry.web.actions.utils;
 
 import org.wso2.registry.RegistryConstants;
+import org.wso2.registry.web.utils.CommonUtil;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -132,6 +133,10 @@
         return createdOn;
     }
 
+    public String getFormattedCreatedOn() {
+        return CommonUtil.formatDate(createdOn);
+    }
+
     public void setCreatedOn(Date createdOn) {
         this.createdOn = createdOn;
     }

Modified: 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/CommonUtil.java
==============================================================================
--- 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/CommonUtil.java
    (original)
+++ 
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/CommonUtil.java
    Mon Jan 28 22:35:51 2008
@@ -26,6 +26,8 @@
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.ServletContext;
+import java.util.Date;
+import java.text.DateFormat;
 
 public class CommonUtil {
 
@@ -61,7 +63,10 @@
     }
 
     public static void invalidateAllSessions(HttpServletRequest request) {
-
         request.getSession().invalidate();
     }
+
+    public static String formatDate(Date date) {
+        return DateFormat.getDateTimeInstance(DateFormat.LONG, 
DateFormat.LONG).format(date);
+    }
 }

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/about.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/about.jsp      
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/about.jsp      Mon Jan 
28 22:35:51 2008
@@ -66,7 +66,7 @@
                        <h3>User guide</h3>
                        <p>
                        Registry user guide is available at
-                       <a 
href="http://wso2.org/wiki/display/registry/User+guide";  
target="_blank">http://wso2.org/wiki/display/registry/User+guide</a>
+                       <a 
href="http://wso2.org/wiki/display/registry/User+guide";  
target="_blank">http://wso2.org/wiki/display/registry/WSO2+Registry+User%27s+Guide</a>
                        </p>
                        </div>
                        <div class="box2-bot">
@@ -184,7 +184,7 @@
                        
                        
                </td>
-               <td valign="top">
+               <td valign="top" style="padding-left:7px;">
                        <div class="box1-head">
                                <table cellspacing="0" cellpadding="0" 
border="0" style="width:100%">
                                <tr>
@@ -195,12 +195,12 @@
                        </table>
                        </div>
                        <div class="box1-mid">
-                       WSO2 offers �Live Online Training� and �Onsite 
Training� training courses.  Go to <a 
href="http://wso2.com/training/";>http://wso2.com/training/ for more details</a> 
for more details.
+                       WSO2 offers �Live Online Training� and �Onsite 
Training� training courses.
 <h3>Live Online Training</h3>
 <p>Our live online training sessions bring you all the advantages of a 
classroom training no matter where you are. You can share data, ask questions 
from the instructor, speak with the other participants, and even request for a 
coffee break when you need one!</p>
 <h3>Onsite Training</h3>
 <p>If you have a group of employees that require a specific training, we 
provide the training at your site. You can pick a standard course, or send us 
your requirements and we will tailor-make a course for you.</p>
-
+<p>Go to <a href="http://wso2.com/training/";>http://wso2.com/training/</a> for 
more details.</p>
                        
                        </div>
                        <div class="box1-bot">

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/advanced-search.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/advanced-search.jsp    
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/advanced-search.jsp    
Mon Jan 28 22:35:51 2008
@@ -298,7 +298,7 @@
     %>
     <tr id="1">
         <td><a href="/wso2registry/web/<%=resourceData.getRelativePath()%>" 
class="folder-small"><%=resourceData.getResourcePath()%></a></td>
-        <td><%=resourceData.getCreatedOn()%></td>
+        <td><%=resourceData.getFormattedCreatedOn()%></td>
         <td><%=resourceData.getAuthorUserName()%></td>
         <td>
             <img 
src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif"  />

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/entry-list.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/ajax/entry-list.jsp    
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/ajax/entry-list.jsp    
Mon Jan 28 22:35:51 2008
@@ -54,13 +54,13 @@
                 <a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>" 
id="resourceView<%=entryNumber%>"><%=resourceData.getName()%></a>
                 <input type="text" id="resourceEdit<%=entryNumber%>" 
style="display:none" value="<%=resourceData.getName()%>" />
                 | <a 
href="/wso2registry/resources<%=resourceData.getResourcePath()%>" 
target="_blank" title="Download" ><img 
src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top" /></a>
-                <% if (resourceData.isDeleteAllowed()) { %>| <a href="#" 
title="Edit Resource Name" 
onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceEditButton<%=entryNumber%>"><img 
src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" 
id="resourceEditButton" /></a>
+                <% if (resourceData.isDeleteAllowed() && 
!details.isVersionView()) { %>| <a href="#" title="Edit Resource Name" 
onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceEditButton<%=entryNumber%>"><img 
src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" 
id="resourceEditButton" /></a>
                 <a href="#" onclick="renameResource('<%=details.getPath()%>', 
'<%=resourceData.getResourcePath()%>', 
'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" 
align="top" title="Save" src="/wso2registry/admin/images/save-button.gif"  
/></a>
                 <% } %>
             </div>
             <% } %>
         </td>
-        <td><%=resourceData.getCreatedOn()%></td>
+        <td><%=resourceData.getFormattedCreatedOn()%></td>
         <td><%=resourceData.getAuthorUserName()%></td>
         <td>
             <img 
src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif" 
align="top"  />

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp        
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp        
Mon Jan 28 22:35:51 2008
@@ -26,7 +26,7 @@
     %>
 
     <tr>
-        <th valign="top" style="width:140px;">User Rating:</th>
+        <th valign="top" style="width:140px;">My Rating:</th>
         <td>
             <div>
                 <img src="/wso2registry/admin/images/r<%=userStars[0]%>.gif"/>
@@ -44,7 +44,7 @@
     } else {
     %>
     <tr>
-        <th valign="top" style="width:140px;">User Rating:</th>
+        <th valign="top" style="width:140px;">My Rating:</th>
         <td>
             <div id="ratingDivUser">
                 <span initialState="<%=userStars[0]%> <%=userStars[1]%> 
<%=userStars[2]%> <%=userStars[3]%> <%=userStars[4]%>" />
@@ -76,7 +76,7 @@
     </tr>
     <% } } %>
     <tr>
-        <th valign="top" style="width:140px;">Average Rating:</th>
+        <th valign="top" style="width:140px;">Rating:</th>
         <td>
             <div id="ratingDivAvg">
 

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/css/main.css
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/css/main.css   
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/css/main.css   Mon Jan 
28 22:35:51 2008
@@ -555,4 +555,14 @@
 .featureList li{
 padding-top:5px;
 line-height:18px;
+}
+.versionsToolBar{
+padding:3px;
+border:solid 1px #cccccc; 
+background-color:#e2f0d0;
+margin-top:3px;
+margin-bottom:3px;
+}
+.versionsToolBar a{
+color:#6d7465;
 }
\ No newline at end of file

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/images/icon-restore.gif
==============================================================================
Binary files. No diff available.

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 
Mon Jan 28 22:35:51 2008
@@ -95,24 +95,30 @@
             }
             } %>
         </h1>
+        
         <!-- a href="#" style="float:right; 
display:inline;margin-top:10px;margin-right:5px;"><img 
src="/wso2registry/admin/images/icon-folder-up.jpg" border="0" /></a-->
     <span style="clear:both;" />
 </div>
+
 <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
 <tr>
 <td class="leftColoumSizer" valign="top">
 
 <!-- Page main information Starts here -->
 <div style="margin-bottom:10px;">
+<% if (details.isVersionView()) { %>
+
+            <div class="versionsToolBar"><img 
src="/wso2registry/admin/images/back.gif" align="top" vspace="2" /> <a 
href="/wso2registry/versions<%=details.getActiveResourcePath()%>">Back to 
Versions of <%=details.getActiveResourcePath()%></a> | <img 
src="/wso2registry/admin/images/icon-restore.gif" border="0" align="top" 
vspace="2"  /> <a 
href="/wso2registry/system/restore?versionPath=<%=details.getPath()%>" 
title="Restore" style="margin-left:5px;"> Restore to this version </a></div>
+        <% } %>
     <!-- all the content goes here -->
     <table cellpadding="0" cellspacing="0" border="0" 
class="simple-data-table">
-        <tr><th style="width:140px;">Created:</th><td 
style="width:170px;"><%=details.getCreatedOn().toString()%></td><th>Author:</th><td><%=details.getAuthor()%></td></tr>
-        <tr><th>Last 
Updated:</th><td><%=details.getLastModified().toString()%></td><th>By:</th><td><%=details.getLastUpdater()%></td></tr>
+        <tr><th style="width:140px;">Created:</th><td 
style="width:170px;"><%=details.getFormattedCreatedOn()%></td><th>Author:</th><td><%=details.getAuthor()%></td></tr>
+        <tr><th>Last 
Updated:</th><td><%=details.getFormattedLastModified()%></td><th>By:</th><td><%=details.getLastUpdater()%></td></tr>
         <tr><th>Media Type:</th><td colspan="3"><% if (details.getMediaType() 
!= null) { %><%=details.getMediaType()%><% } else { %>Unknown<% } %></td> </tr>
         <% if (details.isCollection()) { %>
-        <tr><th>Permalink:</th><td colspan="3"><a 
href="/wso2registry/web<%=details.getPermalink()%>"><%=details.getPermalink()%></a></td></tr>
+        <tr><th>Permalink:</th><td colspan="3"><a 
href="/wso2registry/web<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>/wso2registry/web<%=details.getPermalink()%></a></td></tr>
         <% } else { %>
-        <tr><th>Permalink:</th><td colspan="3"><a target="_blank" 
href="/wso2registry/resources<%=details.getPermalink()%>"><%=details.getPermalink()%></a></td></tr>
+        <tr><th>Permalink:</th><td colspan="3"><a target="_blank" 
href="/wso2registry/resources<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>/wso2registry/resources<%=details.getPermalink()%></a></td></tr>
         <% } %>
         <% if (!details.isVersionView()) { %><tr><th>Versions</th><td 
colspan="3"><a href="/wso2registry/versions<%=details.getPath()%>">View 
versions</a></td> </tr><% } %>
     </table>
@@ -398,19 +404,20 @@
     %>
     <tr id="1">
         <td>
-               <% if (resourceData.getResourceType() == 
ResourceData.COLLECTION) { %>
-                       <img 
src="/wso2registry/admin/images/icon-folder-small.gif" 
style="margin-right:5px;"  /><a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>"><%=resourceData.getName()%></a>
-               <% } else { %>
-               <div style="margin-left:20px;">
-                       <a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>" 
id="resourceView<%=entryNumber%>"><%=resourceData.getName()%></a>
-                       <input type="text" id="resourceEdit<%=entryNumber%>" 
style="display:none" value="<%=resourceData.getName()%>" />
-                       | <a 
href="/wso2registry/resources<%=resourceData.getResourcePath()%>" 
target="_blank" title="Download" ><img 
src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top" /></a>
-                       | <a href="#" title="Edit Resource Name" 
onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceEditButton<%=entryNumber%>"><img 
src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" 
id="resourceEditButton" /></a>
-                       <a href="#" 
onclick="renameResource('<%=details.getPath()%>', 
'<%=resourceData.getResourcePath()%>', 
'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" 
align="top" title="Save" src="/wso2registry/admin/images/save-button.gif"  
/></a>
-               </div>
-               <% } %>
+            <% if (resourceData.getResourceType() == ResourceData.COLLECTION) 
{ %>
+            <img src="/wso2registry/admin/images/icon-folder-small.gif" 
style="margin-right:5px;"  /><a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>"><%=resourceData.getName()%></a>
+            <% } else { %>
+            <div style="margin-left:20px;">
+                <a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>" 
id="resourceView<%=entryNumber%>"><%=resourceData.getName()%></a>
+                <input type="text" id="resourceEdit<%=entryNumber%>" 
style="display:none" value="<%=resourceData.getName()%>" />
+                | <a 
href="/wso2registry/resources<%=resourceData.getResourcePath()%>" 
target="_blank" title="Download" ><img 
src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top" /></a>
+                <% if (resourceData.isDeleteAllowed() && 
!details.isVersionView()) { %>| <a href="#" title="Edit Resource Name" 
onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceEditButton<%=entryNumber%>"><img 
src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" 
id="resourceEditButton" /></a>
+                <a href="#" onclick="renameResource('<%=details.getPath()%>', 
'<%=resourceData.getResourcePath()%>', 
'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>');
 
showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
 id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" 
align="top" title="Save" src="/wso2registry/admin/images/save-button.gif"  
/></a>
+                <% } %>
+            </div>
+            <% } %>
         </td>
-        <td><%=resourceData.getCreatedOn()%></td>
+        <td><%=resourceData.getFormattedCreatedOn()%></td>
         <td><%=resourceData.getAuthorUserName()%></td>
         <td>
             <img 
src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif" 
align="top"  />
@@ -430,7 +437,6 @@
 
 
     <% } %>
-
 </table>
 </div>
 

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/search.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/search.jsp     
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/search.jsp     Mon Jan 
28 22:35:51 2008
@@ -71,7 +71,7 @@
         %>
         <tr id="1">
             <td><a 
href="/wso2registry/web/<%=resourceData.getRelativePath()%>" 
class="folder-small"><%=resourceData.getResourcePath()%></a></td>
-            <td><%=resourceData.getCreatedOn()%></td>
+            <td><%=resourceData.getFormattedCreatedOn()%></td>
             <td><%=resourceData.getAuthorUserName()%></td>
             <td>
                 <img 
src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif"  />

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/versions.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/versions.jsp   
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/versions.jsp   Mon Jan 
28 22:35:51 2008
@@ -28,6 +28,13 @@
 
     <jsp:include page="header.jsp" />
     <div class="content">
+        <!--This is the START of main table which seperates 2 coloums for 
promotions and content of the site -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%;">
+    <tr>
+        <td class="promotionDiv" valign="top">
+               <jsp:include page="promotion.jsp" />
+        </td>
+        <td valign="top">
         <h1 class="headding-recent-activity">Versions of 
<%=versionBean.getResourcePath()%></h1>
 
         <!-- Hear comes the box1 table -->
@@ -36,7 +43,6 @@
                 <tr>
                     <td valign="top" style="padding-top:0px;width:14px;"><img 
src="/wso2registry/admin/images/box1-lefttop.jpg" /></td>
                     <td valign="top">
-                        <h2>Search Activities</h2>
                     </td>
                     <td align="right" valign="top">
                         <a href="#" 
onclick="showHideCommon('userIconExpanded');showHideCommon('userIconMinimized');showHideCommon('userExpanded');showHideCommon('userMinimized');">
@@ -74,7 +80,7 @@
                     <td><%=currentVersion.getUpdatedOn().toString()%></td>
                     <td><%=currentVersion.getUpdater()%></td>
                     <td>
-                        <a 
href="/wso2registry/web<%=currentVersion.getActiveResourcePath()%>" 
title="Details">Details <img src="/wso2registry/admin/images/icon-details.gif" 
border="0" hspace="3" /></a>
+                        <a 
href="/wso2registry/web<%=currentVersion.getActiveResourcePath()%>" 
title="Details">Details <img src="/wso2registry/admin/images/icon-details.jpg" 
border="0" hspace="3" align="top" /></a>
                     </td>
                 </tr>
 
@@ -90,7 +96,7 @@
                     <td><%=versionPath.getUpdatedOn().toString()%></td>
                     <td><%=versionPath.getUpdater()%></td>
                     <td>
-                        <a 
href="/wso2registry/web<%=versionPath.getCompleteVersionPath()%>" 
title="Details">Details <img src="/wso2registry/admin/images/icon-details.gif" 
border="0" hspace="3" /></a>
+                        <a 
href="/wso2registry/web<%=versionPath.getCompleteVersionPath()%>" 
title="Details">Details <img src="/wso2registry/admin/images/icon-details.jpg" 
border="0" hspace="3" /></a>
                         <a 
href="/wso2registry/system/restore?versionPath=<%=versionPath.getCompleteVersionPath()%>"
 title="Restore" style="margin-left:5px;">Restore <img 
src="/wso2registry/admin/images/icon-restore.gif" border="0" /></a>
                     </td>
                 </tr>
@@ -111,7 +117,9 @@
         </div>
 
 
-
+</td>
+</tr>
+</table>
 
 
     </div>

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to