Changeset 383
- Timestamp:
- Feb 18, 2010, 4:51:45 AM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 9 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r380 r383 247 247 [order:91, controller:'inventoryGroupDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 248 248 ] 249 ], 250 [order:100, controller:'manufacturerTypeDetailed', title:'manufacturerType', action:'list', 251 subItems: [ 252 [order:10, controller:'manufacturerTypeDetailed', title:'Manufacturer Type List', action:'list', isVisible: { true }], 253 [order:20, controller:'manufacturerTypeDetailed', title:'Create', action:'create', isVisible: { true }], 254 [order:90, controller:'manufacturerTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 255 [order:91, controller:'manufacturerTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 256 ] 257 ], 258 [order:110, controller:'supplierTypeDetailed', title:'supplierType', action:'list', 259 subItems: [ 260 [order:10, controller:'supplierTypeDetailed', title:'Supplier Type List', action:'list', isVisible: { true }], 261 [order:20, controller:'supplierTypeDetailed', title:'Create', action:'create', isVisible: { true }], 262 [order:90, controller:'supplierTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 263 [order:91, controller:'supplierTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 264 ] 249 265 ] 250 266 ] -
trunk/grails-app/controllers/ManufacturerTypeDetailedController.groovy
r361 r383 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class ManufacturerTypeController extends BaseAppAdminController { 4 3 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager']) 4 class ManufacturerTypeDetailedController extends BaseController { 5 6 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 5 7 def index = { redirect(action:list,params:params) } 6 8 … … 8 10 static allowedMethods = [delete:'POST', save:'POST', update:'POST'] 9 11 12 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 10 13 def list = { 11 14 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) … … 13 16 } 14 17 18 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 15 19 def show = { 20 21 // In the case of an actionSubmit button, rewrite action name from 'index'. 22 if(params._action_Show) 23 params.action='show' 24 16 25 def manufacturerTypeInstance = ManufacturerType.get( params.id ) 17 26 … … 43 52 44 53 def edit = { 54 55 // In the case of an actionSubmit button, rewrite action name from 'index'. 56 if(params._action_Edit) 57 params.action='edit' 58 45 59 def manufacturerTypeInstance = ManufacturerType.get( params.id ) 46 60 -
trunk/grails-app/controllers/SupplierTypeDetailedController.groovy
r361 r383 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class SupplierTypeController extends BaseAppAdminController { 4 3 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager']) 4 class SupplierTypeDetailedController extends BaseController { 5 6 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 5 7 def index = { redirect(action:list,params:params) } 6 8 … … 8 10 static allowedMethods = [delete:'POST', save:'POST', update:'POST'] 9 11 12 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 10 13 def list = { 11 14 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) … … 13 16 } 14 17 18 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 15 19 def show = { 20 21 // In the case of an actionSubmit button, rewrite action name from 'index'. 22 if(params._action_Show) 23 params.action='show' 24 16 25 def supplierTypeInstance = SupplierType.get( params.id ) 17 26 … … 43 52 44 53 def edit = { 54 55 // In the case of an actionSubmit button, rewrite action name from 'index'. 56 if(params._action_Edit) 57 params.action='edit' 58 45 59 def supplierTypeInstance = SupplierType.get( params.id ) 46 60 -
trunk/grails-app/views/manufacturerTypeDetailed/create.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Create ManufacturerType</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">ManufacturerType List</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>Create ManufacturerType</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> … … 25 25 <table> 26 26 <tbody> 27 28 <tr class="prop"> 29 <td valign="top" class="name"> 30 <label for="name">Name:</label> 31 </td> 32 <td valign="top" class="value ${hasErrors(bean:manufacturerTypeInstance,field:'name','errors')}"> 33 <input type="text" id="name" name="name" value="${fieldValue(bean:manufacturerTypeInstance,field:'name')}"/> 34 </td> 35 </tr> 27 36 28 37 <tr class="prop"> … … 44 53 </tr> 45 54 46 <tr class="prop">47 <td valign="top" class="name">48 <label for="name">Name:</label>49 </td>50 <td valign="top" class="value ${hasErrors(bean:manufacturerTypeInstance,field:'name','errors')}">51 <input type="text" id="name" name="name" value="${fieldValue(bean:manufacturerTypeInstance,field:'name')}"/>52 </td>53 </tr>54 55 55 </tbody> 56 56 </table> -
trunk/grails-app/views/manufacturerTypeDetailed/edit.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Edit ManufacturerType</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">ManufacturerType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New ManufacturerType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit ManufacturerType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 28 27 <table> 29 28 <tbody> 29 30 <tr class="prop"> 31 <td valign="top" class="name"> 32 <label for="name">Name:</label> 33 </td> 34 <td valign="top" class="value ${hasErrors(bean:manufacturerTypeInstance,field:'name','errors')}"> 35 <input type="text" id="name" name="name" value="${fieldValue(bean:manufacturerTypeInstance,field:'name')}"/> 36 </td> 37 </tr> 30 38 31 39 <tr class="prop"> … … 55 63 <ul> 56 64 <g:each var="m" in="${manufacturerTypeInstance?.manufacturers?}"> 57 <li><g:link controller="manufacturer " action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>65 <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 58 66 </g:each> 59 67 </ul> 60 <g:link controller="manufacturer " params="['manufacturerType.id':manufacturerTypeInstance?.id]" action="create">Add Manufacturer</g:link>68 <g:link controller="manufacturerDetailed" params="['manufacturerType.id':manufacturerTypeInstance?.id]" action="create">Add Manufacturer</g:link> 61 69 62 </td>63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="name">Name:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:manufacturerTypeInstance,field:'name','errors')}">70 <input type="text" id="name" name="name" value="${fieldValue(bean:manufacturerTypeInstance,field:'name')}"/>71 70 </td> 72 71 </tr> … … 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/manufacturerTypeDetailed/list.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>ManufacturerType 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 ManufacturerType</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>ManufacturerType 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 <g:sortableColumn property="description" title="Description" /> 26 27 <g:sortableColumn property="isActive" title="Is Active" /> 28 29 <g:sortableColumn property="name" title="Name" /> 23 <g:sortableColumn property="id" title="Id" /> 24 25 <g:sortableColumn property="name" title="Name" /> 26 27 <g:sortableColumn property="description" title="Description" /> 28 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="${manufacturerTypeInstanceList}" status="i" var="manufacturerTypeInstance"> 35 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 37 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/manufacturerTypeDetailed/show/${manufacturerTypeInstance.id}"'/> 38 39 <td>${fieldValue(bean:manufacturerTypeInstance, field:'id')}</td> 36 40 37 <td> <g:link action="show" id="${manufacturerTypeInstance.id}">${fieldValue(bean:manufacturerTypeInstance, field:'id')}</g:link></td>41 <td>${fieldValue(bean:manufacturerTypeInstance, field:'name')}</td> 38 42 39 43 <td>${fieldValue(bean:manufacturerTypeInstance, field:'description')}</td> 40 44 41 45 <td>${fieldValue(bean:manufacturerTypeInstance, field:'isActive')}</td> 42 43 <td>${fieldValue(bean:manufacturerTypeInstance, field:'name')}</td> 46 47 <td> 48 <g:link action="show" id="${manufacturerTypeInstance.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/manufacturerTypeDetailed/show.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Show ManufacturerType</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">ManufacturerType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New ManufacturerType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Show ManufacturerType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 26 25 27 26 <td valign="top" class="value">${fieldValue(bean:manufacturerTypeInstance, field:'id')}</td> 27 28 </tr> 29 30 </tr> 31 32 <tr class="prop"> 33 <td valign="top" class="name">Name:</td> 34 35 <td valign="top" class="value">${fieldValue(bean:manufacturerTypeInstance, field:'name')}</td> 28 36 29 37 </tr> … … 49 57 <ul> 50 58 <g:each var="m" in="${manufacturerTypeInstance.manufacturers}"> 51 <li><g:link controller="manufacturer " action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>59 <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 52 60 </g:each> 53 61 </ul> 54 62 </td> 55 56 </tr>57 58 <tr class="prop">59 <td valign="top" class="name">Name:</td>60 61 <td valign="top" class="value">${fieldValue(bean:manufacturerTypeInstance, field:'name')}</td>62 63 </tr>64 63 65 64 </tbody> -
trunk/grails-app/views/supplierTypeDetailed/create.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Create SupplierType</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">SupplierType List</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>Create SupplierType</h1>15 15 <g:if test="${flash.message}"> 16 16 <div class="message">${flash.message}</div> … … 25 25 <table> 26 26 <tbody> 27 28 <tr class="prop"> 29 <td valign="top" class="name"> 30 <label for="name">Name:</label> 31 </td> 32 <td valign="top" class="value ${hasErrors(bean:supplierTypeInstance,field:'name','errors')}"> 33 <input type="text" id="name" name="name" value="${fieldValue(bean:supplierTypeInstance,field:'name')}"/> 34 </td> 35 </tr> 27 36 28 37 <tr class="prop"> … … 44 53 </tr> 45 54 46 <tr class="prop">47 <td valign="top" class="name">48 <label for="name">Name:</label>49 </td>50 <td valign="top" class="value ${hasErrors(bean:supplierTypeInstance,field:'name','errors')}">51 <input type="text" id="name" name="name" value="${fieldValue(bean:supplierTypeInstance,field:'name')}"/>52 </td>53 </tr>54 55 55 </tbody> 56 56 </table> -
trunk/grails-app/views/supplierTypeDetailed/edit.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Edit SupplierType</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">SupplierType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New SupplierType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit SupplierType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 28 27 <table> 29 28 <tbody> 29 30 <tr class="prop"> 31 <td valign="top" class="name"> 32 <label for="name">Name:</label> 33 </td> 34 <td valign="top" class="value ${hasErrors(bean:supplierTypeInstance,field:'name','errors')}"> 35 <input type="text" id="name" name="name" value="${fieldValue(bean:supplierTypeInstance,field:'name')}"/> 36 </td> 37 </tr> 30 38 31 39 <tr class="prop"> … … 49 57 <tr class="prop"> 50 58 <td valign="top" class="name"> 51 <label for="name">Name:</label>52 </td>53 <td valign="top" class="value ${hasErrors(bean:supplierTypeInstance,field:'name','errors')}">54 <input type="text" id="name" name="name" value="${fieldValue(bean:supplierTypeInstance,field:'name')}"/>55 </td>56 </tr>57 58 <tr class="prop">59 <td valign="top" class="name">60 59 <label for="suppliers">Suppliers:</label> 61 60 </td> … … 64 63 <ul> 65 64 <g:each var="s" in="${supplierTypeInstance?.suppliers?}"> 66 <li><g:link controller="supplier " action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>65 <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 67 66 </g:each> 68 67 </ul> 69 <g:link controller="supplier " params="['supplierType.id':supplierTypeInstance?.id]" action="create">Add Supplier</g:link>68 <g:link controller="supplierDetailed" params="['supplierType.id':supplierTypeInstance?.id]" action="create">Add Supplier</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/supplierTypeDetailed/list.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>SupplierType 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 SupplierType</g:link></span>12 <nav:renderSubItems group="navAlt"/> 12 13 </div> 13 14 <div class="body"> 14 <h1>SupplierType 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 <g:sortableColumn property="description" title="Description" /> 26 27 <g:sortableColumn property="isActive" title="Is Active" /> 28 29 <g:sortableColumn property="name" title="Name" /> 23 <g:sortableColumn property="id" title="Id" /> 24 25 <g:sortableColumn property="name" title="Name" /> 26 27 <g:sortableColumn property="description" title="Description" /> 28 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="${supplierTypeInstanceList}" status="i" var="supplierTypeInstance"> 35 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 37 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/supplierTypeDetailed/show/${supplierTypeInstance.id}"'/> 38 39 <td>${fieldValue(bean:supplierTypeInstance, field:'id')}</td> 36 40 37 <td> <g:link action="show" id="${supplierTypeInstance.id}">${fieldValue(bean:supplierTypeInstance, field:'id')}</g:link></td>41 <td>${fieldValue(bean:supplierTypeInstance, field:'name')}</td> 38 42 39 43 <td>${fieldValue(bean:supplierTypeInstance, field:'description')}</td> 40 44 41 45 <td>${fieldValue(bean:supplierTypeInstance, field:'isActive')}</td> 42 43 <td>${fieldValue(bean:supplierTypeInstance, field:'name')}</td> 46 47 <td> 48 <g:link action="show" id="${supplierTypeInstance.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/supplierTypeDetailed/show.gsp
r178 r383 6 6 <meta name="layout" content="main" /> 7 7 <title>Show SupplierType</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">SupplierType List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New SupplierType</g:link></span> 12 <nav:renderSubItems group="navAlt"/> 13 13 </div> 14 14 <div class="body"> 15 <h1>Show SupplierType</h1>16 15 <g:if test="${flash.message}"> 17 16 <div class="message">${flash.message}</div> … … 26 25 27 26 <td valign="top" class="value">${fieldValue(bean:supplierTypeInstance, field:'id')}</td> 27 28 </tr> 29 30 <tr class="prop"> 31 <td valign="top" class="name">Name:</td> 32 33 <td valign="top" class="value">${fieldValue(bean:supplierTypeInstance, field:'name')}</td> 28 34 29 35 </tr> … … 44 50 45 51 <tr class="prop"> 46 <td valign="top" class="name">Name:</td>47 48 <td valign="top" class="value">${fieldValue(bean:supplierTypeInstance, field:'name')}</td>49 50 </tr>51 52 <tr class="prop">53 52 <td valign="top" class="name">Suppliers:</td> 54 53 … … 56 55 <ul> 57 56 <g:each var="s" in="${supplierTypeInstance.suppliers}"> 58 <li><g:link controller="supplier " action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>57 <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 59 58 </g:each> 60 59 </ul>
Note: See TracChangeset
for help on using the changeset viewer.