Mercurial Hosting > nabble
comparison src/nabble/view/naml/delete_node.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children | cc5b7d515580 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <macro name="delete_post" requires="servlet"> | |
2 <n.node_page.> | |
3 <n.if.not.visitor.can_delete.page_node> | |
4 <then> | |
5 <n.login.><t>Only authorized users can proceed in this area.</t></n.login.> | |
6 </then> | |
7 </n.if.not.visitor.can_delete.page_node> | |
8 | |
9 <n.page_node.delete_node_and_redirect/> | |
10 </n.node_page.> | |
11 </macro> | |
12 | |
13 <macro name="delete_node_and_redirect" requires="node"> | |
14 <n.set_var. name='next_url'> | |
15 <n.parent_path_or_homepage/> | |
16 </n.set_var.> | |
17 <n.delete_message_or_node/> | |
18 <n.redirect_to.var name='next_url'/> | |
19 </macro> | |
20 | |
21 <macro name="delete_from_site" requires="servlet"> | |
22 <n.node_page.> | |
23 <n.if.not.visitor.can_delete_recursively.page_node> | |
24 <then> | |
25 <n.login.><t>Only authorized users can proceed in this area.</t></n.login.> | |
26 </then> | |
27 </n.if.not.visitor.can_delete_recursively.page_node> | |
28 | |
29 <n.page_node.delete_node_recursively_and_redirect/> | |
30 </n.node_page.> | |
31 </macro> | |
32 | |
33 <macro name="delete_node_recursively_and_redirect" requires="node"> | |
34 <n.set_var. name='next_url'> | |
35 <n.parent_path_or_homepage/> | |
36 </n.set_var.> | |
37 <n.send_deleted_nodes_email/> | |
38 <n.delete_recursively/> | |
39 <n.redirect_to.var name='next_url'/> | |
40 </macro> | |
41 | |
42 <macro name="parent_path_or_homepage" requires="node"> | |
43 <n.if.has_parent> | |
44 <then><n.parent_node.path/></then> | |
45 <else><n.nabble_homepage/></else> | |
46 </n.if.has_parent> | |
47 </macro> | |
48 | |
49 <macro name="send_deleted_nodes_email" requires="node"> | |
50 <n.descendant_nodes_by_user.> | |
51 <n.loop.> | |
52 <n.if.current_user.is_registered> | |
53 <then> | |
54 <n.new_email.> | |
55 <n.nodes_list.attach_nodes/> | |
56 <n.send> | |
57 <to.current_user.user_email/> | |
58 <to_name.current_user.name/> | |
59 <subject><t>Deleted posts</t></subject> | |
60 <text_part.deleted_nodes_text/> | |
61 <bounce_to.current_user.bounces_address/> | |
62 </n.send> | |
63 </n.new_email.> | |
64 </then> | |
65 </n.if.current_user.is_registered> | |
66 </n.loop.> | |
67 </n.descendant_nodes_by_user.> | |
68 </macro> | |
69 | |
70 <macro name="deleted_nodes_text" unindent="true"> | |
71 <t>Dear user,</t> | |
72 | |
73 <t>Some of your posts have been deleted from <t.location.root_node.subject/> | |
74 and we are sending you copies so that you have a chance to save them.</t> | |
75 | |
76 <t>Sincerely,</t> | |
77 <t>The Nabble team</t> | |
78 ________________________________________ | |
79 <t>Free Embeddable <t.app.root_node.view_name/></t> powered by Nabble | |
80 <n.nabble_homepage/> | |
81 </macro> | |
82 | |
83 <macro name="attach_nodes" requires="node_list,email"> | |
84 <n.comment.> | |
85 Attach valid nodes as ZIP files in the email | |
86 (zip file contains message, images, files from the node) | |
87 </n.comment.> | |
88 <n.loop.> | |
89 <n.if.not.current_node.message.is_deleted> | |
90 <then.add_node_as_zip_attachment.current_node/> | |
91 </n.if.not.current_node.message.is_deleted> | |
92 </n.loop.> | |
93 </macro> |