Mercurial Hosting > nabble
comparison src/nabble/view/naml/user_profile.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children | 72765b66e2c3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <macro name="user_profile" requires="servlet"> | |
2 <n.visitor.as_user_page.> | |
3 <n.if.not.page_user.is_authenticated> | |
4 <then> | |
5 <n.login.><t>You must login to view this page.</t></n.login.> | |
6 </then> | |
7 </n.if.not.page_user.is_authenticated> | |
8 <n.html> | |
9 <head> | |
10 <META NAME="robots" CONTENT="noindex,nofollow"/> | |
11 <n.title.>Profile of <n.visitor.name/></n.title.> | |
12 <n.zebra_table_javascript table_selector="table.profile"/> | |
13 </head> | |
14 <body> | |
15 <n.page_user.profile_header/> | |
16 <n.profile_options/> | |
17 </body> | |
18 </n.html> | |
19 </n.visitor.as_user_page.> | |
20 </macro> | |
21 | |
22 <macro name="profile_options"> | |
23 <n.put_in_head.> | |
24 <style type="text/css"> | |
25 table.profile { | |
26 border-collapse:collapse; | |
27 width:100%; | |
28 margin-top:.5em; | |
29 } | |
30 table.profile td { | |
31 padding:.7em .3em; | |
32 } | |
33 table.profile td.title-row { | |
34 background: transparent; | |
35 padding:.2em .4em; | |
36 border-bottom-width:2px; | |
37 border-bottom-style:solid; | |
38 font-weight:bold; | |
39 } | |
40 </style> | |
41 </n.put_in_head.> | |
42 <table class="profile"> | |
43 <n.profile_table_header.> | |
44 <t>Account Settings</t> | |
45 </n.profile_table_header.> | |
46 | |
47 <n.profile_option> | |
48 <link><a href="[n.visitor.edit_profile_path/]"><t>Edit Personal Information</t></a></link> | |
49 <hint><t>Change your registered email address, password, and your user name.</t></hint> | |
50 </n.profile_option> | |
51 | |
52 <n.profile_option> | |
53 <link><a href="[n.visitor.edit_signature_path/]"><t>Edit Your Signature</t></a></link> | |
54 <hint><t>Change the signature text that is displayed at the bottom of your posts.</t></hint> | |
55 </n.profile_option> | |
56 | |
57 <n.profile_option> | |
58 <link><a href="[n.visitor.change_avatar_path/]"><t>Change Your Picture</t></a></link> | |
59 <hint><t>Change or remove your avatar image.</t></hint> | |
60 </n.profile_option> | |
61 | |
62 <n.profile_option> | |
63 <link><a href="[n.visitor.advanced_settings_path/]"><t>Advanced Settings</t></a></link> | |
64 <hint><t>Change viewing preferences and other settings.</t></hint> | |
65 </n.profile_option> | |
66 | |
67 <n.profile_option> | |
68 <link><a href="[n.visitor.remove_account_path/]"><t>Remove Your Account</t></a></link> | |
69 <hint><t>Remove your account and all your posts from <t.subject><n.root_node.subject/></t.subject>.</t></hint> | |
70 </n.profile_option> | |
71 </table> | |
72 </macro> | |
73 | |
74 <macro name="profile_table_header" dot_parameter="text"> | |
75 <tr> | |
76 <td class="title-row medium-border-color" colspan="2"> | |
77 <n.text/> | |
78 </td> | |
79 </tr> | |
80 </macro> | |
81 | |
82 <macro name="profile_option" parameters="link, hint"> | |
83 <tr> | |
84 <td style="width:14em"> | |
85 <n.link/> | |
86 </td> | |
87 <td class="weak-color"> | |
88 <n.hint/> | |
89 </td> | |
90 </tr> | |
91 </macro> | |
92 | |
93 <macro name="profile_header" requires="user"> | |
94 <n.set_local_user.this_user /> | |
95 <n.block.> | |
96 <div class="second-font shaded-bg-color rounded" style="font-size:170%;padding:.2em .5em;margin-left:.1em"> | |
97 <n.local_user.name/> | |
98 </div> | |
99 <table> | |
100 <tr valign="top"> | |
101 <td><n.local_user.avatar size="big"/></td> | |
102 <td style="width:100%;padding-left:.5em"> | |
103 <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]"> | |
104 <then> | |
105 <strong>Email</strong>: <n.local_user.user_email/> | |
106 </then> | |
107 </n.if.both> | |
108 | |
109 <n.if.local_user.is_banned> | |
110 <then> | |
111 <n.local_user.banned_label/> | |
112 </then> | |
113 <else> | |
114 <n.local_user.registration_label/> | |
115 <n.local_user.list_current_groups/> | |
116 <n.if.not.local_user.is_deactivated> | |
117 <then.local_user.send_email_to_user_link/> | |
118 </n.if.not.local_user.is_deactivated> | |
119 </else> | |
120 </n.if.local_user.is_banned> | |
121 | |
122 <!-- If this is the profile of the visitor --> | |
123 <n.if.visitor.equals.local_user> | |
124 <then> | |
125 <!-- if the user is authenticated --> | |
126 <n.if.local_user.is_authenticated> | |
127 <then.local_user.authenticated_self_profile_header/> | |
128 <else> | |
129 <div style="margin-top:.5em"> | |
130 <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> | |
131 </div> | |
132 </else> | |
133 </n.if.local_user.is_authenticated> | |
134 </then> | |
135 <else> | |
136 <n.if.visitor.can_manage_banned_users> | |
137 <then> | |
138 <div style="margin-top:.5em"> | |
139 <img src="/images/icon_blocked.png" class="image16" style="margin:0 1px"/> | |
140 <n.if.local_user.is_banned> | |
141 <then><a href="[n.local_user.unban_path/]"><t>Unban this user</t></a></then> | |
142 <else><a href="[n.local_user.ban_path/]"><t>Ban this user</t></a></else> | |
143 </n.if.local_user.is_banned> | |
144 </div> | |
145 </then> | |
146 </n.if.visitor.can_manage_banned_users> | |
147 </else> | |
148 </n.if.visitor.equals.local_user> | |
149 </td> | |
150 </tr> | |
151 </table> | |
152 </n.block.> | |
153 </macro> | |
154 | |
155 <macro name="authenticated_self_profile_header" requires="user"> | |
156 <!-- Show basic profile links --> | |
157 <n.if.not.equal value1="[n.get_parameter name='macro'/]" value2="user_profile"> | |
158 <then> | |
159 <div style="margin-top:.5em"> | |
160 <img src="/images/tool.png" align="absmiddle" width="16" height="17" style="margin:0 1px"/> | |
161 <a href="[n.user_profile_path/]"><t>Account Settings</t></a> | |
162 </div> | |
163 </then> | |
164 </n.if.not.equal> | |
165 | |
166 <n.if.root_node.has_sub_archive> | |
167 <then> | |
168 <div style="margin-top:.5em"> | |
169 <img src="/images/icon_pending.png" class="image16" style="margin:0 1px" /> | |
170 <a href="[n.pending_posts_path/]"><t>My Pending Posts</t></a> | |
171 </div> | |
172 </then> | |
173 </n.if.root_node.has_sub_archive> | |
174 | |
175 <div style="margin-top:.5em"> | |
176 <img src="/images/forum_sm.png" class="image16" style="margin:0 1px"/> | |
177 <a href="[n.nabble_global_apps_url/]" target="_top"><t>My Nabble Applications</t></a> | |
178 </div> | |
179 </macro> | |
180 | |
181 <macro name="banned_label" requires="user"> | |
182 <div style="margin-top:.4em"> | |
183 <strong><t>Banned User</t></strong> | |
184 </div> | |
185 </macro> | |
186 | |
187 <macro name="registration_label" requires="user"> | |
188 <div style="margin-top:.4em"> | |
189 <n.if.is_registered> | |
190 <then><strong><t>Registered</t></strong>: <n.registration_date.date_only/></then> | |
191 <else><strong><t>Unregistered User</t></strong></else> | |
192 </n.if.is_registered> | |
193 </div> | |
194 </macro> | |
195 | |
196 <macro name="list_current_groups" requires="user"> | |
197 <!-- List the groups of the user--> | |
198 <n.set_local_user.this_user /> | |
199 <div style="margin-top:.4em"> | |
200 <strong><t>Groups</t>:</strong> | |
201 <n.local_user.groups.> | |
202 <n.sort/> | |
203 <n.loop.> | |
204 <n.if.has_more_elements> | |
205 <then><n.current_group/>, </then> | |
206 <else><n.current_group/></else> | |
207 </n.if.has_more_elements> | |
208 </n.loop.> | |
209 </n.local_user.groups.> | |
210 <n.if.visitor.is_site_admin> | |
211 <then> | |
212 <div style="margin-top:.3em"> | |
213 <img src="/images/user_group.png" align="absmiddle" width="18" height="16"/> | |
214 <a href="[n.local_user.change_user_groups_path/]"><t>Add / Remove Groups</t></a> | |
215 | <a href="[n.local_user.edit_profile_path/]"><t>Edit Profile</t></a> | |
216 </div> | |
217 </then> | |
218 </n.if.visitor.is_site_admin> | |
219 </div> | |
220 </macro> | |
221 | |
222 <macro name="send_email_to_user_link" requires="user"> | |
223 <n.set_local_user.this_user /> | |
224 <!-- If this is not the profile of the visitor AND the user is authenticated --> | |
225 <n.if.both condition1="[n.not.visitor.equals.local_user/]" condition2="[n.local_user.is_authenticated/]"> | |
226 <then> | |
227 <div style="margin-top:.5em"> | |
228 <img src="/images/mail.png" align="absmiddle" width="18" height="13"/> | |
229 <a href="[n.local_user.send_email_path/]"><t>Send Email to <t.author.local_user.name/></t></a> | |
230 </div> | |
231 </then> | |
232 </n.if.both> | |
233 </macro> |