process_invited_emails

NAML documentation   Watch a video
   Usages of this macro
... in invite_subscribers.naml
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<macro name="process_invited_emails">
    <div class="second-font field-title">
        <t>Subscription Results</t>
    </div>
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.invited_emails
Macro
Requires: servlet
>
        <then>
            <n.string_list
Binary
Namespace: BasicNamespace
Parameters: trim, values, do, separator
. values="[n.invited_emails
Macro
Requires: servlet
/]" separator="\n">
                <table>
                    <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
                        <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name='email'>
                            <n.get_email_address_from
Macro
Parameters: text
.current_string
Binary
Namespace: StringList
/>
                        </n.set_var.>
 
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_empty
Binary
Namespace: BasicNamespace
Parameters: value
.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='email'>
                            <then>
                                <n.set_local_subscription
Macro
Parameters: subscription
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subscription_for
Binary
Namespace: NodeNamespace
Parameters: do, email
 email="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='email'/]" />
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.local_subscription
Macro
Parameters: do
.is_subscribed
Binary
Namespace: SubscriptionNamespace
>
                                    <then.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_subscription
Macro
Parameters: do
.user
Binary
Namespace: SubscriptionNamespace
Parameters: do
.can_view
Macro
Requires: user
Parameters: node_attr
.local_subscription
Macro
Parameters: do
.node
Binary
Namespace: SubscriptionNamespace
Parameters: do
>
                                        <then>
                                            <n.local_subscription
Macro
Parameters: do
.send_subscription_invite
Macro
Requires: subscription, node_page, servlet
/>
                                            <n.row_success
Macro
Parameters: explaination, text
.current_string
Binary
Namespace: StringList
/>
                                        </then>
                                        <else.row_failed
Macro
Parameters: explaination, text
 text="[n.current_string
Binary
Namespace: StringList
/]" explaination="[t]This user doesn't have permission to view this application (add him/her to a group that allows this and try again)[/t]"/>
                                    </then.if.local_subscription.user.can_view.local_subscription.node>
                                    <else.row_success
Macro
Parameters: explaination, text
 text="[n.current_string
Binary
Namespace: StringList
/]" explaination="[t]Already subscribed[/t]"/>
                                </n.if.not.local_subscription.is_subscribed>
                            </then>
                            <else.row_failed
Macro
Parameters: explaination, text
.current_string
Binary
Namespace: StringList
/>
                        </n.if.not.is_empty.var>
                    </n.loop.>
                </table>
            </n.string_list.>
        </then>
    </n.if.not.is_null.invited_emails>
</macro>