profile_header

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "profile_header".
... in profile_header.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
<override_macro name="profile_header" requires="user">
    <n.set_local_user.this_user />
    <n.block.>
        <div class="second-font shaded-bg-color rounded" style="font-size:170%;padding:.2em .5em;margin-left:.1em">
            <n.local_user.name/>
        </div>
        <table>
            <tr valign="top">
                <td><n.local_user.avatar size="big"/></td>
                <td style="width:100%;padding-left:.5em">
                    <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">
                        <then>
                            <strong>Email</strong>: <n.local_user.user_email/>
                        </then>
                    </n.if.both>
                    <n.if.local_user.is_banned>
                        <then>
                            <n.local_user.banned_label/>
                        </then>
                        <else>
                            <n.local_user.registration_label/>
                            <n.local_user.list_current_groups/>
                            
                            <!-- não é necessário pois os admin também foram incluidos no grupo membros
                            <n.if.visitor.is_site_admin>
                                <then.local_user.send_email_to_user_link/>
                            </n.if.visitor.is_site_admin> -->
                            
                            <n.if.visitor.is_in_group group='Members'>
                                <then.local_user.send_email_to_user_link/>
                            </n.if.visitor.is_in_group>
                            
                        </else>
                    </n.if.local_user.is_banned>
                    <!-- If this is the profile of the visitor -->
                    <n.if.visitor.equals.local_user>
                        <then>
                            <!-- if the user is authenticated -->
                            <n.if.local_user.is_authenticated>
                                <then.local_user.authenticated_self_profile_header/>
                                <else>
                                    <div style="margin-top:.5em">
                                        <t><n.register_link.>Register now</n.register_link.> if you want to edit your profile, receive posts via email,control your starred items or have access to your global profile.</t>
                                    </div>
                                </else>
                            </n.if.local_user.is_authenticated>
                        </then>
                        <else>
                            <n.if.visitor.can_manage_banned_users>
                                <then>
                                    <div style="margin-top:.5em">
                                        <img src="/images/icon_blocked.png" class="image16" style="margin:0 1px"/>
                                        <n.if.local_user.is_banned>
                                            <then><a href="[n.local_user.unban_path/]"><t>Unban this user</t></a></then>
                                            <else><a href="[n.local_user.ban_path/]"><t>Ban this user</t></a></else>
                                        </n.if.local_user.is_banned>
                                    </div>
                                </then>
                            </n.if.visitor.can_manage_banned_users>
                        </else>
                    </n.if.visitor.equals.local_user>
                </td>
            </tr>
        </table>
    </n.block.>
</override_macro>
Overrides default macro
... in user_profile.naml
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
<macro name="profile_header" requires="user">
    <n.set_local_user.this_user />
    <n.block.>
        <div class="second-font shaded-bg-color rounded" style="font-size:170%;padding:.2em .5em;margin-left:.1em">
            <n.local_user.name/>
        </div>
        <table>
            <tr valign="top">
                <td><n.local_user.avatar size="big"/></td>
                <td style="width:100%;padding-left:.5em">
                    <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">
                        <then>
                            <strong>Email</strong>: <n.local_user.user_email/>
                        </then>
                    </n.if.both>
 
                    <n.if.local_user.is_banned>
                        <then>
                            <n.local_user.banned_label/>
                        </then>
                        <else>
                            <n.local_user.registration_label/>
                            <n.local_user.list_current_groups/>
                            <n.if.not.local_user.is_deactivated>
                                <then.local_user.send_email_to_user_link/>
                            </n.if.not.local_user.is_deactivated>
                        </else>
                    </n.if.local_user.is_banned>
 
                    <!-- If this is the profile of the visitor -->
                    <n.if.visitor.equals.local_user>
                        <then>
                            <!-- if the user is authenticated -->
                            <n.if.local_user.is_authenticated>
                                <then.local_user.authenticated_self_profile_header/>
                                <else>
                                    <div style="margin-top:.5em">
                                        <t><n.register_link.>Register now</n.register_link.> if you want to edit your profile, receive posts via email or have access to your global profile.</t>
                                    </div>
                                </else>
                            </n.if.local_user.is_authenticated>
                        </then>
                        <else>
                            <n.if.visitor.can_manage_banned_users>
                                <then>
                                    <div style="margin-top:.5em">
                                        <img src="/images/icon_blocked.png" class="image16" style="margin:0 1px"/>
                                        <n.if.local_user.is_banned>
                                            <then><a href="[n.local_user.unban_path/]"><t>Unban this user</t></a></then>
                                            <else><a href="[n.local_user.ban_path/]"><t>Ban this user</t></a></else>
                                        </n.if.local_user.is_banned>
                                    </div>
                                </then>
                            </n.if.visitor.can_manage_banned_users>
                        </else>
                    </n.if.visitor.equals.local_user>
                </td>
            </tr>
        </table>
    </n.block.>
</macro>