Index: trunk/grails-app/views/assetSubItemDetailed/edit.gsp
===================================================================
--- trunk/grails-app/views/assetSubItemDetailed/edit.gsp	(revision 410)
+++ trunk/grails-app/views/assetSubItemDetailed/edit.gsp	(revision 659)
@@ -27,5 +27,13 @@
                         
                             <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupHeader">
+                                    <label for="name">Asset Sub Item</label>
+                                </td>
+                                <td valign="top" class="value">
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="groupName">
                                     <label for="name">Name:</label>
                                 </td>
@@ -36,5 +44,5 @@
                         
                             <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupName">
                                     <label for="description">Description:</label>
                                 </td>
@@ -45,5 +53,5 @@
                             
                             <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupName">
                                     <label for="comment">Comment:</label>
                                 </td>
@@ -54,5 +62,5 @@
                         
                             <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupName">
                                     <label for="isActive">Is Active:</label>
                                 </td>
@@ -63,28 +71,71 @@
                         
                             <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="assetSubItemExtendedAttributes">Extended Attributes:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}">
-                                    
-<ul>
-<g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}">
-    <li><g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
-</g:each>
-</ul>
-<g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link>
-
-                                </td>
+                                <td valign="top" class="groupHeader">
+                                    <label for="name">Extended Attributes</label>
+                                </td>
+                                <td valign="top" class="value">
+                                </td>
+                            </tr> 
+                        
+                            <g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}">
+                                <tr class="prop">
+                                    <td valign="top" class="name">
+                                    </td>
+                                    <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}">
+                                        <g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}">
+                                            ${a?.encodeAsHTML()}
+                                        </g:link>
+                                    </td>
+                                </tr>
+                            </g:each>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="groupHeader">
+                                </td>
+                                <td valign="top" class="value">
+                                    <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                        
+                            <tr class="prop">
+                                <td valign="top" class="groupHeader">
+                                    <label for="name">Asset Tree</label>
+                                </td>
+                                <td valign="top" class="value">
+                                </td>
+                            </tr> 
+
+                            <tr class="prop">
+                                <td valign="top" class="groupName">Assets:</td>
+
+                                <td  valign="top" style="text-align:left;" class="value">
+                                    <g:if test="${assetSubItemInstance.parentItem}" >
+                                        N/A (Assigned to parent item)
+                                    </g:if>
+                                    <g:else>
+                                        <g:if test="${assetSubItemInstance.assets}">
+                                            <ul>
+                                            <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
+                                                <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
+                                            </g:each>
+                                            </ul>
+                                        </g:if>
+                                        <g:else>
+                                            May be assigned via asset edit view.
+                                        </g:else>
+                                    </g:else>
+                                </td>
+
                             </tr>
-                        
-                            <tr class="prop">
                             
                             <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupName">
                                     <label for="parentItem">Parent Item:</label>
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}">
                                     <g:if test="${assetSubItemInstance.assets}">
-                                        Assigned to assets.
+                                        Level 1 sub item (Assigned directly to assets)
                                     </g:if>
                                     <g:else>
@@ -95,23 +146,5 @@
 
                             <tr class="prop">
-                                <td valign="top" class="name">Assets:</td>
-
-                                <td  valign="top" style="text-align:left;" class="value">
-                                    <g:if test="${assetSubItemInstance.parentItem}" >
-                                        Assigned to parent item.
-                                    </g:if>
-                                    <g:else>
-                                        <ul>
-                                        <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
-                                            <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
-                                        </g:each>
-                                        </ul>
-                                    </g:else>
-                                </td>
-
-                            </tr>
-
-                            <tr class="prop">
-                                <td valign="top" class="name">
+                                <td valign="top" class="groupName">
                                     <label for="subItems">Sub Items:</label>
                                 </td>
@@ -129,18 +162,28 @@
                         
                             <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="maintenanceActions">Maintenance Actions:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}">
-                                    
-<ul>
-<g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}">
-    <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
-</g:each>
-</ul>
-<g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link>
-
-                                </td>
-                            </tr>
+                                <td valign="top" class="groupHeader">
+                                    <label for="name">Maintenance Actions</label>
+                                </td>
+                                <td valign="top" class="value">
+                                </td>
+                            </tr> 
+                        
+                            <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}">
+                                <tr class="prop">
+                                    <td valign="top" class="name">
+                                    </td>
+                                    <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}">
+                                        <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
+                                    </td>
+                                </tr>
+                            </g:each>
+                        
+                            <tr class="prop">
+                                <td valign="top" class="groupHeader">
+                                </td>
+                                <td valign="top" class="value">
+                                    <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link>
+                                </td>
+                            </tr> 
                         
                         </tbody>
