Changeset 161
- Timestamp:
- Oct 22, 2009, 4:33:25 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetController.groovy
r118 r161 27 27 if(assetInstance) { 28 28 try { 29 assetInstance.delete( )29 assetInstance.delete(flush:true) 30 30 flash.message = "Asset ${params.id} deleted" 31 31 redirect(action:list) … … 77 77 else { 78 78 flash.message = "Asset not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } -
trunk/grails-app/controllers/AssetDetailedController.groovy
r156 r161 48 48 if(assetInstance) { 49 49 try { 50 assetInstance.delete( )50 assetInstance.delete(flush:true) 51 51 flash.message = "Asset ${params.id} deleted" 52 52 redirect(action:search) … … 103 103 else { 104 104 flash.message = "Asset not found with id ${params.id}" 105 redirect(action: edit,id:params.id)105 redirect(action:list) 106 106 } 107 107 } -
trunk/grails-app/domain/Asset.groovy
r131 r161 6 6 String name 7 7 String description = "" 8 String costCode = "" 8 9 boolean isActive = true 9 10 10 static hasMany = [maintenanceActions: MaintenanceAction, 11 static hasMany = [maintenanceActions: MaintenanceAction, 11 12 assetExtendedAttributes: AssetExtendedAttribute] 12 13 -
trunk/grails-app/views/asset/create.gsp
r151 r161 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="costCode">Cost Code:</label> 50 </td> 51 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> 52 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> 53 </td> 54 </tr> 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 49 58 <label for="description">Description:</label> 50 59 </td> -
trunk/grails-app/views/asset/edit.gsp
r151 r161 66 66 <tr class="prop"> 67 67 <td valign="top" class="name"> 68 <label for="costCode">Cost Code:</label> 69 </td> 70 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> 71 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> 72 </td> 73 </tr> 74 75 <tr class="prop"> 76 <td valign="top" class="name"> 68 77 <label for="description">Description:</label> 69 78 </td> -
trunk/grails-app/views/asset/list.gsp
r151 r161 28 28 <th>Asset Type</th> 29 29 30 <g:sortableColumn property="costCode" title="Cost Code" /> 31 30 32 <g:sortableColumn property="description" title="Description" /> 31 33 32 34 <g:sortableColumn property="isActive" title="Is Active" /> 33 35 34 <th>System Section</th>35 36 36 </tr> 37 37 </thead> … … 46 46 <td>${fieldValue(bean:assetInstance, field:'assetType')}</td> 47 47 48 <td>${fieldValue(bean:assetInstance, field:'costCode')}</td> 49 48 50 <td>${fieldValue(bean:assetInstance, field:'description')}</td> 49 51 50 52 <td>${fieldValue(bean:assetInstance, field:'isActive')}</td> 51 52 <td>${fieldValue(bean:assetInstance, field:'systemSection')}</td>53 53 54 54 </tr> -
trunk/grails-app/views/asset/show.gsp
r151 r161 58 58 59 59 <tr class="prop"> 60 <td valign="top" class="name">Cost Code:</td> 61 62 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'costCode')}</td> 63 64 </tr> 65 66 <tr class="prop"> 60 67 <td valign="top" class="name">Description:</td> 61 68 -
trunk/grails-app/views/assetDetailed/create.gsp
r139 r161 37 37 <tr class="prop"> 38 38 <td valign="top" class="name"> 39 <label for="description">Description:</label> 40 </td> 41 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> 42 <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> 43 </td> 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name"> 48 <label for="costCode">Cost Code:</label> 49 </td> 50 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> 51 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> 52 </td> 53 </tr> 54 55 <tr class="prop"> 56 <td valign="top" class="name"> 39 57 <label for="assetType">Asset Type:</label> 40 58 </td> … … 51 69 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> 52 70 </td> 53 </tr> 54 55 <tr class="prop"> 56 <td valign="top" class="name"> 57 <label for="description">Description:</label> 58 </td> 59 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> 60 <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> 61 </td> 62 </tr> 63 71 </tr> 72 64 73 <tr class="prop"> 65 74 <td valign="top" class="name"> -
trunk/grails-app/views/assetDetailed/edit.gsp
r139 r161 39 39 <tr class="prop"> 40 40 <td valign="top" class="name"> 41 <label for="description">Description:</label> 42 </td> 43 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> 44 <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> 45 </td> 46 </tr> 47 48 <tr class="prop"> 49 <td valign="top" class="name"> 50 <label for="costCode">Cost Code:</label> 51 </td> 52 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> 53 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> 54 </td> 55 </tr> 56 57 <tr class="prop"> 58 <td valign="top" class="name"> 41 59 <label for="assetType">Asset Type:</label> 42 60 </td> … … 52 70 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> 53 71 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> 54 </td>55 </tr>56 57 <tr class="prop">58 <td valign="top" class="name">59 <label for="description">Description:</label>60 </td>61 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}">62 <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/>63 72 </td> 64 73 </tr> -
trunk/grails-app/views/assetDetailed/show.gsp
r139 r161 36 36 37 37 <tr class="prop"> 38 <td valign="top" class="name">Description:</td> 39 40 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'description')}</td> 41 42 </tr> 43 44 <tr class="prop"> 45 <td valign="top" class="name">Cost Code:</td> 46 47 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'costCode')}</td> 48 49 </tr> 50 51 <tr class="prop"> 38 52 <td valign="top" class="name">Asset Type:</td> 39 53 … … 60 74 61 75 <td valign="top" class="value"><g:link controller="systemSectionDetailed" action="show" id="${assetInstance?.systemSection?.id}">${assetInstance?.systemSection?.encodeAsHTML()}</g:link></td> 62 63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">Description:</td>67 68 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'description')}</td>69 76 70 77 </tr>
Note: See TracChangeset
for help on using the changeset viewer.