list_current_groups

NAML documentation   Watch a video
   Usages of this macro
... in list_current_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
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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<override_macro name="list_current_groups" requires="user">
    <!-- List the groups of the user-->
    <n.set_local_user
Macro
Parameters: user
.this_user
Binary
Namespace: UserNamespace
Parameters: do
 />
    <div style="margin-top:.7em">
        <h4><t>Rank:</t></h4>
    </div>
    <n.local_user
Macro
Parameters: do
.groups
Binary
Namespace: UserNamespace
Parameters: do
.>
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum System'>
                            <then>
                                <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                    <span class="weak-color" style="color:#7F7E7E;">The</span>
                                    <span class="weak-color" style="color:white;font-weight: bold;">Sni</span><span class="weak-color" style="color:#FFCB05;font-weight: bold;">:</span><span class="weak-color" style="color:#00EC3D;font-weight: bold;">{</span><span class="weak-color" style="color:white;font-weight: bold;">Per</span><span class="weak-color" style="color:#00DDE5;font-weight: bold;">}</span><span class="weak-color" style="color:#FFCB05;font-weight: bold;">:</span><span class="weak-color" style="color:white;font-weight: bold;">Jum</span>
                                    <span class="weak-color" style="color:#7F7E7E;">Clan</span>
                                </div>
                            </then>
                            <else>
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Founders'>
                            <then>
                                        <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                            <span class="weak-color" style="color:#E8C529;">-·=·</span>
                                            <span class="weak-color" style="color:white;">Co-Founder</span>
                                            <span class="weak-color" style="color:#E8C529;">·=·-</span>
                                        </div>
                            </then>
                            <else>
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Head Founder'>
                                    <then>
                                        <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                            <span class="weak-color" style="color:#E8C529;">-·=·:</span>
                                            <span class="weak-color" style="color:white;">Founder</span>
                                            <span class="weak-color" style="color:#E8C529;">:·=·-</span>
                                        </div>
                                    </then>
                                    <else>
                                         <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='Leaders'>
                                            <then>
                                                <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                    <span class="weak-color" style="color:#E8C529;">-·=·</span>
                                                    <span class="weak-color" style="color:white;">Leader</span>
                                                    <span class="weak-color" style="color:#E8C529;">·=·-</span>
                                                </div>
                                            </then>
                                            <else>
                                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Senior Admins'>
                                            <then>
                                                <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                    <span class="weak-color" style="color:#E8C529;">-=</span>
                                                    <span class="weak-color" style="color:white;">Senior Admin</span>
                                                    <span class="weak-color" style="color:#E8C529;">=-</span>
                                                </div>
                                            </then>
                                            <else>
                                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Full Admins'>
                                                    <then>
                                                        <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                            <span class="weak-color" style="color:#9A831B;">·=</span>
                                                            <span class="weak-color" style="color:white;">Full Admin</span>
                                                            <span class="weak-color" style="color:#9A831B;">=·</span>
                                                        </div>
                                                    </then>
                                                    <else>
                                                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Admins'>
                                                            <then>
                                                                <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                                    <span class="weak-color" style="color:#4D410D;">=</span>
                                                                    <span class="weak-color" style="color:white;">Admin</span>
                                                                    <span class="weak-color" style="color:#4D410D;">=</span>
                                                                </div>
                                                            </then>
                                                            <else>
                                                               <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Moderators'>
                                                                   <then>
                                                                       <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                                           <span class="weak-color" style="color:#4D410D;">-</span>
                                                                           <span class="weak-color" style="color:white;">Moderator</span>
                                                                           <span class="weak-color" style="color:#9A831B;">-</span>
                                                                       </div>
                                                                   </then>
                                                                   <else>
                                                                       <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Recruits'>
                                                                           <then>
                                                                               <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                                                   <span class="weak-color" style="color:white;">Recruit</span>
                                                                               </div>
                                                                           </then>
                                                                           <else>
                                                                       <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='Members'>
                                                                           <then>
                                                                               <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                                                   <span class="weak-color" style="color:#4D410D;">·</span>
                                                                                   <span class="weak-color" style="color:white;">Member</span>
                                                                                   <span class="weak-color" style="color:#4D410D;">·</span>
                                                                               </div>
                                                                           </then>
                                                                           <else>
                                                                               <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_registered
Binary
Namespace: UserNamespace
>
                                                                                   <then>
                                                                                       <div class="weak-color" style="color:white;margin-top: .1em;margin-left: .3em;">
                                                                                           <span class="weak-color" style="color:#BABABA;">Registered</span>
                                                                                       </div>
                                                                                   </then>
                                                                               </n.if.local_user.is_registered>
                                                                           </else>
                                                                               </n.if.local_user.is_in_group>
                                                                           </else>
                                                                      </n.if.local_user.is_in_group>
                                                                   </else>
                                                                </n.if.local_user.is_in_group>
                                                            </else>
                                                        </n.if.local_user.is_in_group>
                                                    </else>
                                                    </n.if.local_user.is_in_group>
                                            </else>
                                                </n.if.local_user.is_in_group>
                                            </else>
                                        </n.if.local_user.is_in_group>
                                    </else>
                                    </n.if.local_user.is_in_group>
                            </else>
                                </n.if.local_user.is_in_group>
                            </else>
        </n.if.local_user.is_in_group>
    </n.local_user.groups.>
    <n.local_user
Macro
Parameters: do
.groups
Binary
Namespace: UserNamespace
Parameters: do
.>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Founders'>
            <then>
            </then>
            <else>
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum System'>
                    <then>
                    </then>
                    <else>
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='SniPerJum Head Founder'>
                    <then>
                    </then>
                    <else>
        <div style="margin-top:.7em">
            <h4><t>Departaments Rank:</t></h4>
        </div>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='Head Anti-Cheat'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Head Anti-Cheat</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Anti-Cheat'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Anti-Cheat Staff</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Technology'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Technology Staff</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Recruiting'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Recruiter</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Helpers'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Helper</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Scrims'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Scrim Staff</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Public Relationships'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Public Relationships Staff</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Mapping'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Mapping Staff</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group='D. Creative'>
            <then>
                <div style="margin-top:.7em">
                    <h5 style="color: rgba(0, 187, 142, 0.5);font-size: .9em;">
                        <span class="weak-color" style="color:white;font-family: comfortaa;padding-left: 1em;">·</span>
                        Creative</h5>
                </div>
            </then>
        </n.if.local_user.is_in_group>
    </else>
    </n.if.local_user.is_in_group>
                </else>
    </n.if.local_user.is_in_group>
    </else>
    </n.if.local_user.is_in_group>
    </n.local_user.groups.>
</override_macro>
Overrides default macro
... in user_profile.naml
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<macro name="list_current_groups" requires="user">
    <!-- List the groups of the user-->
    <n.set_local_user.this_user />
    <div style="margin-top:.4em">
        <strong><t>Groups</t>:</strong>
        <n.local_user.groups.>
            <n.sort/>
            <n.loop.>
                <n.if.has_more_elements>
                    <then><n.current_group/>,&nbsp;</then>
                    <else><n.current_group/></else>
                </n.if.has_more_elements>
            </n.loop.>
        </n.local_user.groups.>
        <n.if.visitor.is_site_admin>
            <then>
                <div style="margin-top:.3em">
                    <img src="/images/user_group.png" align="absmiddle" width="18" height="16"/>
                    <a href="[n.local_user.change_user_groups_path/]"><t>Add / Remove Groups</t></a>
                    | <a href="[n.local_user.edit_profile_path/]"><t>Edit Profile</t></a>
                </div>
            </then>
        </n.if.visitor.is_site_admin>
    </div>
</macro>