

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Asset</title>
        <nav:resources override="true"/>
    </head>
    <body>
        <div class="nav">
            <nav:renderSubItems group="nav"/>
        </div>
        <div class="body">
            <g:render template="/shared/messages" />
            <div class="dialog">
                <table>
                    <tbody>

                        <tr class="prop">
                            <td valign="top" class="groupHeader">
                                <label for="name">Asset</label>
                            </td>
                            <td valign="top" class="value">
                            </td>
                        </tr>

                        <tr class="prop">
                            <td valign="top" class="groupName">Id:</td>

                            <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'id')}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="groupName">Name:</td>

                            <td  valign="top" style="text-align:left;" class="value">
                                ${assetInstance.name.encodeAsHTML()}
                            </td>

                        </tr>

                            <tr class="prop">
                                <td valign="top" class="groupName">Description:</td>
                                
                                <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'description')}</td>
                                
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="groupName">Comment:</td>
                                
                                <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'comment')}</td>
                                
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="groupName">Is Active:</td>
                                
                                <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'isActive')}</td>
                                
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="groupName">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="groupHeader">Extended Attributes</td>
                                
                                <td  valign="top" style="text-align:left;" class="value">
                                </td>
                                
                            </tr>
                        
                            <g:each var="a" in="${assetInstance.assetExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}">
                                <tr class="prop">
                                    <td valign="top" class="groupName">
                                        ${a.extendedAttributeType.name.encodeAsHTML()}:
                                    </td>
                                    
                                    <td  valign="top" style="text-align:left;" class="value">
                                        <g:link controller="assetExtendedAttributeDetailed" action="edit" id="${a.id}">
                                            ${a.value.encodeAsHTML()}
                                        </g:link>
                                    </td>
                                
                                </tr>
                            </g:each>
                        
                            <tr class="prop">
                                <td valign="top" class="groupHeader">
                                    <label for="assetSubItems">Asset Tree</label>
                                </td>
                                <td valign="top" class="value">
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                </td>
                                <td valign="top" class="value">
                                    <g:render template="/shared/assetTree" />
                                </td>
                            </tr> 
                            
                            <tr class="prop">
                                <td valign="top" class="groupHeader">Maintenance Actions</td>
                                
                                <td  valign="top" style="text-align:left;" class="value">
                                </td>
                                
                            </tr>

                            
                            <g:each var="m" in="${assetInstance.maintenanceActions}">
                                <tr class="prop">
                                    <td valign="top" class="name"></td>
                                    
                                    <td  valign="top" style="text-align:left;" class="value">
                                        <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">
                                            ${m?.encodeAsHTML()}
                                        </g:link>
                                    </td>
                                    
                                </tr>
                            </g:each>
                        
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <input type="hidden" name="id" value="${assetInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
