- Timestamp:
- Sep 18, 2010, 9:57:20 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/ReportController.groovy
r546 r652 8 8 def dateUtilService 9 9 def taskReportService 10 def assetReportService 10 11 def inventoryReportService 11 12 … … 138 139 } // stockTakeByLocation 139 140 141 def assetDetail = { 142 143 params.reportTitle = "Asset Detail" 144 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 145 params.currentUser = authService.currentUser 146 if(params.asset.id == 'all') 147 params.asset = "All" 148 else 149 params.asset = Asset.get(params.asset.id.toLong()) 150 151 def dataModel = assetReportService.getAssetDetail(params, RCU.getLocale(request)) 152 153 // Jasper plugin controller expects data to be a Collection. 154 chain(controller:'jasper', action:'index', model:[data: dataModel], params:params) 155 156 } // assetDetail 157 158 def assetRegister = { 159 160 params.reportTitle = "Asset Register" 161 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 162 params.currentUser = authService.currentUser 163 if(params.section.id == 'all') 164 params.section = "All" 165 else 166 params.section = Section.get(params.section.id.toLong()) 167 168 def dataModel = assetReportService.getAssetRegister(params, RCU.getLocale(request)) 169 170 // Jasper plugin controller expects data to be a Collection. 171 chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params) 172 173 } // assetRegister 174 140 175 } // end of class. -
trunk/grails-app/i18n/messages.properties
r636 r652 292 292 default.please.select.text=--Please-Select-- 293 293 default.none.select.text=--None-- 294 default.all.select.text=--All-- 294 295 295 296 # -
trunk/grails-app/views/appCore/start.gsp
r548 r652 138 138 <br /> 139 139 <g:jasperReport controller="report" 140 action="assetDetail" 141 jasper="assetDetail" 142 name="Asset Detail" 143 format="PDF, XLS"> 144 <g:select optionKey="id" 145 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 146 name="asset.id" 147 noSelection="['all':/${g.message(code:'default.all.select.text')}/]"> 148 </g:select> 149 </g:jasperReport> 150 <g:jasperReport controller="report" 151 action="assetRegister" 152 jasper="assetRegister" 153 name="Asset Register" 154 format="PDF, XLS"> 155 <g:select optionKey="id" 156 from="${Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 157 name="section.id" 158 noSelection="['all':/${g.message(code:'default.all.select.text')}/]"> 159 </g:select> 160 </g:jasperReport> 161 <br /> 162 <g:jasperReport controller="report" 140 163 action="templatePortrait" 141 164 jasper="templatePortrait"
Note: See TracChangeset
for help on using the changeset viewer.