add condition for reload report button
This commit is contained in:
parent
f2d50c0de2
commit
5d6abda1df
2 changed files with 6 additions and 5 deletions
|
@ -16,7 +16,8 @@
|
|||
<div metal:use-macro="item/report_macros/params" />
|
||||
<div metal:define-macro="buttons">
|
||||
<input type="submit" name="report_execute" value="Execute Report"
|
||||
i18n:attributes="value" />
|
||||
i18n:attributes="value"
|
||||
tal:condition="item/queryFields" />
|
||||
<input type="submit"
|
||||
tal:condition="item/reportDownload"
|
||||
tal:attributes="name string:${item/reportDownload}:method;
|
||||
|
|
|
@ -92,7 +92,7 @@ class DecimalField(Field):
|
|||
|
||||
|
||||
class IntegerField(Field):
|
||||
|
||||
|
||||
renderer = cssClass = 'right'
|
||||
dbtype = 'integer'
|
||||
|
||||
|
@ -135,11 +135,11 @@ class StateField(Field):
|
|||
elif row.context is None:
|
||||
return None
|
||||
else:
|
||||
stf = component.getAdapter(baseObject(row.context), IStateful,
|
||||
stf = component.getAdapter(baseObject(row.context), IStateful,
|
||||
name=self.statesDefinition)
|
||||
stateObject = stf.getStateObject()
|
||||
icon = stateObject.icon or 'led%s.png' % stateObject.color
|
||||
return dict(title=self.translate(stateObject.title),
|
||||
return dict(title=self.translate(stateObject.title),
|
||||
icon='cybertools.icons/' + icon)
|
||||
|
||||
def translate(self, text):
|
||||
|
@ -277,4 +277,4 @@ class SubReportField(Field):
|
|||
rs = ri.getResults()
|
||||
ri.view.resultSets[ri.name] = rs
|
||||
return rs
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue