Ignore:
Timestamp:
May 1, 2011, 12:46:31 PM (13 years ago)
Author:
gav
Message:

Svn merge -r875:r911 branches/features/grailsUpgrade/ into trunk/.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/grails-app/controllers/AppCoreController.groovy

    r707 r913  
    5858
    5959        // 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(", ")
    6667
    6768        def sections = Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }
  • trunk/grails-app/controllers/AssetDetailedController.groovy

    r749 r913  
    4444    }
    4545
     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
    4660    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    4761    def exportAssetTreeHtml = {
     
    150164        if(params?.format && params.format != "html") {
    151165
    152             def dateFmt = { date ->
    153                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     166            def dateFmt = { domain, value ->
     167                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    154168            }
    155169
    156 //             def fmtAsset = { m ->
     170//             def fmtAsset = { d, m ->
    157171//                     def r = ''
    158172//                     def assetInstance = Asset.findByName(m)
     
    170184//             }
    171185
    172 //             def fmtSubAsset = { m ->
     186//             def fmtSubAsset = { d, m ->
    173187//                     def r = ''
    174188//                     m.each() {
  • trunk/grails-app/controllers/AssetSubItemDetailedController.groovy

    r658 r913  
    6060        if(params?.format && params.format != "html") {
    6161
    62             def dateFmt = { date ->
    63                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     62            def dateFmt = { domain, value ->
     63                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    6464            }
    6565
  • trunk/grails-app/controllers/InventoryItemDetailedController.groovy

    r727 r913  
    292292        if(params?.format && params.format != "html") {
    293293
    294             def dateFmt = { date ->
    295                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     294            def dateFmt = { domain, value ->
     295                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    296296            }
    297297
     
    646646        if(params?.format && params.format != "html") {
    647647
    648             def dateFmt = { date ->
    649                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     648            def dateFmt = { domain, value ->
     649                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    650650            }
    651651
  • trunk/grails-app/controllers/InventoryItemPurchaseDetailedController.groovy

    r717 r913  
    142142        if(params?.format && params.format != "html") {
    143143
    144             def dateFmt = { date ->
    145                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     144            def dateFmt = { domain, value ->
     145                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    146146            }
    147147
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r871 r913  
    147147        if(params?.format && params.format != "html") {
    148148
    149             def dateFmt = { date ->
    150                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     149            def dateFmt = { domain, value ->
     150                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    151151            }
    152152
     
    308308        if(params?.format && params.format != "html") {
    309309
    310             def dateFmt = { date ->
    311                 formatDate(format: "EEE, dd-MMM-yyyy", date: date)
     310            def dateFmt = { domain, value ->
     311                formatDate(format: "EEE, dd-MMM-yyyy", date: value)
    312312            }
    313313
  • trunk/grails-app/controllers/TaskProcedureDetailedController.groovy

    r813 r913  
    1717        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    1818
    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        }
    2131
    2232        // 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 ]
    2737    }
    2838
Note: See TracChangeset for help on using the changeset viewer.