Ignore:
Timestamp:
Mar 24, 2010, 11:52:14 AM (9 years ago)
Author:
jahn
Message:

Added an actually non editable show. (Parameters script needs to be adapted, still.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/EventDescriptionController.groovy

    r290 r309  
    286286    def show = {
    287287
    288         def eventDescriptionInstance = EventDescription.get(params.id)
     288        def eventDescriptionInstance = EventDescription.get(params['id'])
    289289        if (!eventDescriptionInstance) {
    290290            flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'eventDescription.label', default: 'EventDescription'), params.id])}"
     
    295295            [eventDescriptionInstance: eventDescriptionInstance, params:params]
    296296            // Since show.gsp is not implemented yet, redirect to edit
    297             redirect(action:'edit',id:params.id)
    298         }
    299     }
     297            return [eventDescriptionInstance: eventDescriptionInstance]
     298        }
     299    }
     300
    300301
    301302
     
    314315
    315316    def showMyProtocol = {
    316 
    317317        if( EventDescription.get(params.id)==null || EventDescription.get(params.id).protocol==null ) {
    318318            def description=new EventDescription();
     
    320320        }
    321321        else {
     322            def isEditable = params['editable']
    322323            def description = EventDescription.get(params.id)
    323             render( view: "showMyProtocolFilled", model:[protocol:description.protocol,description:description] )
     324            render( view: "showMyProtocolFilled", model:[protocol:description.protocol,description:description,editable:isEditable] )
    324325        }
    325326    }
Note: See TracChangeset for help on using the changeset viewer.