Changeset 471
- Timestamp:
- Mar 31, 2010, 12:32:04 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 10 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r458 r471 331 331 [order:91, controller:'costCodeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 332 332 ] 333 ], 334 [order:180, controller:'personGroupDetailed', title:'personGroup', action:'list', 335 subItems: [ 336 [order:10, controller:'personGroupDetailed', title:'Person Group List', action:'list', isVisible: { true }], 337 [order:20, controller:'personGroupDetailed', title:'Create', action:'create', isVisible: { true }], 338 [order:90, controller:'personGroupDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 339 [order:91, controller:'personGroupDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 340 ] 341 ], 342 [order:190, controller:'personGroupTypeDetailed', title:'personGroupType', action:'list', 343 subItems: [ 344 [order:10, controller:'personGroupTypeDetailed', title:'Person Group Type List', action:'list', isVisible: { true }], 345 [order:20, controller:'personGroupTypeDetailed', title:'Create', action:'create', isVisible: { true }], 346 [order:90, controller:'personGroupTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 347 [order:91, controller:'personGroupTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 348 ] 333 349 ] 334 350 ] -
trunk/grails-app/controllers/PersonGroupDetailedController.groovy
r469 r471 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class PersonGroupController extends BaseAppAdminController { 3 @Secured(['ROLE_AppAdmin', 'ROLE_Manager']) 4 class PersonGroupDetailedController extends BaseController { 4 5 5 6 def index = { redirect(action:list,params:params) } -
trunk/grails-app/controllers/PersonGroupTypeDetailedController.groovy
r469 r471 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class PersonGroupTypeController extends BaseAppAdminController { 3 @Secured(['ROLE_AppAdmin', 'ROLE_Manager']) 4 class PersonGroupTypeDetailedController extends BaseController { 4 5 5 6 def index = { redirect(action:list,params:params) } -
trunk/grails-app/views/person/edit.gsp
r402 r471 138 138 <g:helpBalloon class="helpballoon" code="person.personGroups" /> 139 139 <custom:checkBoxList name="personGroups" 140 from="${PersonGroup. list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"140 from="${PersonGroup.findAllByIsActive(true)}" 141 141 value="${person?.personGroups?.collect{it.id}}" 142 optionKey="id"/> 142 optionKey="id" 143 sortBy="name" 144 linkController="personGroupDetailed" 145 linkAction="show"/> 143 146 </td> 144 147 </tr> -
trunk/grails-app/views/personGroupDetailed/create.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Create PersonGroup</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">PersonGroup List</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>Create PersonGroup</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> -
trunk/grails-app/views/personGroupDetailed/edit.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Edit PersonGroup</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">PersonGroup List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New PersonGroup</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit PersonGroup</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 65 64 </tr> 66 65 67 <tr class="prop">68 <td valign="top" class="name">69 <label for="persons">Persons:</label>70 </td>71 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'persons','errors')}">72 73 </td>74 </tr>75 76 66 </tbody> 77 67 </table> … … 79 69 <div class="buttons"> 80 70 <span class="button"><g:actionSubmit class="save" value="Update" /></span> 71 <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> 81 72 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 82 73 </div> -
trunk/grails-app/views/personGroupDetailed/list.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>PersonGroup 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 PersonGroup</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>PersonGroup List</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> … … 21 21 <tr> 22 22 23 <g:sortableColumn property="id" title="Id" />24 25 23 <g:sortableColumn property="name" title="Name" /> 26 24 … … 29 27 <g:sortableColumn property="isActive" title="Is Active" /> 30 28 31 <th>Person Group Type</th> 29 <g:sortableColumn property="personGroupType" title="Group Type" /> 30 31 <th></th> 32 32 33 33 </tr> … … 35 35 <tbody> 36 36 <g:each in="${personGroupInstanceList}" status="i" var="personGroupInstance"> 37 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 38 39 <td><g:link action="show" id="${personGroupInstance.id}">${fieldValue(bean:personGroupInstance, field:'id')}</g:link></td> 37 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/personGroupDetailed/show/${personGroupInstance.id}"'/> 40 38 41 39 <td>${fieldValue(bean:personGroupInstance, field:'name')}</td> … … 46 44 47 45 <td>${fieldValue(bean:personGroupInstance, field:'personGroupType')}</td> 46 47 <td> 48 <g:link action="show" id="${personGroupInstance.id}"> 49 <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> 50 </g:link> 51 </td> 48 52 49 53 </tr> -
trunk/grails-app/views/personGroupDetailed/show.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Show PersonGroup</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">PersonGroup List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New PersonGroup</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Show PersonGroup</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 53 52 <td valign="top" class="name">Person Group Type:</td> 54 53 55 <td valign="top" class="value"><g:link controller="personGroupType " action="show" id="${personGroupInstance?.personGroupType?.id}">${personGroupInstance?.personGroupType?.encodeAsHTML()}</g:link></td>54 <td valign="top" class="value"><g:link controller="personGroupTypeDetailed" action="show" id="${personGroupInstance?.personGroupType?.id}">${personGroupInstance?.personGroupType?.encodeAsHTML()}</g:link></td> 56 55 57 56 </tr> -
trunk/grails-app/views/personGroupTypeDetailed/create.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Create PersonGroupType</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">PersonGroupType List</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>Create PersonGroupType</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> -
trunk/grails-app/views/personGroupTypeDetailed/edit.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Edit PersonGroupType</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">PersonGroupType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New PersonGroupType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit PersonGroupType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 64 63 <ul> 65 64 <g:each var="p" in="${personGroupTypeInstance?.personGroups?}"> 66 <li><g:link controller="personGroup " action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li>65 <li><g:link controller="personGroupDetailed" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> 67 66 </g:each> 68 67 </ul> 69 <g:link controller="personGroup " params="['personGroupType.id':personGroupTypeInstance?.id]" action="create">Add PersonGroup</g:link>68 <g:link controller="personGroupDetailed" params="['personGroupType.id':personGroupTypeInstance?.id]" action="create">+Add PersonGroup</g:link> 70 69 71 70 </td> … … 77 76 <div class="buttons"> 78 77 <span class="button"><g:actionSubmit class="save" value="Update" /></span> 78 <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> 79 79 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 80 80 </div> -
trunk/grails-app/views/personGroupTypeDetailed/list.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>PersonGroupType 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 PersonGroupType</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>PersonGroupType List</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> … … 28 28 29 29 <g:sortableColumn property="isActive" title="Is Active" /> 30 31 <th></th> 30 32 31 33 </tr> … … 33 35 <tbody> 34 36 <g:each in="${personGroupTypeInstanceList}" status="i" var="personGroupTypeInstance"> 35 <tr class="${(i % 2) == 0 ? ' odd' : 'even'}">37 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/personGroupTypeDetailed/show/${personGroupTypeInstance.id}"'/> 36 38 37 <td> <g:link action="show" id="${personGroupTypeInstance.id}">${fieldValue(bean:personGroupTypeInstance, field:'id')}</g:link></td>39 <td>${fieldValue(bean:personGroupTypeInstance, field:'id')}</td> 38 40 39 41 <td>${fieldValue(bean:personGroupTypeInstance, field:'name')}</td> … … 42 44 43 45 <td>${fieldValue(bean:personGroupTypeInstance, field:'isActive')}</td> 46 47 <td> 48 <g:link action="show" id="${personGroupTypeInstance.id}"> 49 <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> 50 </g:link> 51 </td> 44 52 45 53 </tr> -
trunk/grails-app/views/personGroupTypeDetailed/show.gsp
r178 r471 6 6 <meta name="layout" content="main" /> 7 7 <title>Show PersonGroupType</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">PersonGroupType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New PersonGroupType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Show PersonGroupType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 56 55 <ul> 57 56 <g:each var="p" in="${personGroupTypeInstance.personGroups}"> 58 <li><g:link controller="personGroup " action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li>57 <li><g:link controller="personGroupDetailed" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> 59 58 </g:each> 60 59 </ul>
Note: See TracChangeset
for help on using the changeset viewer.