0
|
1 <!--
|
|
2 Used in
|
|
3 http://work.ppcassociates.com/
|
|
4 http://foreverarts.3255.n6.nabble.com/
|
|
5 http://horse-barns.11180.n6.nabble.com/ (GregChapman)
|
|
6 -->
|
|
7
|
|
8 <override_macro name="manage_subscribers_controls" requires="node_page">
|
|
9 <n.horizontal_tab_control.>
|
|
10 <n.current_subscribers_horizontal_tab/>
|
|
11 <n.add_subscribers_horizontal_tab/>
|
|
12 <n.members_subscribers_horizontal_tab/>
|
|
13 </n.horizontal_tab_control.>
|
|
14 </override_macro>
|
|
15
|
|
16 <macro name="members_subscribers_horizontal_tab">
|
|
17 <n.add_horizontal_tab
|
|
18 url="[n.page_node.manage_subscribers_path filter='members'/]"
|
|
19 text="[t]Add Subscribers[/t]"
|
|
20 selected="[n.is_subscriber_filter value='members'/]"
|
|
21 details="[n.page_node.subscribe_members/]"
|
|
22 />
|
|
23 </macro>
|
|
24
|
|
25 <macro name="subscribe_members" requires="node">
|
|
26 <n.if.is_submitted_form>
|
|
27 <then.process_member_subscriptions/>
|
|
28 </n.if.is_submitted_form>
|
|
29
|
|
30 <n.unsubscribed_members.>
|
|
31 <n.if.has_more_elements>
|
|
32 <then>
|
|
33 <div class="weak-color" style="margin:.5em 0 .5em">
|
|
34 Unsubscribed members are listed below.
|
|
35 Select who you would like to be subscribed:
|
|
36 </div>
|
|
37 <n.form.>
|
|
38 <input type="hidden" name="filter" value="members"/>
|
|
39 <div class="medium-border-color border1" style="padding:.5em;height:25em;overflow:auto">
|
|
40 <table>
|
|
41 <n.loop.>
|
|
42 <n.page_node.subscription_for. email="[n.current_user.user_email/]">
|
|
43 <n.if.not.is_subscribed>
|
|
44 <then>
|
|
45 <n.current_user.member_field.>
|
|
46 <tr>
|
|
47 <td><n.checkbox/></td>
|
|
48 <td><n.current_user.avatar/></td>
|
|
49 <td><label for="[n.name/]"><n.current_user.name/></label></td>
|
|
50 </tr>
|
|
51 </n.current_user.member_field.>
|
|
52 </then>
|
|
53 </n.if.not.is_subscribed>
|
|
54 </n.page_node.subscription_for.>
|
|
55 </n.loop.>
|
|
56 </table>
|
|
57 </div>
|
|
58 <div style="margin-top:1.4em">
|
|
59 <input type="submit" value="Add Subscribers" />
|
|
60 </div>
|
|
61 </n.form.>
|
|
62 </then>
|
|
63 <else>
|
|
64 <div class="weak-color" style="margin:.5em 0 .5em">
|
|
65 No unsubscribed members found.
|
|
66 </div>
|
|
67 </else>
|
|
68 </n.if.has_more_elements>
|
|
69 </n.unsubscribed_members.>
|
|
70 </macro>
|
|
71
|
|
72 <macro name="unsubscribed_members" dot_parameter="do">
|
|
73 <n.site_users. length="99999">
|
|
74 <n.filter_by.current_user.can_view.page_node/>
|
|
75 <n.filter_by.>
|
|
76 <n.page_node.subscription_for. email="[n.current_user.user_email/]">
|
|
77 <n.not.is_subscribed/>
|
|
78 </n.page_node.subscription_for.>
|
|
79 </n.filter_by.>
|
|
80 <n.do/>
|
|
81 </n.site_users.>
|
|
82 </macro>
|
|
83
|
|
84 <macro name="member_field" dot_parameter="do" requires="user">
|
|
85 <n.field. name="member-[n.id/]"><n.do/></n.field.>
|
|
86 </macro>
|
|
87
|
|
88 <macro name="process_member_subscriptions">
|
|
89 <n.unsubscribed_members.>
|
|
90 <n.loop.>
|
|
91 <n.page_node.subscription_for. email="[n.current_user.user_email/]">
|
|
92 <n.if.both
|
|
93 condition1="[n.not.is_subscribed/]"
|
|
94 condition2="[n.current_user.member_field.is_checked/]"
|
|
95 >
|
|
96 <then>
|
|
97 <n.save to="DESCENDANTS" type="INSTANT"/>
|
|
98 <n.send_subscription_notification/>
|
|
99 </then>
|
|
100 </n.if.both>
|
|
101 </n.page_node.subscription_for.>
|
|
102 </n.loop.>
|
|
103 </n.unsubscribed_members.>
|
|
104 </macro>
|
|
105
|
|
106 <macro name="send_subscription_notification" requires="subscription,node_page,servlet">
|
|
107 <n.set_local_subscription.this_subscription />
|
|
108 <n.new_email.>
|
|
109 <n.send>
|
|
110 <to><n.user.user_email/></to>
|
|
111 <subject>Nabble subscription to <n.page_node.subject/></subject>
|
|
112 <text_part>
|
|
113 Dear user,
|
|
114
|
|
115 <n.page_node.owner.name/> subscribed you to <n.page_node.subject/>:
|
|
116 <n.page_node.url/>
|
|
117
|
|
118 With your subscription, posts and replies will be sent directly to your email
|
|
119 and you can reply to them to participate. Your subscription works as a mailing list.
|
|
120
|
|
121 If you don't want to be a subscriber, please click on the link below:
|
|
122 <n.local_subscription.unsubscribe_by_code_url/>
|
|
123
|
|
124 Sincerely,
|
|
125 The Nabble team
|
|
126 ________________________________________
|
|
127 Free <n.to_lower_case.page_node.view_name/> powered by Nabble
|
|
128 <n.nabble_homepage/>
|
|
129 </text_part>
|
|
130 <html_part>
|
|
131 Dear user,<br/>
|
|
132 <br/>
|
|
133 <n.page_node.owner.name/> subscribed you to <n.page_node.subject/>:<br/>
|
|
134 <n.page_node.url/><br/>
|
|
135 <br/>
|
|
136 With your subscription, posts and replies will be sent directly to your email
|
|
137 and you can reply to them to participate. Your subscription works as a mailing list.<br/>
|
|
138 <br/>
|
|
139 If you don't want to be a subscriber, please click on the link below:<br/>
|
|
140 <div style="background-color:#FFFADB;border:#EDDD79 solid 1px;margin:1.2em 0;padding:.5em">
|
|
141 <a href="[n.local_subscription.unsubscribe_by_code_url/]">
|
|
142 <n.local_subscription.unsubscribe_by_code_url/>
|
|
143 </a>
|
|
144 </div>
|
|
145 Sincerely,<br/>
|
|
146 The Nabble team<br/>
|
|
147 ________________________________________<br/>
|
|
148 Free <n.to_lower_case.page_node.view_name/> powered by Nabble<br/>
|
|
149 <n.nabble_homepage/><br/><br/>
|
|
150 </html_part>
|
|
151 </n.send>
|
|
152 </n.new_email.>
|
|
153 </macro>
|