Changeset 422


Ignore:
Timestamp:
Mar 2, 2010, 4:34:12 PM (14 years ago)
Author:
gav
Message:

Add comment property to InventoryItem domain class and views.

Location:
trunk/grails-app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/InventoryItem.groovy

    r416 r422  
    88    String name
    99    String description = ""
     10    String comment = ""
    1011    String manufacturersPartNumber
    1112    BigDecimal estimatedUnitPriceAmount
     
    3536        picture(nullable:true)
    3637        name(unique:true, blank:false, maxSize:50)
    37         description()
     38        description(maxSize:255)
     39        comment(maxSize:500)
    3840        unitsInStock(min:0)
    3941        unitOfMeasure()
  • trunk/grails-app/views/inventoryItemDetailed/create.gsp

    r410 r422  
    3131                                    <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/>
    3232                                </td>
    33                             </tr> 
    34                        
     33                            </tr>
     34                           
    3535                            <tr class="prop">
    3636                                <td valign="top" class="name">
     
    3838                                </td>
    3939                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}">
    40                                     <input type="text" class="description" id="description" name="description" value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/>
     40                                    <textarea rows="5" cols="40" name="description">${fieldValue(bean:inventoryItemInstance, field:'description')}</textarea>
     41                                </td>
     42                            </tr>
     43                       
     44                            <tr class="prop">
     45                                <td valign="top" class="name">
     46                                    <label for="comment">Comment:</label>
     47                                </td>
     48                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'comment','errors')}">
     49                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemInstance, field:'comment')}</textarea>
    4150                                </td>
    4251                            </tr>
  • trunk/grails-app/views/inventoryItemDetailed/edit.gsp

    r410 r422  
    5757                                    <label for="description">Description:</label>
    5858                                </td>
    59                                 <td valign="top">
    60                                     <input class="description ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"
    61                                                 type="text" id="description" name="description"
    62                                                 value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/>
     59                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}">
     60                                    <textarea rows="5" cols="40" name="description">${fieldValue(bean:inventoryItemInstance, field:'description')}</textarea>
     61                                </td>
     62                            </tr>
     63
     64                            <tr class="prop">
     65                                <td valign="top" class="name">
     66                                    <label for="comment">Comment:</label>
     67                                </td>
     68                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'comment','errors')}">
     69                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemInstance, field:'comment')}</textarea>
    6370                                </td>
    6471                            </tr>
  • trunk/grails-app/views/inventoryItemDetailed/show.gsp

    r405 r422  
    2828            </g:hasErrors>
    2929
     30            <div class="tabHeader">
     31                <h1 class="taskHeader">
     32                    ${inventoryItemInstance.name}
     33                </h1>
     34                ${fieldValue(bean:inventoryItemInstance, field:'description')}
     35            </div>
     36
     37            <br/>
     38
    3039            <richui:tabView id="tabView">
    3140
     
    105114
    106115                                    <tr class="prop">
    107                                         <td valign="top" class="name">Name:</td>
    108 
    109                                         <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'name')}</td>
    110                                     </tr>
    111 
    112                                     <tr class="prop">
    113                                         <td valign="top" class="name">Description:</td>
    114 
    115                                         <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'description')}</td>
     116                                        <td valign="top" class="name">Comment:</td>
     117
     118                                        <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'comment')}</td>
    116119                                    </tr>
    117120
Note: See TracChangeset for help on using the changeset viewer.