Add way to override grid action label rendering
so that custom HTML can be embedded in there somehow..
This commit is contained in:
parent
b229b409b0
commit
87d8322b85
3 changed files with 16 additions and 3 deletions
|
@ -1434,6 +1434,17 @@ class GridAction(object):
|
|||
return self.url(row, i)
|
||||
return self.url
|
||||
|
||||
def render_label(self):
|
||||
"""
|
||||
Render the label "text" within the actions column of a grid
|
||||
row. Most actions have a static label that never varies, but
|
||||
you can override this to add e.g. HTML content. Note that the
|
||||
return value will be treated / rendered as HTML whether or not
|
||||
it contains any, so perhaps be careful that it is trusted
|
||||
content.
|
||||
"""
|
||||
return self.label
|
||||
|
||||
|
||||
class URLMaker(object):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue