Ignore:
Timestamp:
Jan 21, 2010, 11:25:46 AM (14 years ago)
Author:
gav
Message:

Move asset copy and create functions into AssetService.
Repair create links in AssetTreeTagLib.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/AssetTreeTagLib.groovy

    r282 r284  
    8181                                                            img(src: addImg(), alt: 'Add', title: 'Add Sub Item')
    8282                                                        }
     83                                                        a(href: assetCopyLink(asset.id)) {
     84                                                            img(src: copyImg(), alt: 'Add', title: 'Copy Asset')
     85                                                        }
    8386                                                    } // li
    8487
     
    240243    }
    241244
    242     def sectionCreateLink(id) {
    243         createLink(controller: 'sectionDetailed', action: 'create', params: ['id': id] ).toString()
     245    def sectionCreateLink(siteId) {
     246        createLink(controller: 'sectionDetailed', action: 'create', params: ['site.id': siteId] ).toString()
    244247    }
    245248
     
    252255    }
    253256
    254     def assetCreateLink(id) {
    255         createLink(controller: 'assetDetailed', action: 'create', params: ['id': id] ).toString()
     257    def assetCreateLink(sectionId) {
     258        createLink(controller: 'assetDetailed', action: 'create', params: ['section.id': sectionId] ).toString()
    256259    }
    257260
     
    265268
    266269    def assetCopyLink(id) {
    267         createLink(controller: 'assetDetailed', action: 'copy', params: ['asset.id': id] ).toString()
     270        createLink(controller: 'assetDetailed', action: 'copy', params: ['assetToCopy.id': id] ).toString()
    268271    }
    269272
Note: See TracChangeset for help on using the changeset viewer.