- Timestamp:
- May 31, 2010, 9:39:19 PM (14 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 edited
- 4 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r556 r559 365 365 [order:91, controller:'taskGroupDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 366 366 ] 367 ], 368 [order:210, controller:'unitOfMeasureDetailed', title:'unitOfMeasure', action:'list', 369 subItems: [ 370 [order:10, controller:'unitOfMeasureDetailed', title:'Unit Of Measure List', action:'list', isVisible: { true }], 371 [order:20, controller:'unitOfMeasureDetailed', title:'Create', action:'create', isVisible: { true }], 372 [order:90, controller:'unitOfMeasureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 373 [order:91, controller:'unitOfMeasureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 374 ] 367 375 ] 368 376 ] -
trunk/grails-app/controllers/UnitOfMeasureDetailedController.groovy
r556 r559 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class UnitOfMeasureController extends BaseAppAdminController { 3 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager']) 4 class UnitOfMeasureDetailedController extends BaseController { 4 5 5 6 def index = { redirect(action:list,params:params) } … … 14 15 15 16 def show = { 17 18 // In the case of an actionSubmit button, rewrite action name from 'index'. 19 if(params._action_Show) 20 params.action='show' 21 16 22 def unitOfMeasureInstance = UnitOfMeasure.get( params.id ) 17 23 … … 43 49 44 50 def edit = { 51 52 // In the case of an actionSubmit button, rewrite action name from 'index'. 53 if(params._action_Edit) 54 params.action='edit' 55 45 56 def unitOfMeasureInstance = UnitOfMeasure.get( params.id ) 46 57 -
trunk/grails-app/views/unitOfMeasureDetailed/create.gsp
r557 r559 6 6 <meta name="layout" content="main" /> 7 7 <title>Create UnitOfMeasure</title> 8 <nav:resources override="true"/> 8 9 </head> 9 10 <body> 10 11 <div class="nav"> 11 < span class="menuButton"><g:link class="list" action="list">UnitOfMeasure List</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>Create UnitOfMeasure</h1>15 15 <g:render template="/shared/messages" /> 16 16 <g:hasErrors bean="${unitOfMeasureInstance}"> -
trunk/grails-app/views/unitOfMeasureDetailed/edit.gsp
r557 r559 6 6 <meta name="layout" content="main" /> 7 7 <title>Edit UnitOfMeasure</title> 8 <nav:resources override="true"/> 8 9 </head> 9 10 <body> 10 11 <div class="nav"> 11 <span class="menuButton"><g:link class="list" action="list">UnitOfMeasure List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New UnitOfMeasure</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit UnitOfMeasure</h1>16 15 <g:render template="/shared/messages" /> 17 16 <g:hasErrors bean="${unitOfMeasureInstance}"> … … 47 46 <tr class="prop"> 48 47 <td valign="top" class="name"> 49 <label for="inventoryItems">Inventory Items:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:unitOfMeasureInstance,field:'inventoryItems','errors')}">52 53 <ul>54 <g:each var="i" in="${unitOfMeasureInstance?.inventoryItems?}">55 <li><g:link controller="inventoryItem" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>56 </g:each>57 </ul>58 <g:link controller="inventoryItem" params="['unitOfMeasure.id':unitOfMeasureInstance?.id]" action="create">+Add InventoryItem</g:link>59 60 </td>61 </tr>62 63 <tr class="prop">64 <td valign="top" class="name">65 48 <label for="isActive">Is Active:</label> 66 49 </td> -
trunk/grails-app/views/unitOfMeasureDetailed/list.gsp
r557 r559 6 6 <meta name="layout" content="main" /> 7 7 <title>UnitOfMeasure List</title> 8 <nav:resources override="true"/> 8 9 </head> 9 10 <body> 10 11 <div class="nav"> 11 < span class="menuButton"><g:link class="create" action="create">New UnitOfMeasure</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>UnitOfMeasure List</h1>15 15 <g:render template="/shared/messages" /> 16 16 <div class="list"> … … 26 26 27 27 <g:sortableColumn property="isActive" title="Is Active" /> 28 29 <th></th> 28 30 29 31 </tr> … … 31 33 <tbody> 32 34 <g:each in="${unitOfMeasureInstanceList}" status="i" var="unitOfMeasureInstance"> 33 <tr class="${(i % 2) == 0 ? ' odd' : 'even'}">35 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> 34 36 35 <td><g:link action="show" id="${unitOfMeasureInstance.id}">${fieldValue(bean:unitOfMeasureInstance, field:'id')}</g:link></td> 37 <td onclick='window.location = "${request.getContextPath()}/unitOfMeasureDetailed/show/${unitOfMeasureInstance.id}"'> 38 ${fieldValue(bean:unitOfMeasureInstance, field:'id')} 39 </td> 36 40 37 <td>${fieldValue(bean:unitOfMeasureInstance, field:'name')}</td> 41 <td onclick='window.location = "${request.getContextPath()}/unitOfMeasureDetailed/show/${unitOfMeasureInstance.id}"'> 42 ${fieldValue(bean:unitOfMeasureInstance, field:'name')} 43 </td> 38 44 39 <td>${fieldValue(bean:unitOfMeasureInstance, field:'description')}</td> 45 <td onclick='window.location = "${request.getContextPath()}/unitOfMeasureDetailed/show/${unitOfMeasureInstance.id}"'> 46 ${fieldValue(bean:unitOfMeasureInstance, field:'description')} 47 </td> 40 48 41 <td>${fieldValue(bean:unitOfMeasureInstance, field:'isActive')}</td> 49 <td onclick='window.location = "${request.getContextPath()}/unitOfMeasureDetailed/show/${unitOfMeasureInstance.id}"'> 50 ${fieldValue(bean:unitOfMeasureInstance, field:'isActive')} 51 </td> 52 53 <td class="notClickable"> 54 <g:link action="show" id="${unitOfMeasureInstance.id}"> 55 <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> 56 </g:link> 57 </td> 42 58 43 59 </tr> -
trunk/grails-app/views/unitOfMeasureDetailed/show.gsp
r557 r559 6 6 <meta name="layout" content="main" /> 7 7 <title>Show UnitOfMeasure</title> 8 <nav:resources override="true"/> 8 9 </head> 9 10 <body> 10 11 <div class="nav"> 11 <span class="menuButton"><g:link class="list" action="list">UnitOfMeasure List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New UnitOfMeasure</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Show UnitOfMeasure</h1>16 15 <g:render template="/shared/messages" /> 17 16 <div class="dialog"> … … 42 41 43 42 <tr class="prop"> 44 <td valign="top" class="name">Inventory Items:</td>45 46 <td valign="top" style="text-align:left;" class="value">47 <ul>48 <g:each var="i" in="${unitOfMeasureInstance.inventoryItems}">49 <li><g:link controller="inventoryItem" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>50 </g:each>51 </ul>52 </td>53 54 </tr>55 56 <tr class="prop">57 43 <td valign="top" class="name">Is Active:</td> 58 44
Note: See TracChangeset
for help on using the changeset viewer.