Changeset 163 for trunk/grails-app
- Timestamp:
- Oct 22, 2009, 8:41:21 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SiteController.groovy
r116 r163 27 27 if(siteInstance) { 28 28 try { 29 siteInstance.delete( )29 siteInstance.delete(flush:true) 30 30 flash.message = "Site ${params.id} deleted" 31 31 redirect(action:list) … … 77 77 else { 78 78 flash.message = "Site not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } -
trunk/grails-app/domain/Site.groovy
r121 r163 3 3 String name 4 4 String description = "" 5 String costCode = "" 5 6 Boolean isActive = true 6 7 -
trunk/grails-app/views/site/create.gsp
r151 r163 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:siteInstance,field:'costCode','errors')}"> 52 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:siteInstance,field:'costCode')}"/> 53 </td> 54 </tr> 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 49 58 <label for="isActive">Is Active:</label> 50 59 </td> -
trunk/grails-app/views/site/edit.gsp
r151 r163 45 45 <td valign="top" class="value ${hasErrors(bean:siteInstance,field:'description','errors')}"> 46 46 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:siteInstance,field:'description')}"/> 47 </td> 48 </tr> 49 50 <tr class="prop"> 51 <td valign="top" class="name"> 52 <label for="costCode">Cost Code:</label> 53 </td> 54 <td valign="top" class="value ${hasErrors(bean:siteInstance,field:'costCode','errors')}"> 55 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:siteInstance,field:'costCode')}"/> 47 56 </td> 48 57 </tr> -
trunk/grails-app/views/site/list.gsp
r151 r163 28 28 <g:sortableColumn property="description" title="Description" /> 29 29 30 <g:sortableColumn property="costCode" title="Cost Code" /> 31 30 32 <g:sortableColumn property="isActive" title="Is Active" /> 31 33 … … 42 44 <td>${fieldValue(bean:siteInstance, field:'description')}</td> 43 45 46 <td>${fieldValue(bean:siteInstance, field:'costCode')}</td> 47 44 48 <td>${fieldValue(bean:siteInstance, field:'isActive')}</td> 45 49 -
trunk/grails-app/views/site/show.gsp
r151 r163 41 41 42 42 <td valign="top" class="value">${fieldValue(bean:siteInstance, field:'description')}</td> 43 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name">Cost Code:</td> 48 49 <td valign="top" class="value">${fieldValue(bean:siteInstance, field:'costCode')}</td> 43 50 44 51 </tr>
Note: See TracChangeset
for help on using the changeset viewer.