From da4f502ddcb59bb517e124d1349a96b5c820f597 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Sun, 10 Mar 2013 08:29:53 +0100 Subject: [PATCH] [gen] appyclass.getIcons now receives the nav param, in case one wants to reproduce, on an icon or a picture, the link to the element. For example, on a artist's site that presents its artworks, getIcons can be used to create a clickable link to a small version of the artwork, that leads to the full-size picture. Bugfix in result.pt (numbering of elements in the grid view). --- gen/mixins/__init__.py | 4 ++-- gen/ui/result.pt | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/gen/mixins/__init__.py b/gen/mixins/__init__.py index 53ee9c3..d957680 100644 --- a/gen/mixins/__init__.py +++ b/gen/mixins/__init__.py @@ -915,10 +915,10 @@ class BaseMixin: return None return res - def getIcons(self): + def getIcons(self, navInfo=''): '''Gets the icons that can be shown besides the title of an object.''' appyObj = self.appy() - if hasattr(appyObj, 'getIcons'): return appyObj.getIcons() + if hasattr(appyObj, 'getIcons'): return appyObj.getIcons(navInfo) return '' def getSubTitle(self): diff --git a/gen/ui/result.pt b/gen/ui/result.pt index f1ae78f..5414195 100644 --- a/gen/ui/result.pt +++ b/gen/ui/result.pt @@ -2,12 +2,11 @@ Title - - + + +
- Actions: edit, delete +
Any other field @@ -50,7 +50,9 @@ Results - @@ -71,12 +73,14 @@ rows python: tool.splitList(objs, cols)"> - - - - - + align="center" style="padding-top: 25px"> + + + + + + + @@ -144,7 +148,8 @@ Results, as a list or grid + columns python: objs[0].getColumnsSpecifiers(columnLayouts, dir); + global currentNumber python: 0">