Changeset 386


Ignore:
Timestamp:
Feb 18, 2010, 7:27:55 PM (14 years ago)
Author:
gav
Message:

Add alt menu and detailing to ExtendedAttributeType controller and views.

Location:
trunk/grails-app
Files:
6 edited

Legend:

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

    r385 r386  
    264264        ]
    265265    ],
    266     [order:110, controller:'siteDetailed', title:'site', action:'list',
     266    [order:120, controller:'siteDetailed', title:'site', action:'list',
    267267        subItems: [
    268268            [order:10, controller:'siteDetailed', title:'Site List', action:'list', isVisible: { true }],
     
    272272        ]
    273273    ],
    274     [order:110, controller:'sectionDetailed', title:'section', action:'list',
     274    [order:130, controller:'sectionDetailed', title:'section', action:'list',
    275275        subItems: [
    276276            [order:10, controller:'sectionDetailed', title:'Section List', action:'list', isVisible: { true }],
     
    279279            [order:91, controller:'sectionDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
    280280        ]
     281    ],
     282    [order:140, controller:'extendedAttributeTypeDetailed', title:'extendedAttribute', action:'list',
     283        subItems: [
     284            [order:10, controller:'extendedAttributeTypeDetailed', title:'Attribute Type List', action:'list', isVisible: { true }],
     285            [order:20, controller:'extendedAttributeTypeDetailed', title:'Create', action:'create', isVisible: { true }],
     286            [order:90, controller:'extendedAttributeTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }],
     287            [order:91, controller:'extendedAttributeTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }]
     288        ]
    281289    ]
    282290]
  • trunk/grails-app/controllers/ExtendedAttributeTypeDetailedController.groovy

    r288 r386  
    1515
    1616    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
    1722        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
    1823
     
    4449
    4550    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
    4656        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
    4757
  • trunk/grails-app/views/extendedAttributeTypeDetailed/create.gsp

    r268 r386  
    66        <meta name="layout" content="main" />
    77        <title>Create ExtendedAttributeType</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">ExtendedAttributeType List</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>Create ExtendedAttributeType</h1>
    1515            <g:if test="${flash.message}">
    1616            <div class="message">${flash.message}</div>
  • trunk/grails-app/views/extendedAttributeTypeDetailed/edit.gsp

    r268 r386  
    66        <meta name="layout" content="main" />
    77        <title>Edit ExtendedAttributeType</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">ExtendedAttributeType List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New ExtendedAttributeType</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Edit ExtendedAttributeType</h1>
    1615            <g:if test="${flash.message}">
    1716            <div class="message">${flash.message}</div>
     
    6160                <div class="buttons">
    6261                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     62                    <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span>
    6363                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    6464                </div>
  • trunk/grails-app/views/extendedAttributeTypeDetailed/list.gsp

    r268 r386  
    66        <meta name="layout" content="main" />
    77        <title>ExtendedAttributeType 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 ExtendedAttributeType</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1213        </div>
    1314        <div class="body">
    14             <h1>ExtendedAttributeType List</h1>
    1515            <g:if test="${flash.message}">
    1616            <div class="message">${flash.message}</div>
     
    2121                        <tr>
    2222                       
    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" />
     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>
    3032                       
    3133                        </tr>
     
    3335                    <tbody>
    3436                    <g:each in="${extendedAttributeTypeInstanceList}" status="i" var="extendedAttributeTypeInstance">
    35                         <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
     37                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/extendedAttributeTypeDetailed/show/${extendedAttributeTypeInstance.id}"'/>
    3638                       
    37                             <td><g:link action="show" id="${extendedAttributeTypeInstance.id}">${fieldValue(bean:extendedAttributeTypeInstance, field:'id')}</g:link></td>
     39                            <td>${fieldValue(bean:extendedAttributeTypeInstance, field:'id')}</td>
    3840                       
    3941                            <td>${fieldValue(bean:extendedAttributeTypeInstance, field:'name')}</td>
     
    4244                       
    4345                            <td>${fieldValue(bean:extendedAttributeTypeInstance, field:'isActive')}</td>
     46                           
     47                            <td>
     48                                <g:link action="show" id="${extendedAttributeTypeInstance.id}">
     49                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
     50                                </g:link>
     51                            </td>
    4452                       
    4553                        </tr>
  • trunk/grails-app/views/extendedAttributeTypeDetailed/show.gsp

    r268 r386  
    66        <meta name="layout" content="main" />
    77        <title>Show ExtendedAttributeType</title>
     8        <nav:resources override="true"/>
    89    </head>
    910    <body>
    1011        <div class="nav">
    11             <span class="menuButton"><g:link class="list" action="list">ExtendedAttributeType List</g:link></span>
    12             <span class="menuButton"><g:link class="create" action="create">New ExtendedAttributeType</g:link></span>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414        <div class="body">
    15             <h1>Show ExtendedAttributeType</h1>
    1615            <g:if test="${flash.message}">
    1716            <div class="message">${flash.message}</div>
Note: See TracChangeset for help on using the changeset viewer.