Changeset 385 for trunk


Ignore:
Timestamp:
Feb 18, 2010, 5:10:12 AM (15 years ago)
Author:
gav
Message:

Add entries to alt menu for Site and Section views.

Location:
trunk/grails-app
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/Config.groovy

    r383 r385  
    263263            [order:91, controller:'supplierTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
    264264        ]
     265    ],
     266    [order:110, controller:'siteDetailed', title:'site', action:'list',
     267        subItems: [
     268            [order:10, controller:'siteDetailed', title:'Site List', action:'list', isVisible: { true }],
     269            [order:20, controller:'siteDetailed', title:'Create', action:'create', isVisible: { true }],
     270            [order:90, controller:'siteDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }],
     271            [order:91, controller:'siteDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
     272        ]
     273    ],
     274    [order:110, controller:'sectionDetailed', title:'section', action:'list',
     275        subItems: [
     276            [order:10, controller:'sectionDetailed', title:'Section List', action:'list', isVisible: { true }],
     277            [order:20, controller:'sectionDetailed', title:'Create', action:'create', isVisible: { true }],
     278            [order:90, controller:'sectionDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }],
     279            [order:91, controller:'sectionDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
     280        ]
    265281    ]
    266282]
  • trunk/grails-app/controllers/SectionDetailedController.groovy

    r358 r385  
    2020    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    2121    def show = {
     22
     23        // In the case of an actionSubmit button, rewrite action name from 'index'.
     24        if(params._action_Show)
     25            params.action='show'
     26
    2227        def sectionInstance = Section.get( params.id )
    2328
     
    5055
    5156    def edit = {
     57
     58        // In the case of an actionSubmit button, rewrite action name from 'index'.
     59        if(params._action_Edit)
     60            params.action='edit'
     61
    5262        def sectionInstance = Section.get( params.id )
    5363
  • trunk/grails-app/controllers/SiteDetailedController.groovy

    r360 r385  
    2020    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    2121    def show = {
     22
     23        // In the case of an actionSubmit button, rewrite action name from 'index'.
     24        if(params._action_Show)
     25            params.action='show'
     26
    2227        def siteInstance = Site.get( params.id )
    2328
     
    5055
    5156    def edit = {
     57
     58        // In the case of an actionSubmit button, rewrite action name from 'index'.
     59        if(params._action_Edit)
     60            params.action='edit'
     61
    5262        def siteInstance = Site.get( params.id )
    5363
  • trunk/grails-app/views/sectionDetailed/create.gsp

    r355 r385  
    66        <meta name="layout" content="main" />
    77        <title>Create Section</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Section List</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>Create Section</h1>
    1515            <g:render template="/shared/messages" />
    1616            <g:hasErrors bean="${sectionInstance}">
     
    7878                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'site','errors')}">
    7979                                    <g:select optionKey="id" from="${Site.list()}" name="site.id" value="${sectionInstance?.site?.id}" ></g:select>
     80                                    <p>
     81                                        <g:link controller="siteDetailed" action="create">Add Site</g:link>
     82                                    </p>
    8083                                </td>
    8184                            </tr>
  • trunk/grails-app/views/sectionDetailed/edit.gsp

    r355 r385  
    66        <meta name="layout" content="main" />
    77        <title>Edit Section</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Section List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New Section</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Edit Section</h1>
    1615            <g:render template="/shared/messages" />
    1716            <g:hasErrors bean="${sectionInstance}">
     
    137136                <div class="buttons">
    138137                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     138                    <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span>
    139139                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    140140                </div>
  • trunk/grails-app/views/sectionDetailed/list.gsp

    r355 r385  
    66        <meta name="layout" content="main" />
    77        <title>Section List</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="create" action="create">New Section</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>Section List</h1>
    1515            <g:render template="/shared/messages" />
    1616            <div class="list">
  • trunk/grails-app/views/sectionDetailed/show.gsp

    r355 r385  
    66        <meta name="layout" content="main" />
    77        <title>Show Section</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Section List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New Section</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Show Section</h1>
    1615            <g:render template="/shared/messages" />
    1716            <div class="dialog">
  • trunk/grails-app/views/siteDetailed/create.gsp

    r357 r385  
    66        <meta name="layout" content="main" />
    77        <title>Create Site</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Site List</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>Create Site</h1>
    1515            <g:render template="/shared/messages" />
    1616            <g:hasErrors bean="${siteInstance}">
  • trunk/grails-app/views/siteDetailed/edit.gsp

    r357 r385  
    66        <meta name="layout" content="main" />
    77        <title>Edit Site</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Site List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New Site</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Edit Site</h1>
    1615            <g:render template="/shared/messages" />
    1716            <g:hasErrors bean="${siteInstance}">
     
    116115                <div class="buttons">
    117116                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     117                    <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span>
    118118                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    119119                </div>
  • trunk/grails-app/views/siteDetailed/list.gsp

    r357 r385  
    66        <meta name="layout" content="main" />
    77        <title>Site List</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="create" action="create">New Site</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>Site List</h1>
    1515            <g:render template="/shared/messages" />
    1616            <div class="list">
  • trunk/grails-app/views/siteDetailed/show.gsp

    r357 r385  
    66        <meta name="layout" content="main" />
    77        <title>Show Site</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">Site List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New Site</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Show Site</h1>
    1615            <g:render template="/shared/messages" />
    1716            <div class="dialog">
Note: See TracChangeset for help on using the changeset viewer.