profile_header

NAML documentation   Watch a video
   Usages of this 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
Macro
Parameters: user
.this_user
Binary
Namespace: UserNamespace
Parameters: do
 />
    <n.block
Binary
Namespace: BasicNamespace
Parameters: do
.>
        <div class="second-font shaded-bg-color rounded" style="font-size:170%;padding:.2em .5em;margin-left:.1em">
            <n.local_user
Macro
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
/>
        </div>
        <table>
            <tr valign="top">
                <td><n.local_user
Macro
Parameters: do
.avatar
Macro
Requires: user
Parameters: size, border_class, group
 size="big"/></td>
                <td style="width:100%;padding-left:.5em">
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_site_admin
Macro
Requires: user
/]" condition2="[n.local_user
Macro
Parameters: do
.is_authenticated
Binary
Namespace: UserNamespace
/]">
                        <then>
                            <strong>Email</strong>: <n.local_user
Macro
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/>
                        </then>
                    </n.if.both>
 
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_banned
Binary
Namespace: UserNamespace
>
                        <then>
                            <n.local_user
Macro
Parameters: do
.banned_label
Macro
Requires: user
/>
                        </then>
                        <else>
                            <n.local_user
Macro
Parameters: do
.registration_label
Macro
Requires: user
/>
                            <n.local_user
Macro
Parameters: do
.list_current_groups
Macro
Requires: user
/>
                            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.local_user
Macro
Parameters: do
.is_deactivated
Binary
Namespace: UserNamespace
>
                                <then.local_user
Macro
Parameters: do
.send_email_to_user_link
Macro
Requires: user
/>
                            </n.if.not.local_user.is_deactivated>
                        </else>
                    </n.if.local_user.is_banned>
 
                    <!-- If this is the profile of the visitor -->
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.equals
Binary
Namespace: UserNamespace
Parameters: user
.local_user
Macro
Parameters: do
>
                        <then>
                            <!-- if the user is authenticated -->
                            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_authenticated
Binary
Namespace: UserNamespace
>
                                <then.local_user
Macro
Parameters: do
.authenticated_self_profile_header
Macro
Requires: user
/>
                                <else>
                                    <div style="margin-top:.5em">
                                        <t><n.register_link
Macro
Parameters: text, title
.>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
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.can_manage_banned_users
Macro
Requires: user
>
                                <then>
                                    <div style="margin-top:.5em">
                                        <img src="/images/icon_blocked.png" class="image16" style="margin:0 1px"/>
                                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_user
Macro
Parameters: do
.is_banned
Binary
Namespace: UserNamespace
>
                                            <then><a href="[n.local_user
Macro
Parameters: do
.unban_path
Macro
Requires: user
/]"><t>Unban this user</t></a></then>
                                            <else><a href="[n.local_user
Macro
Parameters: do
.ban_path
Macro
Requires: user
/]"><t
Macro
>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>