Index: trunk/grails-app/views/assetDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/assetDetailed/show.gsp	(revision 161)
+++ trunk/grails-app/views/assetDetailed/show.gsp	(revision 271)
@@ -19,5 +19,4 @@
                 <table>
                     <tbody>
-
                     
                         <tr class="prop">
@@ -29,8 +28,55 @@
                     
                         <tr class="prop">
-                            <td valign="top" class="name">Name:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'name')}</td>
-                            
+                            <td valign="top" class="name">Asset:</td>
+
+                            <td  valign="top" style="text-align:left;" class="value">
+                                ${assetInstance.encodeAsHTML()}
+                                <g:link controller="assetSubItemDetailed" params="['asset.id':assetInstance?.id]" action="create">
+                                    <img src="${resource(dir:'images/skin',file:'database_add.png')}" alt="Add" title="Add Sub Item"/>
+                                </g:link>
+                                <g:link params="['asset.id':assetInstance?.id]" action="copy">
+                                    <img src="${resource(dir:'images/skin',file:'page_copy.png')}" alt="Copy" title="Copy Asset"/>
+                                </g:link>
+                                <br />
+                                <br />
+                                <ul>
+                                <g:each var="assetSubItem1" in="${assetInstance.assetSubItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
+                                    <li>
+                                        <g:link controller="assetSubItemDetailed" action="edit" id="${assetSubItem1.id}">${assetSubItem1?.encodeAsHTML()}</g:link>
+                                    <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItem1?.id]" action="create">
+                                        <img src="${resource(dir:'images/skin',file:'database_add.png')}" alt="Add" title="Add Sub Item" />
+                                    </g:link>
+                                    </li>
+                                    <ul>
+                                    <g:each var="assetSubItem2" in="${assetSubItem1.subItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
+                                        <li>
+                                            <g:link controller="assetSubItemDetailed" action="edit" id="${assetSubItem2.id}">${assetSubItem2?.encodeAsHTML()}</g:link>
+                                        <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItem2?.id]" action="create">
+                                            <img src="${resource(dir:'images/skin',file:'database_add.png')}" alt="Add" title="Add Sub Item" />
+                                        </g:link>
+                                        </li>
+                                        <ul>
+                                        <g:each var="assetSubItem3" in="${assetSubItem2.subItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
+                                            <li>
+                                                <g:link controller="assetSubItemDetailed" action="edit" id="${assetSubItem3.id}">${assetSubItem3?.encodeAsHTML()}</g:link>
+                                            <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItem3?.id]" action="create">
+                                                <img src="${resource(dir:'images/skin',file:'database_add.png')}" alt="Add" title="Add Sub Item" />
+                                            </g:link>
+                                            </li>
+                                            <ul>
+                                            <g:each var="assetSubItem4" in="${assetSubItem3.subItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
+                                                <li><g:link controller="assetSubItemDetailed" action="edit" id="${assetSubItem4.id}">${assetSubItem4?.encodeAsHTML()}</g:link></li>
+                                            </g:each> <!--assetSubItem4-->
+                                            </ul>
+                                        </g:each> <!--assetSubItem3-->
+                                        </ul>
+                                    </g:each> <!--assetSubItem2-->
+                                    </ul>
+                                    <br />
+                                    <br />
+                                </g:each> <!--assetSubItem1-->
+                                </ul>
+                            </td>
+
                         </tr>
                     
@@ -39,52 +85,4 @@
                             
                             <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'description')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Cost Code:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'costCode')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Asset Type:</td>
-                            
-                            <td valign="top" class="value">
-                                ${assetInstance?.assetType?.encodeAsHTML()}
-                                <ul>
-                                <g:each var="a" in="${assetInstance.assetType.assemblies}">
-                                    <li>
-                                        ${a?.encodeAsHTML()}
-                                        <ul>
-                                        <g:each var="s" in="${a.subAssemblies}">
-                                            <li>${s?.encodeAsHTML()}</li>
-                                        </g:each>
-                                        </ul>
-                                    </li>
-                                </g:each>
-                                </ul>
-                            </td>
-                            
-                        </tr>
-
-                        <tr class="prop">
-                            <td valign="top" class="name">System Section:</td>
-                            
-                            <td valign="top" class="value"><g:link controller="systemSectionDetailed" action="show" id="${assetInstance?.systemSection?.id}">${assetInstance?.systemSection?.encodeAsHTML()}</g:link></td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Asset Extended Attributes:</td>
-                            
-                            <td  valign="top" style="text-align:left;" class="value">
-                                <ul>
-                                <g:each var="a" in="${assetInstance.assetExtendedAttributes}">
-                                    <li><g:link controller="assetExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
-                                </g:each>
-                                </ul>
-                            </td>
                             
                         </tr>
@@ -98,4 +96,24 @@
                     
                         <tr class="prop">
+                            <td valign="top" class="name">Section:</td>
+                            
+                            <td valign="top" class="value"><g:link controller="sectionDetailed" action="show" id="${assetInstance?.section?.id}">${assetInstance?.section?.encodeAsHTML()}</g:link></td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Asset Extended Attributes:</td>
+                            
+                            <td  valign="top" style="text-align:left;" class="value">
+                                <ul>
+                                <g:each var="a" in="${assetInstance.assetExtendedAttributes}">
+                                    <li><g:link controller="assetExtendedAttributeDetailed" action="edit" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
+                                </g:each>
+                                </ul>
+                            </td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
                             <td valign="top" class="name">Maintenance Actions:</td>
                             
@@ -103,5 +121,5 @@
                                 <ul>
                                 <g:each var="m" in="${assetInstance.maintenanceActions}">
-                                    <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
+                                    <li><g:link controller="maintenanceActionDetailed" action="edit" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
                                 </g:each>
                                 </ul>
