Ignore:
Timestamp:
Oct 6, 2010, 12:45:13 AM (13 years ago)
Author:
gav
Message:

Change assetSubtItem show and edit views to display extendedAttributes the same as asset views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/assetSubItemDetailed/show.gsp

    r659 r683  
    6363                       
    6464                        <tr class="prop">
    65                             <td valign="top" class="groupHeader">
    66                                 <label for="name">Extended Attributes</label>
    67                             </td>
    68                             <td valign="top" class="value">
     65                            <td valign="top" class="groupHeader">Extended Attributes</td>
     66                            <td  valign="top" style="text-align:left;" class="value">
    6967                            </td>
    7068                        </tr>
    71                    
    72                         <g:each var="a" in="${assetSubItemInstance.assetSubItemExtendedAttributes}">
    73                         <tr class="prop">
    74                             <td valign="top" class="name"></td>
    75                             <td  valign="top" style="text-align:left;" class="value">
    76                                 <g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link>
    77                             </td>
    78                         </tr>
     69                       
     70                        <g:each var="a" in="${assetSubItemInstance.assetSubItemExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}">
     71                            <tr class="prop">
     72                                <td valign="top" class="groupName">
     73                                    ${a.extendedAttributeType.name.encodeAsHTML()}:
     74                                </td>
     75
     76                                <td  valign="top" style="text-align:left;" class="value">
     77                                    <g:link controller="assetSubItemExtendedAttributeDetailed" action="edit" id="${a.id}">
     78                                        ${a.value.encodeAsHTML()}
     79                                    </g:link>
     80                                </td>
     81
     82                            </tr>
    7983                        </g:each>
    8084                       
Note: See TracChangeset for help on using the changeset viewer.