Ignore:
Timestamp:
Jul 19, 2010, 8:47:38 AM (14 years ago)
Author:
gav
Message:

Domain change: Add PurchasingGroup?.
Logic and views to suite.

Location:
trunk/grails-app/views/costCodeDetailed
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/costCodeDetailed/create.gsp

    r441 r633  
    3535                            <tr class="prop">
    3636                                <td valign="top" class="name">
     37                                    <label for="purchasingGroup">Purchasing Group:</label>
     38                                </td>
     39                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'purchasingGroup','errors')}">
     40                                    <g:select optionKey="id"
     41                                                    from="${PurchasingGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
     42                                                    name="purchasingGroup.id"
     43                                                    value="${costCodeInstance?.purchasingGroup?.id}" >
     44                                    </g:select>
     45                                    <p>
     46                                        <g:link controller="purchasingGroupDetailed" action="create">+Add Group</g:link>
     47                                    </p>
     48                                </td>
     49                            </tr>
     50                       
     51                            <tr class="prop">
     52                                <td valign="top" class="name">
    3753                                    <label for="description">Description:</label>
    3854                                </td>
  • trunk/grails-app/views/costCodeDetailed/edit.gsp

    r441 r633  
    3737                            <tr class="prop">
    3838                                <td valign="top" class="name">
     39                                    <label for="purchasingGroup">Purchasing Group:</label>
     40                                </td>
     41                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'purchasingGroup','errors')}">
     42                                    <g:select optionKey="id"
     43                                                    from="${PurchasingGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
     44                                                    name="purchasingGroup.id"
     45                                                    value="${costCodeInstance?.purchasingGroup?.id}" >
     46                                    </g:select>
     47                                    <p>
     48                                        <g:link controller="purchasingGroupDetailed" action="create">+Add Group</g:link>
     49                                    </p>
     50                                </td>
     51                            </tr>
     52                       
     53                            <tr class="prop">
     54                                <td valign="top" class="name">
    3955                                    <label for="description">Description:</label>
    4056                                </td>
  • trunk/grails-app/views/costCodeDetailed/list.gsp

    r498 r633  
    2323                                <g:sortableColumn property="name" title="Name" />
    2424                       
     25                            <g:sortableColumn property="purchasingGroup" title="Group" />
     26                       
    2527                                <g:sortableColumn property="description" title="Description" />
    2628                       
     
    4143                            <td onclick='window.location = "${request.getContextPath()}/costCodeDetailed/show/${costCodeInstance.id}"'>
    4244                                ${fieldValue(bean:costCodeInstance, field:'name')}
     45                            </td>
     46                       
     47                            <td onclick='window.location = "${request.getContextPath()}/costCodeDetailed/show/${costCodeInstance.id}"'>
     48                                ${fieldValue(bean:costCodeInstance, field:'purchasingGroup')}
    4349                            </td>
    4450                       
  • trunk/grails-app/views/costCodeDetailed/show.gsp

    r441 r633  
    3434                   
    3535                        <tr class="prop">
     36                            <td valign="top" class="name">Purchasing Group:</td>
     37                            <td valign="top" class="value">
     38                                <g:link controller="purchasingGroupDetailed" action="show" id="${costCodeInstance?.purchasingGroup?.id}">
     39                                    ${costCodeInstance?.purchasingGroup?.encodeAsHTML()}
     40                                </g:link>
     41                            </td>
     42                        </tr>
     43                   
     44                        <tr class="prop">
    3645                            <td valign="top" class="name">Description:</td>
    3746                           
     
    4453                           
    4554                            <td valign="top" class="value">${fieldValue(bean:costCodeInstance, field:'isActive')}</td>
    46                            
    47                         </tr>
    48                    
    49                         <tr class="prop">
    50                             <td valign="top" class="name">Inventory Item Purchases:</td>
    51                            
    52                             <td  valign="top" style="text-align:left;" class="value">
    53                                 <ul>
    54                                 <g:each var="i" in="${costCodeInstance.inventoryItemPurchases}">
    55                                     <li><g:link controller="inventoryItemPurchaseDetailed" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
    56                                 </g:each>
    57                                 </ul>
    58                             </td>
    5955                           
    6056                        </tr>
Note: See TracChangeset for help on using the changeset viewer.