Changeset 292
- Timestamp:
- Jan 23, 2010, 11:19:39 AM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetExtendedAttributeDetailedController.groovy
r178 r292 27 27 if(assetExtendedAttributeInstance) { 28 28 try { 29 assetExtendedAttributeInstance.delete( )29 assetExtendedAttributeInstance.delete(flush:true) 30 30 flash.message = "AssetExtendedAttribute ${params.id} deleted" 31 31 redirect(action:list) … … 77 77 else { 78 78 flash.message = "AssetExtendedAttribute not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } -
trunk/grails-app/views/assetExtendedAttributeDetailed/create.gsp
r178 r292 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Create AssetExtendedAttribute</title> 7 <title>Create AssetExtendedAttribute</title> 8 8 </head> 9 9 <body> … … 28 28 <tr class="prop"> 29 29 <td valign="top" class="name"> 30 <label for=" assetExtendedAttributeType">Asset Extended Attribute Type:</label>30 <label for="value">Value:</label> 31 31 </td> 32 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'assetExtendedAttributeType','errors')}"> 33 <g:select optionKey="id" from="${AssetExtendedAttributeType.list()}" name="assetExtendedAttributeType.id" value="${assetExtendedAttributeInstance?.assetExtendedAttributeType?.id}" ></g:select> 32 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'value','errors')}"> 33 <input type="text" maxlength="100" id="value" name="value" value="${fieldValue(bean:assetExtendedAttributeInstance,field:'value')}"/> 34 </td> 35 </tr> 36 37 <tr class="prop"> 38 <td valign="top" class="name"> 39 <label for="isActive">Is Active:</label> 40 </td> 41 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'isActive','errors')}"> 42 <g:checkBox name="isActive" value="${assetExtendedAttributeInstance?.isActive}" ></g:checkBox> 34 43 </td> 35 44 </tr> … … 46 55 <tr class="prop"> 47 56 <td valign="top" class="name"> 48 <label for=" isActive">Is Active:</label>57 <label for="extendedAttributeType">Extended Attribute Type:</label> 49 58 </td> 50 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'isActive','errors')}"> 51 <g:checkBox name="isActive" value="${assetExtendedAttributeInstance?.isActive}" ></g:checkBox> 52 </td> 53 </tr> 54 55 <tr class="prop"> 56 <td valign="top" class="name"> 57 <label for="value">Value:</label> 58 </td> 59 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'value','errors')}"> 60 <input type="text" id="value" name="value" value="${fieldValue(bean:assetExtendedAttributeInstance,field:'value')}"/> 59 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'extendedAttributeType','errors')}"> 60 <g:select optionKey="id" from="${ExtendedAttributeType.list()}" name="extendedAttributeType.id" value="${assetExtendedAttributeInstance?.extendedAttributeType?.id}" ></g:select> 61 61 </td> 62 62 </tr> -
trunk/grails-app/views/assetExtendedAttributeDetailed/edit.gsp
r178 r292 31 31 <tr class="prop"> 32 32 <td valign="top" class="name"> 33 <label for=" assetExtendedAttributeType">Asset Extended Attribute Type:</label>33 <label for="value">Value:</label> 34 34 </td> 35 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'assetExtendedAttributeType','errors')}"> 36 <g:select optionKey="id" from="${AssetExtendedAttributeType.list()}" name="assetExtendedAttributeType.id" value="${assetExtendedAttributeInstance?.assetExtendedAttributeType?.id}" ></g:select> 35 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'value','errors')}"> 36 <input type="text" maxlength="100" id="value" name="value" value="${fieldValue(bean:assetExtendedAttributeInstance,field:'value')}"/> 37 </td> 38 </tr> 39 40 <tr class="prop"> 41 <td valign="top" class="name"> 42 <label for="isActive">Is Active:</label> 43 </td> 44 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'isActive','errors')}"> 45 <g:checkBox name="isActive" value="${assetExtendedAttributeInstance?.isActive}" ></g:checkBox> 37 46 </td> 38 47 </tr> … … 49 58 <tr class="prop"> 50 59 <td valign="top" class="name"> 51 <label for=" isActive">Is Active:</label>60 <label for="extendedAttributeType">Extended Attribute Type:</label> 52 61 </td> 53 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'isActive','errors')}"> 54 <g:checkBox name="isActive" value="${assetExtendedAttributeInstance?.isActive}" ></g:checkBox> 55 </td> 56 </tr> 57 58 <tr class="prop"> 59 <td valign="top" class="name"> 60 <label for="value">Value:</label> 61 </td> 62 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'value','errors')}"> 63 <input type="text" id="value" name="value" value="${fieldValue(bean:assetExtendedAttributeInstance,field:'value')}"/> 62 <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'extendedAttributeType','errors')}"> 63 <g:select optionKey="id" from="${ExtendedAttributeType.list()}" name="extendedAttributeType.id" value="${assetExtendedAttributeInstance?.extendedAttributeType?.id}" ></g:select> 64 64 </td> 65 65 </tr> -
trunk/grails-app/views/assetExtendedAttributeDetailed/list.gsp
r178 r292 23 23 <g:sortableColumn property="id" title="Id" /> 24 24 25 <th>Asset Extended Attribute Type</th> 26 25 <g:sortableColumn property="value" title="Value" /> 26 27 <g:sortableColumn property="isActive" title="Is Active" /> 28 27 29 <th>Asset</th> 28 30 29 <g:sortableColumn property="isActive" title="Is Active" /> 30 31 <g:sortableColumn property="value" title="Value" /> 32 33 <th></th> 34 31 <th>Extended Attribute Type</th> 32 35 33 </tr> 36 34 </thead> 37 35 <tbody> 38 36 <g:each in="${assetExtendedAttributeInstanceList}" status="i" var="assetExtendedAttributeInstance"> 39 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/assetExtendedAttributeDetailed/show/${assetExtendedAttributeInstance.id}"'/> 40 37 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 41 38 42 39 <td><g:link action="show" id="${assetExtendedAttributeInstance.id}">${fieldValue(bean:assetExtendedAttributeInstance, field:'id')}</g:link></td> 43 40 44 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'assetExtendedAttributeType')}</td> 41 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'value')}</td> 42 43 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'isActive')}</td> 45 44 46 45 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'asset')}</td> 47 46 48 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'isActive')}</td> 49 50 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'value')}</td> 51 52 <td> 53 <g:link action="show" id="${assetExtendedAttributeInstance.id}"> 54 <img src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" /> 55 </g:link> 56 </td> 47 <td>${fieldValue(bean:assetExtendedAttributeInstance, field:'extendedAttributeType')}</td> 57 48 58 49 </tr> -
trunk/grails-app/views/assetExtendedAttributeDetailed/show.gsp
r178 r292 30 30 31 31 <tr class="prop"> 32 <td valign="top" class="name"> Asset Extended Attribute Type:</td>32 <td valign="top" class="name">Value:</td> 33 33 34 <td valign="top" class="value">${assetExtendedAttributeInstance?.assetExtendedAttributeType?.encodeAsHTML()}</td> 35 36 </tr> 37 38 <tr class="prop"> 39 <td valign="top" class="name">Asset:</td> 40 41 <td valign="top" class="value"><g:link controller="assetDetailed" action="show" id="${assetExtendedAttributeInstance?.asset?.id}">${assetExtendedAttributeInstance?.asset?.encodeAsHTML()}</g:link></td> 34 <td valign="top" class="value">${fieldValue(bean:assetExtendedAttributeInstance, field:'value')}</td> 42 35 43 36 </tr> … … 51 44 52 45 <tr class="prop"> 53 <td valign="top" class="name"> Value:</td>46 <td valign="top" class="name">Asset:</td> 54 47 55 <td valign="top" class="value">${fieldValue(bean:assetExtendedAttributeInstance, field:'value')}</td> 48 <td valign="top" class="value"><g:link controller="asset" action="show" id="${assetExtendedAttributeInstance?.asset?.id}">${assetExtendedAttributeInstance?.asset?.encodeAsHTML()}</g:link></td> 49 50 </tr> 51 52 <tr class="prop"> 53 <td valign="top" class="name">Extended Attribute Type:</td> 54 55 <td valign="top" class="value"><g:link controller="extendedAttributeType" action="show" id="${assetExtendedAttributeInstance?.extendedAttributeType?.id}">${assetExtendedAttributeInstance?.extendedAttributeType?.encodeAsHTML()}</g:link></td> 56 56 57 57 </tr>
Note: See TracChangeset
for help on using the changeset viewer.