Author: chanaka
Date: Thu Jan 17 22:37:42 2008
New Revision: 12452

Log:

some usability issues on registry resources page are fixed

Modified:
   trunk/registry/modules/webapps/src/main/webapp/admin/ajax_desc.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/ajax_desc.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/ajax_desc.jsp  
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/ajax_desc.jsp  Thu Jan 
17 22:37:42 2008
@@ -11,6 +11,6 @@
 
 <%
     String description = (String) 
request.getSession().getAttribute(UIConstants.AJAX_DESCRIPTION_STRING);
+    if(description.length()<=1) description="<p class=\"helpText\">Empty 
Description</p>";
 %>
-
 <%=description%>
\ No newline at end of file

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 
Thu Jan 17 22:37:42 2008
@@ -117,13 +117,14 @@
                 <% if (details.isPutAllowed()) { %>
                 <a onclick="showHideCommon('propertiesAddDiv');" href="#">
                                <img border="0" title="Add New Property" 
style="margin-top: -10px;" valign="top" 
src="/wso2registry/admin/images/universal-add.gif"/>
+               </a>
                 <%
                 }
                 else{
                 %>
-                    Sorry. You are not authorized to add new properties.
+                    <span class="helpText">Sorry. You don't have permisions to 
add new properties.</span>
                 <% } %>
-            </a>
+
                </td>
                <td id="propertiesAddDiv" style="display:none; 
padding-left:10px;">
                        <form>
@@ -134,9 +135,9 @@
                </td>
        </tr>
     </table>
-    
+
     <div id="resourceProperties" style="margin-left:145px;">
-       
+
         <form>
 
 
@@ -159,18 +160,18 @@
                 String value = (String) props.get(name);
 
         %>
-        
-               
+
+
        <tr id="propEditPanel_<%=i%>" style="display:none;">
                <td><input id="propRPath_<%=i%>" type="hidden" 
value="<%=details.getPath()%>"/><input id="oldPropName_<%=i%>" type="hidden" 
value="<%=name%>"/><input value="<%=name%>" type="text" id="propName_<%=i%>"  
/></td>
                <td><input value="<%=value%>" id="propValue_<%=i%>" 
type="text"/></td>
                <td>
                        <a href="#" 
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>');
 editProperty('<%=i%>')"><img border="0" align="top" title="Save" 
src="/wso2registry/admin/images/save-button.gif" id="propSaveButton_<%=i%>" 
/></a>
                </td>
-       </tr>            
-       
-       
-       
+       </tr>
+
+
+
        <tr id="propViewPanel_<%=i%>">
                <td><%=name%></td>
                <td><%=value%></td>
@@ -181,7 +182,7 @@
                        <% } %>
                </td>
        </tr>
-            
+
         <%
             }
             if(!props.isEmpty()){
@@ -190,8 +191,8 @@
         <% } %>
         </form>
     </div>
-    
-    
+
+
 
     <table cellpadding="0" cellspacing="0" border="0" 
class="simple-data-table" style="width:100%">
         <tr>
@@ -360,7 +361,18 @@
 
 
 
+<% if(collection.getResourceDataList().isEmpty())  { %>
+<div class="helpText">Empty  entries. </div>
+<%  } %>
+
+<% if (details.isCollection() && !details.isPutAllowed()) { %>
+<div class="helpText">Sorry. You don't have permisions to add new resources. 
</div>
+<% } %>
+
 <table cellpadding="0" cellspacing="0" border="0" style="width:100%" 
class="data-table">
+    <%
+        if(!collection.getResourceDataList().isEmpty())  {
+    %>
     <tr>
         <th></th>
         <th>Created Date</th>
@@ -370,6 +382,7 @@
 
     </tr>
     <%
+        }
         Iterator iterator = collection.getResourceDataList().iterator();
         while (iterator.hasNext()) {
             ResourceData resourceData = (ResourceData) iterator.next();

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

Reply via email to