Re: show effective subscriptions for a sub forum
Posted by
Pedro on
Oct 07, 2014; 2:05pm
URL: https://support.nabble.com/show-effective-subscriptions-for-a-sub-forum-tp7591707p7591846.html
Ok, I meant to show you how it could looks like.
Please, override your list_subscribers macro:
<override_macro name="list_subscribers" requires="node">
<n.if.is_submitted_form>
<then.process_unsubscription/>
</n.if.is_submitted_form>
<n.put_in_head.>
<style type="text/css">
table.subscriptions {
border-collapse:collapse;
margin-top:1em;
clear:both;
width:100%
}
table.subscriptions th {
padding: .3em .6em;
text-align:left;
border-bottom-style:solid;
border-bottom-width:2px;
}
table.subscriptions td {
padding: .5em;
}
</style>
</n.put_in_head.>
<n.zebra_table_javascript table_selector="table.subscriptions"/>
<n.subscribers_pagination/>
<div>
<n.ancestors_list. order="reverse">
<n.loop.>
<br/>
Inside: <h3><n.current_node.node_link/></h3>
<n.current_node.subscriptions. start="[n.subscriber_page_index_record/]" length="[n.subscriber_page_length/]">
<n.if.has_more_elements>
<then>
<table class="subscriptions">
<tr class="shaded-bg-color">
<th class="medium-border-color"></th>
<th class="medium-border-color"><t>Name</t></th>
<th class="medium-border-color"><t>Email</t></th>
<th class="medium-border-color"><t>Subscription Type</t></th>
<th class="medium-border-color"></th>
</tr>
<n.loop.>
<tr>
<td style="width:30px;padding:0"><n.subscription.user.avatar/></td>
<td class="nowrap"><n.subscription.user.user_link/></td>
<td class="nowrap"><n.subscription.user.user_email/></td>
<td class="nowrap"><n.subscription.type_label/></td>
<td class="nowrap"><n.subscription.unsubscribe_button/></td>
</tr>
</n.loop.>
</table>
</then>
</n.if.has_more_elements>
</n.current_node.subscriptions.>
<br/>
</n.loop.>
</n.ancestors_list.>
</div>
Inside: <h3><n.node_link/></h3>
<div class="weak-color" style="float:left;margin:.5em 0">
<n.one_or_many.page_node.subscription_count>
<one_text><t>subscriber</t></one_text>
<many_text><t>subscribers</t></many_text>
</n.one_or_many.page_node.subscription_count>
</div>
<n.subscriptions. start="[n.subscriber_page_index_record/]" length="[n.subscriber_page_length/]">
<n.if.has_more_elements>
<then>
<table class="subscriptions">
<tr class="shaded-bg-color">
<th class="medium-border-color"></th>
<th class="medium-border-color"><t>Name</t></th>
<th class="medium-border-color"><t>Email</t></th>
<th class="medium-border-color"><t>Subscription Type</t></th>
<th class="medium-border-color"></th>
</tr>
<n.loop.>
<tr>
<td style="width:30px;padding:0"><n.subscription.user.avatar/></td>
<td class="nowrap"><n.subscription.user.user_link/></td>
<td class="nowrap"><n.subscription.user.user_email/></td>
<td class="nowrap"><n.subscription.type_label/></td>
<td class="nowrap"><n.subscription.unsubscribe_button/></td>
</tr>
</n.loop.>
</table>
</then>
</n.if.has_more_elements>
</n.subscriptions.>
<n.subscribers_pagination/>
</override_macro>