Ignore:
Timestamp:
Sep 23, 2010, 5:01:46 AM (14 years ago)
Author:
gav
Message:

New asset report: Equipment Register.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/ReportController.groovy

    r652 r654  
    173173    } // assetRegister
    174174
     175    def equipmentRegister = {
     176
     177        params.reportTitle = "Equipment Register"
     178        params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL()
     179        params.currentUser = authService.currentUser
     180        if(params.section.id == 'all')
     181            params.section = "All"
     182        else
     183            params.section = Section.get(params.section.id.toLong())
     184
     185        def dataModel = assetReportService.getEquipmentRegister(params, RCU.getLocale(request))
     186
     187        // Jasper plugin controller expects data to be a Collection.
     188        chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params)
     189
     190//         render {
     191//             dataModel.dataList.each {
     192//                 p("$it")
     193//             }
     194//         }
     195
     196    } // equipmentRegister
     197
    175198} // end of class.
Note: See TracChangeset for help on using the changeset viewer.