Exemplo n.º 1
0
 def render_admin(self,ctx,data):
     def gotGalleryItem(item):
         return T.div(id='admin')[ T.a(href=url.URL.fromString('http://admin.dw.timparkin.co.uk:8131/content/Gallery/%s'%item[0].getProtectedObject().id))[ 'Click here to edit gallery description' ] ]
         
     if common.isAdminOn(ctx):
         avatar = icrux.IAvatar(ctx)
         storeSession = tubcommon.getStoreSession(ctx)        
         d = avatar.realm.cmsService.getItems(storeSession, avatar, name=self.category, type=gallery.GalleryItem)
         d.addCallback(gotGalleryItem)
         return d            
     else:
         return ''    
Exemplo n.º 2
0
 def render_admin(self,ctx,data):
     if common.isAdminOn(ctx):
         return T.div(id='admin')[ T.a(href=url.URL.fromString('http://admin.timparkin.co.uk/Pages/%s'%self.original.id))[ 'Click here to edit page content' ] ]
     else:
         return ''
Exemplo n.º 3
0
 def render_admin(self,ctx,data):
     if common.isAdminOn(ctx):
         return T.div(id='admin')[ T.a(href=url.URL.fromString('http://admin.timparkin.co.uk:8131/ecommerce/product/%s'%self.photo.id))[ 'Click here to edit photo' ] ]
     else:
         return ''