Ignore:
Timestamp:
Oct 21, 2009, 6:37:37 PM (15 years ago)
Author:
gav
Message:

Update templates to Grails-1.1.1

Location:
trunk/src/templates/scaffolding
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/scaffolding/Controller.groovy

    r131 r158  
    2727        if(${propertyName}) {
    2828            try {
    29                 ${propertyName}.delete()
     29                ${propertyName}.delete(flush:true)
    3030                flash.message = "${className} \${params.id} deleted"
    3131                redirect(action:list)
     
    7777        else {
    7878            flash.message = "${className} not found with id \${params.id}"
    79             redirect(action:edit,id:params.id)
     79            redirect(action:list)
    8080        }
    8181    }
  • trunk/src/templates/scaffolding/create.gsp

    r128 r158  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${createLinkTo(dir:'')}">Home</a></span>
     11            <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1212            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1313        </div>
  • trunk/src/templates/scaffolding/edit.gsp

    r128 r158  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${createLinkTo(dir:'')}">Home</a></span>
     11            <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1212            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1313            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
  • trunk/src/templates/scaffolding/list.gsp

    r128 r158  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${createLinkTo(dir:'')}">Home</a></span>
     11            <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1212            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
    1313        </div>
  • trunk/src/templates/scaffolding/renderEditor.template

    r128 r158  
    141141
    142142    private renderDateEditor(domainClass,property) {
     143        def precision = property.type == java.sql.Date ? 'day' : 'minute';
    143144        if(!cp) {
    144             return "<g:datePicker name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\"></g:datePicker>"
     145            return "<g:datePicker name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" precision=\"${precision}\"></g:datePicker>"
    145146        }
    146147        else {
     
    155156                    buf << "${k}=\"${v}\" "
    156157                }
    157                 buf << "name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" ${renderNoSelection(property)}></g:datePicker>"
     158                buf << "name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" precision=\"${precision}\" ${renderNoSelection(property)}></g:datePicker>"
    158159                return buf.toString()
    159160            }
  • trunk/src/templates/scaffolding/show.gsp

    r128 r158  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${createLinkTo(dir:'')}">Home</a></span>
     11            <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1212            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1313            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
Note: See TracChangeset for help on using the changeset viewer.