Changeset 913 for trunk/grails-app/controllers
- Timestamp:
- May 1, 2011, 12:46:31 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/features/grailsUpgrade merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/grails-app/controllers/AppCoreController.groovy
r707 r913 58 58 59 59 // Build the plugins string. 60 def pluginProperties = grailsApplication.metadata.findAll {it.key.contains('plugin')} 61 pluginProperties.each() { 62 it.key = WordUtils.capitalize( (it.key + GString.EMPTY).split("\\.")[-1] ) 63 } 64 pluginProperties = pluginProperties.sort { p1, p2 -> p1.key.compareToIgnoreCase(p2.key) } 65 def plugins = pluginProperties.collect{ it.key + '-' + it.value }.join(", ") 60 def userPlugins = org.codehaus.groovy.grails.plugins.PluginManagerHolder.pluginManager.userPlugins 61 62 userPlugins = userPlugins.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 63 64 def plugins = userPlugins.collect{ 65 WordUtils.capitalize(it.name) + '-' + it.version 66 }.join(", ") 66 67 67 68 def sections = Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } -
trunk/grails-app/controllers/AssetDetailedController.groovy
r749 r913 44 44 } 45 45 46 /** 47 * Build and return the compact asset tree response. 48 */ 49 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 50 def assetTreeCompact = { 51 def assetInstance = Asset.read(params.id) 52 if(!assetInstance) { 53 render g.message(code: 'default.not.found', args: ['Asset',params.id]) 54 return 55 } 56 57 render(template:"/shared/assetTreeCompact", model:['assetInstance':assetInstance]) 58 } 59 46 60 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 47 61 def exportAssetTreeHtml = { … … 150 164 if(params?.format && params.format != "html") { 151 165 152 def dateFmt = { d ate ->153 formatDate(format: "EEE, dd-MMM-yyyy", date: date)166 def dateFmt = { domain, value -> 167 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 154 168 } 155 169 156 // def fmtAsset = { m ->170 // def fmtAsset = { d, m -> 157 171 // def r = '' 158 172 // def assetInstance = Asset.findByName(m) … … 170 184 // } 171 185 172 // def fmtSubAsset = { m ->186 // def fmtSubAsset = { d, m -> 173 187 // def r = '' 174 188 // m.each() { -
trunk/grails-app/controllers/AssetSubItemDetailedController.groovy
r658 r913 60 60 if(params?.format && params.format != "html") { 61 61 62 def dateFmt = { d ate ->63 formatDate(format: "EEE, dd-MMM-yyyy", date: date)62 def dateFmt = { domain, value -> 63 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 64 64 } 65 65 -
trunk/grails-app/controllers/InventoryItemDetailedController.groovy
r727 r913 292 292 if(params?.format && params.format != "html") { 293 293 294 def dateFmt = { d ate ->295 formatDate(format: "EEE, dd-MMM-yyyy", date: date)294 def dateFmt = { domain, value -> 295 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 296 296 } 297 297 … … 646 646 if(params?.format && params.format != "html") { 647 647 648 def dateFmt = { d ate ->649 formatDate(format: "EEE, dd-MMM-yyyy", date: date)648 def dateFmt = { domain, value -> 649 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 650 650 } 651 651 -
trunk/grails-app/controllers/InventoryItemPurchaseDetailedController.groovy
r717 r913 142 142 if(params?.format && params.format != "html") { 143 143 144 def dateFmt = { d ate ->145 formatDate(format: "EEE, dd-MMM-yyyy", date: date)144 def dateFmt = { domain, value -> 145 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 146 146 } 147 147 -
trunk/grails-app/controllers/TaskDetailedController.groovy
r871 r913 147 147 if(params?.format && params.format != "html") { 148 148 149 def dateFmt = { d ate ->150 formatDate(format: "EEE, dd-MMM-yyyy", date: date)149 def dateFmt = { domain, value -> 150 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 151 151 } 152 152 … … 308 308 if(params?.format && params.format != "html") { 309 309 310 def dateFmt = { d ate ->311 formatDate(format: "EEE, dd-MMM-yyyy", date: date)310 def dateFmt = { domain, value -> 311 formatDate(format: "EEE, dd-MMM-yyyy", date: value) 312 312 } 313 313 -
trunk/grails-app/controllers/TaskProcedureDetailedController.groovy
r813 r913 17 17 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 18 18 19 if(!params.filter) 20 { return [taskProcedureInstanceList: TaskProcedure.list(params), taskProcedureInstanceTotal: TaskProcedure.count()] } 19 def taskProcedureInstanceList 20 def taskProcedureInstanceTotal 21 def filterParams = com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params) 22 23 if(params.filter) { 24 taskProcedureInstanceList = filterService.filter( params, TaskProcedure ) 25 taskProcedureInstanceTotal = filterService.count( params, TaskProcedure ) 26 } 27 else { 28 taskProcedureInstanceList = TaskProcedure.list(params) 29 taskProcedureInstanceTotal = TaskProcedure.count() 30 } 21 31 22 32 // filterPane: 23 return[ taskProcedureInstanceList: filterService.filter( params, TaskProcedure ),24 taskProcedureInstanceTotal: filterService.count( params, TaskProcedure ),25 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params),26 params: params ]33 return[ taskProcedureInstanceList: taskProcedureInstanceList, 34 taskProcedureInstanceTotal: taskProcedureInstanceTotal, 35 filterParams: filterParams, 36 params: params ] 27 37 } 28 38
Note: See TracChangeset
for help on using the changeset viewer.