unsubscribe_user

NAML documentation   Watch a video
   Usages of this macro
... in unsubscribe_user.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<macro name="unsubscribe_user" requires="servlet">
     <n.node_page
Macro
Requires: servlet
Parameters: do
.>
         <n.set_local_user
Macro
Parameters: user
.get_user_from_id
Binary
Namespace: NabbleNamespace
Parameters: user_id, do
 user_id="[n.get_parameter
Binary
Namespace: RequestNamespace
Parameters: name
 name='user'/]" />
         <n.set_local_subscription
Macro
Parameters: subscription
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subscription_for
Binary
Namespace: NodeNamespace
Parameters: do, email
 email="[n.local_user
Macro
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/]" />
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
            <then>
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="remove-subscription" value2="[n.action_parameter
Macro
/]">
                    <then>
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_subscription
Macro
Parameters: do
.is_subscribed
Binary
Namespace: SubscriptionNamespace
>
                            <then.local_subscription
Macro
Parameters: do
.remove
Binary
Namespace: SubscriptionNamespace
/>
                        </n.if.local_subscription.is_subscribed>
                        <n.redirect_to
Binary
Namespace: ServletNamespace
Parameters: url
.subscription_removed_user_url
Macro
/>
                    </then>
                </n.if.equal>
            </then>
        </n.if.is_submitted_form>
        <n.html
Macro
Parameters: head, body
>
             <head>
                <n.title
Macro
Parameters: text
.><t>Unsubscribe</t></n.title.>
                <n.main_title_css
Macro
/>
            </head>
            <body>
                <n.local_user
Macro
Parameters: do
.profile_header
Macro
Requires: user
/>
                <br/> 
                <div class="shaded-bg-color rounded second-font main-title">
                    <t>Remove Subscription</t>
                </div>
                <div style="font-weight:bold;margin: 2em 0 1em">
                    <t>Do you really want to unsubscribe this user from <t.location><a href="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.url
Macro
Requires: node
Parameters: template, date, index_record
/]"><n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subject
Macro
Requires: node
/></a></t.location>?</t>
                </div>
    
                <n.unsubscription_form
Macro
Requires: node_page
/>
            </body> 
        </n.html>
    </n.node_page.>
</macro>