use modal pattern for comment edit
This commit is contained in:
parent
68665b6f2b
commit
e2192e5973
@ -9,7 +9,8 @@
|
|||||||
has_replies python:view.has_replies(canReview);
|
has_replies python:view.has_replies(canReview);
|
||||||
showCommenterImage view/show_commenter_image;
|
showCommenterImage view/show_commenter_image;
|
||||||
errors options/state/getErrors|nothing;
|
errors options/state/getErrors|nothing;
|
||||||
wtool context/@@plone_tools/workflow;"
|
wtool context/@@plone_tools/workflow;
|
||||||
|
auth_token context/@@authenticator/token|nothing"
|
||||||
tal:condition="python:isDiscussionAllowed or has_replies"
|
tal:condition="python:isDiscussionAllowed or has_replies"
|
||||||
i18n:domain="plone">
|
i18n:domain="plone">
|
||||||
|
|
||||||
@ -115,11 +116,17 @@
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<tal:edit tal:condition="python:isEditCommentAllowed and canEdit">
|
||||||
|
<!-- plone 5 will have auth_token available
|
||||||
|
so we'll use modal pattern -->
|
||||||
|
<a class="commentactionsform pat-plone-modal"
|
||||||
|
tal:condition="auth_token"
|
||||||
|
tal:attributes="href string:${reply/absolute_url}/@@edit-comment?_authenticator=${auth_token}">Edit</a>
|
||||||
<form name="edit"
|
<form name="edit"
|
||||||
action=""
|
action=""
|
||||||
method="get"
|
method="get"
|
||||||
class="commentactionsform"
|
class="commentactionsform"
|
||||||
tal:condition="python:isEditCommentAllowed and canEdit"
|
tal:condition="not: auth_token"
|
||||||
tal:attributes="action string:${reply/absolute_url}/@@edit-comment">
|
tal:attributes="action string:${reply/absolute_url}/@@edit-comment">
|
||||||
<input name="form.button.EditComment"
|
<input name="form.button.EditComment"
|
||||||
class="context"
|
class="context"
|
||||||
@ -128,6 +135,7 @@
|
|||||||
i18n:attributes="value label_edit;"
|
i18n:attributes="value label_edit;"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
</tal:edit>
|
||||||
|
|
||||||
|
|
||||||
<!-- Workflow actions (e.g. 'publish') -->
|
<!-- Workflow actions (e.g. 'publish') -->
|
||||||
|
Loading…
Reference in New Issue
Block a user