list_subscribers

NAML documentation   Watch a video
   Usages of this macro
... in manage_subscribers.naml
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<macro name="list_subscribers" requires="node">
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
        <then.process_unsubscription
Macro
/>
    </n.if.is_submitted_form>
 
    <n.put_in_head
Binary
Namespace: HtmlNamespace
Parameters: 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
Macro
Parameters: table_selector
 table_selector="table.subscriptions"/>
 
    <n.subscribers_pagination
Macro
Requires: node_page
/>
 
    <div class="weak-color" style="float:left;margin:.5em 0">
        <n.one_or_many
Macro
Parameters: many_text, one_text, n
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subscription_count
Binary
Namespace: NodeNamespace
>
            <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
Binary
Namespace: NodeNamespace
Parameters: length, start, do
. start="[n.subscriber_page_index_record
Macro
Requires: servlet
/]" length="[n.subscriber_page_length
Macro
Requires: servlet
/]">
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.has_more_elements
Binary
Namespace: ListSequence
Parameters: n
>
            <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
Macro
Requires: sequence
Parameters: by, do
.>
                        <tr>
                            <td style="width:30px;padding:0"><n.subscription
Binary
Namespace: SubscriptionList
Parameters: do
.user
Binary
Namespace: SubscriptionNamespace
Parameters: do
.avatar
Macro
Requires: user
Parameters: size, border_class, group
/></td>
                            <td class="nowrap"><n.subscription
Binary
Namespace: SubscriptionList
Parameters: do
.user
Binary
Namespace: SubscriptionNamespace
Parameters: do
.user_link
Macro
Requires: user
Parameters: title, class
/></td>
                            <td class="nowrap"><n.subscription
Binary
Namespace: SubscriptionList
Parameters: do
.user
Binary
Namespace: SubscriptionNamespace
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/></td>
                            <td class="nowrap"><n.subscription
Binary
Namespace: SubscriptionList
Parameters: do
.type_label
Macro
Requires: subscription
/></td>
                            <td class="nowrap"><n.subscription
Binary
Namespace: SubscriptionList
Parameters: do
.unsubscribe_button
Macro
Requires: subscription
/></td>
                        </tr>
                    </n.loop.>
                </table>
            </then>
        </n.if.has_more_elements>
    </n.subscriptions.>
 
    <n.subscribers_pagination
Macro
Requires: node_page
/>
</macro>