menu_manage_users_and_groups

NAML documentation   Watch a video
   Usages of this macro
... in menu_manage_users_and_groups.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<override_macro name="menu_manage_users_and_groups" requires="node">  
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_in_command
Binary
Namespace: BasicNamespace
Parameters: name
 name="dropdown">  
        <then>  
             dropdown.add('manageGroups', '<n.javascript_string_encode
Binary
Namespace: NabbleNamespace
Parameters: text
.manage_users_and_groups_link
Macro
Parameters: text, title, class
/>', 'display:none');  
        </then>  
        <else>  
            <n.set_local_node
Macro
Parameters: node
.this_node
Binary
Namespace: NodeNamespace
Parameters: do
/>  
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.local_node
Macro
Parameters: do
.is_root
Binary
Namespace: NodeNamespace
/]" condition2="[n.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.can_manage_users_and_groups
Macro
Requires: user
/]">  
                <then>  
                    NabbleDropdown.show('manageGroups');  
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group="NewsAdmin" >  
                        <then>  
                            $(document).ready(function() {  
                            var group = $("#manageGroups a").attr("href");  
                            $("#manageGroups a").attr("href",group+"&group=Newsletter Co-op");                           
                            });  
                        </then>  
                    </n.if.visitor.is_in_group>  
                </then>  
            </n.if.both>  
        </else>  
    </n.if.is_in_command>  
</override_macro>
Overrides default macro
... in dropdown.naml
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
<macro name="menu_manage_users_and_groups" requires="node">
    <n.if.is_in_command name="dropdown">
        <then>
            dropdown.add('manageGroups', '<n.javascript_string_encode.manage_users_and_groups_link/>', 'display:none');
        </then>
        <else>
            <n.set_local_node.this_node/>
            <n.if.both condition1="[n.local_node.is_root/]" condition2="[n.visitor.can_manage_users_and_groups/]">
                <then>
                    NabbleDropdown.show('manageGroups');
                </then>
            </n.if.both>
        </else>
    </n.if.is_in_command>
</macro>