source: trunk/skins/lemill/member_view.pt @ 469

Revision 469, 12.1 KB checked in by tarmo, 13 years ago (diff)

All strings in ZPTs are now i18n'd. Refs #524, spent 90m,
30m remaining. Need to fix i18n:domains still.

Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="lemill">
5
6<head>
7    <metal:block fill-slot="top_slot"
8                 tal:define="dummy python:request.set('disable_border',1)" />
9</head>
10
11<body>
12
13<metal:main fill-slot="main">
14    <tal:main-macro
15                    tal:define="thismember here/getId;
16                                portal_types portal/portal_types;
17                                thismemberinfo python: mtool.getMemberInfo(thismember);
18                                member_folder python: mtool.getHomeFolder(thismember);
19                                nicename member_folder/getNicename | nothing;">
20
21        <tal:noAuthor condition="not: thismemberinfo">
22            <div class="visualClear"><!-- --></div>
23            <div class="portalMessage" i18n:translate="text_no_user_by_name">
24                No user by that name
25            </div>
26        </tal:noAuthor>
27
28        <tal:haveAuthor condition="thismemberinfo">
29 
30    <div id="content"
31         class="documentEditable"
32         tal:define="showoptions python:member.getUserName()==thismember"
33         tal:attributes="class python: test(showoptions, 'documentEditable', '')">
34
35        <h5 class="hiddenStructure"
36            tal:condition="showoptions">Views</h5>
37       
38        <ul tal:condition="showoptions">
39          <li tal:condition="python: 'Manager' in member.getRolesInContext(here)">
40            <img src="zope_icon.gif" alt="" />
41            <a href=""
42               tal:attributes="href string:${portal_url}/plone_memberprefs_panel"
43               i18n:translate="label_edit">Manage this LeMill site</a>
44          </li>
45          <li>
46            <img src="lock_icon.gif" alt="" />
47            <a href=""
48               tal:attributes="href string: ${portal_url}/password_form"
49               i18n:translate="label_view">Change password</a>
50          </li>
51          <li>
52            <img src="user.gif" alt="" />
53            <a href=""
54               tal:attributes="href string:${portal_url}/personalize_form"
55               i18n:translate="label_edit">Edit your information</a>
56          </li>
57        </ul>
58
59        <div id="region-content"
60            tal:define="portrait python:mtool.getPersonalPortrait(thismember);
61                portrait_url portrait/absolute_url | nothing;
62                fullname member_folder/getFullname | nothing;
63                nickname member_folder/getNickname | nothing;               
64                email member_folder/getEmail | nothing;
65                phone member_folder/getPhone | nothing;
66                mobile member_folder/getMobile | nothing;
67                messenger1 member_folder/getMessenger1 | nothing;
68                messenger2 member_folder/getMessenger2 | nothing;
69                messenger3 member_folder/getMessenger3 | nothing;
70                home_page member_folder/getHome_page | nothing;
71                location_country member_folder/getLocation_country | nothing;
72                location_area member_folder/getLocation_area | nothing;
73                language_skills member_folder/getLanguage_skills | nothing;
74                skills member_folder/getSkills | nothing;
75                interests member_folder/getInterests | nothing;
76                biography member_folder/getBiography | nothing;
77                activity_score member_folder/getActivity_score | nothing">
78
79            <a name="documentContent"></a>
80                   
81            <!-- Author information -->
82            <h1 class="documentFirstHeading" tal:condition="python: nickname and fullname"
83                                                tal:content="string: ${nickname} (${fullname})">
84               nickname (fullname)
85            </h1>
86            <h1 class="documentFirstHeading" tal:condition="python: nickname and not fullname"
87                                                tal:content="nickname">
88               nickname
89            </h1>
90            <h1 class="documentFirstHeading" tal:condition="python: not nickname and fullname"
91                                                tal:content="fullname">
92               fullname
93            </h1>
94            <h1 class="documentFirstHeading" tal:condition="python: not nickname and not fullname"
95                                                tal:content="thismember">
96               memberid
97            </h1>
98
99
100            <img src=""
101                 alt=""
102                 class="portraitPhoto"
103                 width="160"
104                 height="120"
105                 style="float: top; margin: 1em;"
106                 tal:attributes="src portrait_url" />
107            <h2 i18n:translate="heading_contact_information">
108                    Contact information
109            </h2>
110            <br/>
111            <div tal:condition="not:isAnon" tal:omit-tag="">
112                <span tal:condition="email" tal:omit-tag="">
113                    <p i18n:translate="email">E-mail:
114                        <a tal:attributes="href python:'mailto:' + email" tal:content="email">email</a>
115                     </p>
116                </span>
117                <span tal:condition="phone" tal:omit-tag="">
118                    <p i18n:translate="label_phone">Phone: <b tal:replace="phone"/></p>
119                </span>
120                <span tal:condition="mobile" tal:omit-tag="">
121                    <p i18n:translate="label_mobile"
122                        tal:define="sms python:test(mobile.startswith('*SMS*'),True, False);
123                            mobile python:test(mobile.startswith('*SMS*'), mobile[5:], mobile)">Mobile: <b tal:replace="mobile"/>
124                            <b tal:condition="sms" tal:omit-tag="">(You may SMS me.)</b>
125                     </p>
126                </span>
127
128
129                <span tal:condition="python:messenger1 or messenger2 or messenger3" tal:omit-tag="">
130                    <p i18n:translate="label_messenger">Messengers:<br />
131                        <span tal:condition="messenger1" tal:omit-tag="">
132                            <a tal:attributes="href messenger1" tal:content="messenger1" href="messenger">messenger1</a><br />
133                        </span>
134                        <span tal:condition="messenger2" tal:omit-tag="">
135                            <a tal:attributes="href messenger2" tal:content="messenger2" href="messenger">messenger2</a><br />
136                        </span>
137                        <span tal:condition="messenger3" tal:omit-tag="">
138                            <a tal:attributes="href messenger3" tal:content="messenger3" href="messenger">messenger3</a><br />
139                        </span>
140                    </p>
141                </span>
142                <span tal:condition="home_page" tal:omit-tag="">
143                    <p i18n:translate="label_home_page">Homepage:
144                        <a href="#" tal:attributes="href home_page"
145                            i18n:translate="label_author_external_home_page">Author's external home page&hellip;</a>
146                    </p>
147                </span>
148
149                <span tal:condition="python: location_country and location_country!='No country specified'" tal:omit-tag="">
150                    <p i18n:translate="label_country">Country:
151                        <a href="#" tal:attributes="href string:$here_url/search?SearchableText=${location_country}&amp;portal_type=MemberFolder" tal:content="location_country">Country</a>
152                    </p>
153                </span>
154
155                <span tal:condition="location_area" tal:omit-tag="">
156                    <p i18n:translate="label_area">Area:
157                        <a href="#" tal:attributes="href string:$here_url/search?SearchableText=${location_area}&amp;portal_type=MemberFolder" tal:content="location_area">Area</a>
158                    </p>
159                </span>
160
161                <span tal:condition="language_skills" tal:omit-tag="">
162                    <p><tal:block i18n:translate="label_language_skills">Preferred languages:</tal:block>
163                        <span tal:repeat="languagename language_skills" tal:omit-tag="">
164                           <a href="#" tal:attributes="href string:$here_url/search?getLanguage_skills=${languagename}&amp;portal_type=MemberFolder" tal:content="python:here.script_getPrettyLanguage(languagename)">PLACEHOLDER</a>
165                           <span tal:condition="not: repeat/languagename/end" tal:omit-tag="">, </span>
166                        </span>
167                    </p>
168                </span>
169
170                <span tal:condition="skills" tal:omit-tag="">
171                    <p><tal:block i18n:translate="label_skills">Skills:</tal:block>
172                        <span tal:repeat="skill skills" tal:omit-tag="">
173                           <a href="#" tal:attributes="href string:$here_url/search?getTags=${skill}&amp;portal_type=MemberFolder" tal:content="skill">PLACEHOLDER</a>
174                           <span tal:condition="not: repeat/skill/end" tal:omit-tag="">, </span>
175                        </span>
176                    </p>
177                </span>
178
179                <span tal:condition="interests" tal:omit-tag="">
180                    <p><tal:block i18n:translate="label_interests">Interests:</tal:block>
181                        <span tal:repeat="interest interests" tal:omit-tag="">
182                           <a href="#" tal:attributes="href string:$here_url/search?getTags=${interest}&amp;portal_type=MemberFolder" tal:content="interest">PLACEHOLDER</a>
183                           <span tal:condition="not: repeat/interest/end" tal:omit-tag="">, </span>
184                        </span>
185                    </p>
186                </span>                   
187
188                <span tal:condition="biography" tal:omit-tag="">
189                    <p><tal:block i18n:translate="label_biography">Biography:</tal:block>
190                        <span tal:replace="biography" />
191                    </p>
192                </span>                   
193
194                <span tal:condition="activity_score" tal:omit-tag="">
195                    <p><tal:block i18n:translate="label_activity_score">Activity score:</tal:block>
196                        <span tal:replace="activity_score" />
197                    </p>
198                </span>                   
199
200               
201            </div>
202            <div tal:condition="isAnon" tal:omit-tag="">
203                <p i18n:translate="label_not_logged_in">
204                    If you want to see these informations, you should log in!
205                </p>
206            </div>
207
208            <tal:authorContent define="author_content python:here.my_works(stay=True);
209                    content_n python:len(author_content);
210                    collections_n python:len(here.getCollections());
211                    stories_n python:len(here.getStories());
212                    ">
213                <h2 i18n:translate="heading_portfolio" tal:condition="python: content_n>0 or collections_n>0 or stories_n>0">
214                Portfolio
215                </h2>
216                <a href="" tal:condition="python: content_n>0"
217                   tal:attributes="href string:$here_url/my_works"
218                   i18n:translate="go_to_search_author_content">
219                    All resources created by
220                    <span tal:content="python: '%s (%s)' % (nicename, content_n)">name(amount)</span>
221                </a>
222                <br />
223                <a href="" tal:condition="python: collections_n>0"
224                    tal:attributes="href string:$portal_url/community/${thismember}/collections"
225                    i18n:translate="go_to_users_collections">
226                    Collections created by
227                    <span tal:content="python: '%s (%s)' % (nicename, collections_n)">name(amount)</span>
228                </a>
229                <br />
230                <a href="" tal:condition="python: stories_n>0"
231                    tal:attributes="href string:$portal_url/community/${thismember}/stories"
232                    i18n:translate="go_to_users_story">
233                    Stories created by
234                    <span tal:content="python: '%s (%s)' % (nicename, stories_n)">name(amount)</span>
235                </a>
236
237            </tal:authorContent>
238
239        </div>
240    </div> <!-- end simulated tabs -->
241       
242    </tal:haveAuthor>
243
244    </tal:main-macro>
245
246</metal:main>
247
248</body>
249</html>
250
Note: See TracBrowser for help on using the repository browser.