unauthorized

NAML documentation   Watch a video
   Usages of this macro
... in unauthorized.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<override_macro name="unauthorized" requires="servlet">
    <n.node_page
Macro
Requires: servlet
Parameters: do
.>
        <n.html
Macro
Parameters: head, body
>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title
Macro
Parameters: text
.><t>Unauthorized</t></n.title.>
            </head>
            <body>
                <div style="font-size:140%;margin:.5em 0 1em">
                    Read-Only Archive
                </div>
                You cannot post here. This is a read-only archive.
            </body>
        </n.html>
    </n.node_page.>
</override_macro>
Overrides default macro
... in unauthorized.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
37
38
39
40
41
42
43
44
45
46
47
48
49
<macro name="unauthorized" requires="servlet">
    <n.node_page.>
        <n.if.is_submitted_form>
            <then>
                <n.users_in_group. group="[n.administrators_group/]">
                    <n.loop.>
                        <n.current_user.send_request_email
                            explanation="[n.message_field.value/]"
                        />
                    </n.loop.>
                </n.users_in_group.>
            </then>
        </n.if.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Unauthorized</t></n.title.>
            </head>
            <body>
                <div style="font-size:140%;margin:.5em 0 1em">
                    <t>Authorized Users Only</t>
                </div>
                <t>Only authorized users can proceed in this area.</t>
                <t>You can use the form below to send a request to the administrators.</t>
                <div class="second-font big-title" style="margin:1.5em 0 .5em">
                    <t>Access Request</t>
                </div>
                <n.if.not.is_submitted_form>
                    <then>
                        <div class="weak-color" style="margin:.3em 0">
                            <t>Explain to the administrator(s) why you want to access this restricted area.</t>
                        </div>
                        <n.form.>
                            <n.message_field.textarea wrap="SOFT" style="width:35em;height:5em;" />
                            <n.message_field.focus/>
                            <br/>
                            <input type="submit" id="send-request" value="[t]Send Request[/t]"/>
                            <t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
                        </n.form.>
                    </then>
                    <else>
                        <img src="/images/success.png" class="image16"/>
                        <t>Your request has been successfully sent.</t>
                    </else>
                </n.if.not.is_submitted_form>
            </body>
        </n.html>
    </n.node_page.>
</macro>