Mercurial Hosting > nabble
comparison src/nabble/view/naml/manage_subscribers.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <macro name="manage_subscribers" requires="servlet"> | |
2 <n.node_page.> | |
3 <n.if.not.visitor.can_manage_subscribers_of.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_manage_subscribers_of.page_node> | |
8 <n.html> | |
9 <head> | |
10 <META NAME="robots" CONTENT="noindex,nofollow"/> | |
11 <n.title.><t>Manage Subscribers</t></n.title.> | |
12 </head> | |
13 <body> | |
14 <n.edit_header first_text="[t]Manage Subscribers[/t]" second_text="[n.page_node.get_app_node.subject/]" /> | |
15 <n.manage_subscribers_controls/> | |
16 </body> | |
17 </n.html> | |
18 </n.node_page.> | |
19 </macro> | |
20 | |
21 <macro name="manage_subscribers_controls" requires="node_page"> | |
22 <n.horizontal_tab_control.> | |
23 <n.current_subscribers_horizontal_tab/> | |
24 <n.add_subscribers_horizontal_tab/> | |
25 </n.horizontal_tab_control.> | |
26 </macro> | |
27 | |
28 <macro name="current_subscribers_horizontal_tab"> | |
29 <n.add_horizontal_tab | |
30 url="[n.page_node.manage_subscribers_path/]" | |
31 text="[t]Current Subscribers[/t]" | |
32 selected="[n.is_subscriber_filter/]" | |
33 details="[n.page_node.list_subscribers/]" | |
34 /> | |
35 </macro> | |
36 | |
37 <macro name="add_subscribers_horizontal_tab"> | |
38 <n.add_horizontal_tab | |
39 url="[n.page_node.manage_subscribers_path filter='invite'/]" | |
40 text="[t]Invite Subscribers[/t]" | |
41 selected="[n.is_subscriber_filter value='invite'/]" | |
42 details="[n.page_node.add_subscribers/]" | |
43 /> | |
44 </macro> | |
45 | |
46 <macro name="add_subscribers" requires="node"> | |
47 <t>If you want to invite subscribers, please request this feature in the <n.support_link/> forum.</t> | |
48 <t>We can install this module for you, but the Nabble team must approve this request to prevent abuse and spam.</t> | |
49 </macro> | |
50 | |
51 <macro name="if_is_tab" parameters="filter" dot_parameter="do"> | |
52 <n.if.is_subscriber_filter value="[n.filter/]"> | |
53 <then.do/> | |
54 </n.if.is_subscriber_filter> | |
55 </macro> | |
56 | |
57 <macro name="list_subscribers" requires="node"> | |
58 <n.if.is_submitted_form> | |
59 <then.process_unsubscription/> | |
60 </n.if.is_submitted_form> | |
61 | |
62 <n.put_in_head.> | |
63 <style type="text/css"> | |
64 table.subscriptions { | |
65 border-collapse:collapse; | |
66 margin-top:1em; | |
67 clear:both; | |
68 width:100% | |
69 } | |
70 table.subscriptions th { | |
71 padding: .3em .6em; | |
72 text-align:left; | |
73 border-bottom-style:solid; | |
74 border-bottom-width:2px; | |
75 } | |
76 table.subscriptions td { | |
77 padding: .5em; | |
78 } | |
79 </style> | |
80 </n.put_in_head.> | |
81 | |
82 <n.zebra_table_javascript table_selector="table.subscriptions"/> | |
83 | |
84 <n.subscribers_pagination/> | |
85 | |
86 <div class="weak-color" style="float:left;margin:.5em 0"> | |
87 <n.one_or_many.page_node.subscription_count> | |
88 <one_text><t>subscriber</t></one_text> | |
89 <many_text><t>subscribers</t></many_text> | |
90 </n.one_or_many.page_node.subscription_count> | |
91 </div> | |
92 | |
93 <n.subscriptions. start="[n.subscriber_page_index_record/]" length="[n.subscriber_page_length/]"> | |
94 <n.if.has_more_elements> | |
95 <then> | |
96 <table class="subscriptions"> | |
97 <tr class="shaded-bg-color"> | |
98 <th class="medium-border-color"></th> | |
99 <th class="medium-border-color"><t>Name</t></th> | |
100 <th class="medium-border-color"><t>Email</t></th> | |
101 <th class="medium-border-color"><t>Subscription Type</t></th> | |
102 <th class="medium-border-color"></th> | |
103 </tr> | |
104 <n.loop.> | |
105 <tr> | |
106 <td style="width:30px;padding:0"><n.subscription.user.avatar/></td> | |
107 <td class="nowrap"><n.subscription.user.user_link/></td> | |
108 <td class="nowrap"><n.subscription.user.user_email/></td> | |
109 <td class="nowrap"><n.subscription.type_label/></td> | |
110 <td class="nowrap"><n.subscription.unsubscribe_button/></td> | |
111 </tr> | |
112 </n.loop.> | |
113 </table> | |
114 </then> | |
115 </n.if.has_more_elements> | |
116 </n.subscriptions.> | |
117 | |
118 <n.subscribers_pagination/> | |
119 </macro> | |
120 | |
121 <macro name="process_unsubscription"> | |
122 <n.if.not.is_null.unsubscribe_email_parameter> | |
123 <then> | |
124 <n.set_local_subscription.page_node.subscription_for email="[n.unsubscribe_email_parameter/]" /> | |
125 <n.if.local_subscription.is_subscribed> | |
126 <then> | |
127 <n.local_subscription.remove/> | |
128 <n.local_subscription.send_unsubscription_reminder/> | |
129 </then> | |
130 </n.if.local_subscription.is_subscribed> | |
131 </then> | |
132 </n.if.not.is_null.unsubscribe_email_parameter> | |
133 </macro> | |
134 | |
135 <macro name="subscribers_pagination" requires="node_page"> | |
136 <n.paging. | |
137 total_rows="[n.page_node.subscription_count/]" | |
138 current_row="[n.subscriber_page_index_record/]" | |
139 rows_per_page="[n.subscriber_page_length/]" | |
140 > | |
141 <n.generic_paging> | |
142 <margin>.55em .2em</margin> | |
143 <url><n.page_node.manage_subscribers_path index_record="[n.page_row/]"/></url> | |
144 </n.generic_paging> | |
145 </n.paging.> | |
146 </macro> | |
147 | |
148 <macro name="type_label" requires="subscription"> | |
149 <n.if.equal value1="[n.to/]" value2="DESCENDANTS"> | |
150 <then><t>All posts</t></then> | |
151 <else><t>New topics only</t></else> | |
152 </n.if.equal> | |
153 </macro> | |
154 | |
155 <macro name="unsubscribe_button" requires="subscription"> | |
156 <n.form.> | |
157 <input type="hidden" name="unsubscribe-email" value="[n.user.user_email/]"/> | |
158 <input type="submit" class="toolbar" value="[t]Unsubscribe[/t]"/> | |
159 </n.form.> | |
160 </macro> | |
161 | |
162 <macro name="unsubscribe_email_parameter" requires="servlet"> | |
163 <n.get_parameter name="unsubscribe-email"/> | |
164 </macro> | |
165 | |
166 | |
167 <macro name="manage_subscribers_path" parameters="filter,index_record" requires="node"> | |
168 <n.encode_url.remove_spaces.> | |
169 /template/NamlServlet.jtp?macro=manage_subscribers&node=<n.id/> | |
170 <n.add_to_path name="filter" value="[n.filter/]"/> | |
171 <n.add_to_path name="i" value="[n.index_record/]" default_value="0"/> | |
172 </n.encode_url.remove_spaces.> | |
173 </macro> | |
174 | |
175 <macro name="subscriber_filter" requires="servlet"> | |
176 <n.get_parameter name="filter"/> | |
177 </macro> | |
178 | |
179 <macro name="subscriber_page_index_record" requires="servlet"> | |
180 <n.get_parameter name="i"/> | |
181 </macro> | |
182 | |
183 <macro name="subscriber_page_length" requires="servlet"> | |
184 25 | |
185 </macro> | |
186 | |
187 <macro name="is_subscriber_filter" parameters="value"> | |
188 <n.equal value1="[n.subscriber_filter/]" value2="[n.value/]" /> | |
189 </macro> |