appy.gen: first Ploneless version.
This commit is contained in:
parent
5672c81553
commit
d0cbe7e573
360 changed files with 1003 additions and 1017 deletions
33
gen/ui/widgets/action.pt
Normal file
33
gen/ui/widgets/action.pt
Normal file
|
@ -0,0 +1,33 @@
|
|||
<tal:comment replace="nothing">View macro for an Action.</tal:comment>
|
||||
<metal:view define-macro="view">
|
||||
<form name="executeAppyAction"
|
||||
tal:define="formId python: '%s_%s' % (contextObj.UID(), name);
|
||||
label python: contextObj.translate(widget['labelId'])"
|
||||
tal:attributes="id formId; action python: tool.absolute_url()+'/do'">
|
||||
<input type="hidden" name="action" value="ExecuteAppyAction"/>
|
||||
<input type="hidden" name="objectUid" tal:attributes="value contextObj/UID"/>
|
||||
<input type="hidden" name="fieldName" tal:attributes="value name"/>
|
||||
<tal:confirm condition="widget/confirm">
|
||||
<input type="button"
|
||||
tal:define="labelConfirm python: contextObj.translate(widget['labelId'] + '_confirm')"
|
||||
tal:attributes="value label;
|
||||
onClick python: 'askConfirm(\'form\', \'%s\', "%s")' % (formId, labelConfirm)"/>
|
||||
</tal:confirm>
|
||||
<input type="submit" name="do" tal:condition="not: widget/confirm"
|
||||
tal:attributes="value label" onClick="javascript:;"/>
|
||||
<tal:comment replace="nothing">The previous onClick is simply used to prevent Plone
|
||||
from adding a CSS class that displays a popup when the user triggers the form multiple
|
||||
times.</tal:comment>
|
||||
</form>
|
||||
</metal:view>
|
||||
|
||||
<tal:comment replace="nothing">Edit macro for an Action.</tal:comment>
|
||||
<metal:edit define-macro="edit"></metal:edit>
|
||||
|
||||
<tal:comment replace="nothing">Cell macro for an Action.</tal:comment>
|
||||
<metal:cell define-macro="cell">
|
||||
<metal:call use-macro="app/ui/widgets/action/macros/view"/>
|
||||
</metal:cell>
|
||||
|
||||
<tal:comment replace="nothing">Search macro for an Action.</tal:comment>
|
||||
<metal:search define-macro="search"></metal:search>
|
Loading…
Add table
Add a link
Reference in a new issue