change_permissions

NAML documentation   Watch a video
   Usages of this macro
... in change_permissions.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
<macro name="change_permissions" requires="servlet">
    <n.node_page
Macro
Requires: servlet
Parameters: do
.>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.can_change_permissions_of
Macro
Requires: user
Parameters: node_attr
.page_node>
            <then>
                <n.login
Macro
Requires: servlet
Parameters: message
.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>
        </n.if.not.visitor.can_change_permissions_of.page_node>
 
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
            <then>
                <n.save_all_permissions
Macro
/>
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.is_root
Binary
Namespace: NodeNamespace
>
                    <then.save_all_site_permissions
Macro
 />
                </n.if.page_node.is_root>
                <n.redirect_to
Binary
Namespace: ServletNamespace
Parameters: url
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.path
Macro
Requires: node
Parameters: template, date, index_record
/>
            </then>
        </n.if.is_submitted_form>
 
        <n.html
Macro
Parameters: head, body
>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title
Macro
Parameters: text
.><t>Change Permissions</t></n.title.>
                <n.permission_javascript
Macro
/>
                <n.permission_stylesheet
Macro
/>
            </head>
            <body>
                <n.edit_header
Macro
Parameters: first_text, second_text
 first_text="[t]Change Permissions[/t]" second_text="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.get_app_node
Binary
Namespace: NodeNamespace
Parameters: do
.subject
Macro
Requires: node
/]" />
 
                <n.form
Macro
Requires: servlet
Parameters: macro, method, onsubmit, content
.>
                    <n.permissions_table
Macro
/>
 
                    <div style="margin-top:1.4em">
                        <input type="submit" value="[t]Save Changes[/t]" />
                        <t>or</t> <a href="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.path
Macro
Requires: node
Parameters: template, date, index_record
/]"><t>Cancel</t></a>
                    </div>
                </n.form.>
            </body>
        </n.html>
    </n.node_page.>
</macro>