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

Revision 420, 11.6 KB checked in by jukka, 13 years ago (diff)

Fixed #491, spent 20min. Also fixed missing orange status bars when member-things are changed.

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="plone">
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
78            <a name="documentContent"></a>
79                   
80            <!-- Author information -->
81            <h1 class="documentFirstHeading" tal:condition="python: nickname and fullname"
82                                                tal:content="string: ${nickname} (${fullname})">
83               nickname (fullname)
84            </h1>
85            <h1 class="documentFirstHeading" tal:condition="python: nickname and not fullname"
86                                                tal:content="nickname">
87               nickname
88            </h1>
89            <h1 class="documentFirstHeading" tal:condition="python: not nickname and fullname"
90                                                tal:content="fullname">
91               fullname
92            </h1>
93            <h1 class="documentFirstHeading" tal:condition="python: not nickname and not fullname"
94                                                tal:content="thismember">
95               memberid
96            </h1>
97
98
99            <img src=""
100                 alt=""
101                 class="portraitPhoto"
102                 width="160"
103                 height="120"
104                 style="float: top; margin: 1em;"
105                 tal:attributes="src portrait_url" />
106            <h2 i18n:translate="heading_contact_information">
107                    Contact information
108            </h2>
109            <br/>
110            <div tal:condition="not:isAnon" tal:omit-tag="">
111                <span tal:condition="email" tal:omit-tag="">
112                    <p i18n:translate="email">E-mail:
113                        <a tal:attributes="href python:'mailto:' + email" tal:content="email">email</a>
114                     </p>
115                </span>
116                <span tal:condition="phone" tal:omit-tag="">
117                    <p i18n:translate="label_phone">Phone: <b tal:replace="phone"/></p>
118                </span>
119                <span tal:condition="mobile" tal:omit-tag="">
120                    <p i18n:translate="label_mobile"
121                        tal:define="sms python:test(mobile.startswith('*SMS*'),True, False);
122                            mobile python:test(mobile.startswith('*SMS*'), mobile[5:], mobile)">Mobile: <b tal:replace="mobile"/>
123                            <b tal:condition="sms" tal:omit-tag="">(You may SMS me.)</b>
124                     </p>
125                </span>
126
127
128                <span tal:condition="python:messenger1 or messenger2 or messenger3" tal:omit-tag="">
129                    <p i18n:translate="label_messenger">Messengers:<br />
130                        <span tal:condition="messenger1" tal:omit-tag="">
131                            <a tal:attributes="href messenger1" tal:content="messenger1" href="messenger">messenger1</a><br />
132                        </span>
133                        <span tal:condition="messenger2" tal:omit-tag="">
134                            <a tal:attributes="href messenger2" tal:content="messenger2" href="messenger">messenger2</a><br />
135                        </span>
136                        <span tal:condition="messenger3" tal:omit-tag="">
137                            <a tal:attributes="href messenger3" tal:content="messenger3" href="messenger">messenger3</a><br />
138                        </span>
139                    </p>
140                </span>
141                <span tal:condition="home_page" tal:omit-tag="">
142                    <p i18n:translate="label_home_page">Homepage:
143                        <a href="#" tal:attributes="href home_page"
144                            i18n:translate="label_author_external_home_page">Author's external home page&hellip;</a>
145                    </p>
146                </span>
147
148                <span tal:condition="python: location_country and location_country!='No country specified'" tal:omit-tag="">
149                    <p i18n:translate="label_country">Country:
150                        <a href="#" tal:attributes="href string:$here_url/search?SearchableText=${location_country}&portal_type=MemberFolder" tal:content="location_country">Country</a>
151                    </p>
152                </span>
153
154                <span tal:condition="location_area" tal:omit-tag="">
155                    <p i18n:translate="label_area">Area:
156                        <a href="#" tal:attributes="href string:$here_url/search?SearchableText=${location_area}&portal_type=MemberFolder" tal:content="location_area">Area</a>
157                    </p>
158                </span>
159
160                <span tal:condition="language_skills" tal:omit-tag="">
161                    <p i18:translate="label_language_skills">Preferred languages:
162                        <span tal:repeat="languagename language_skills" tal:omit-tag="">
163                           <a href="#" tal:attributes="href string:$here_url/search?getLanguage_skills=${languagename}&portal_type=MemberFolder" tal:content="python:here.script_getPrettyLanguage(languagename)">Language</a>
164                           <span tal:condition="not: repeat/languagename/end" tal:omit-tag="">, </span>
165                        </span>
166                    </p>
167                </span>
168
169                <span tal:condition="skills" tal:omit-tag="">
170                    <p i18:translate="label_skills">Skills:
171                        <span tal:repeat="skill skills" tal:omit-tag="">
172                           <a href="#" tal:attributes="href string:$here_url/search?getTags=${skill}&portal_type=MemberFolder" tal:content="skill">Skills</a>
173                           <span tal:condition="not: repeat/skill/end" tal:omit-tag="">, </span>
174                        </span>
175                    </p>
176                </span>
177
178                <span tal:condition="interests" tal:omit-tag="">
179                    <p i18:translate="label_interests">Interests:
180                        <span tal:repeat="interest interests" tal:omit-tag="">
181                           <a href="#" tal:attributes="href string:$here_url/search?getTags=${interest}&portal_type=MemberFolder" tal:content="interest">Skills</a>
182                           <span tal:condition="not: repeat/interest/end" tal:omit-tag="">, </span>
183                        </span>
184                    </p>
185                </span>                   
186
187                <span tal:condition="biography" tal:omit-tag="">
188                    <p i18:translate="label_biography">Biography:
189                        <span tal:replace="biography" />
190                    </p>
191                </span>                   
192
193               
194            </div>
195            <div tal:condition="isAnon" tal:omit-tag="">
196                <p i18n:translate="label_not_logged_in">
197                    If you want to see these informations, you should log in!
198                </p>
199            </div>
200
201            <tal:authorContent define="author_content python:here.my_works(stay=True);
202                    content_n python:len(author_content);
203                    collections_n python:len(here.getCollections());
204                    stories_n python:len(here.getStories());
205                    ">
206                <h2 i18n:translate="heading_portfolio" tal:condition="python: content_n>0 or collections_n>0 or stories_n>0">
207                Portfolio
208                </h2>
209                <a href="" tal:condition="python: content_n>0"
210                   tal:attributes="href string:$here_url/my_works"
211                   i18n:translate="go_to_search_author_content">
212                    All resources created by
213                    <span tal:content="python: '%s (%s)' % (nicename, content_n)">name(amount)</span>
214                </a>
215                <br />
216                <a href="" tal:condition="python: collections_n>0"
217                    tal:attributes="href string:$portal_url/community/${thismember}/collections"
218                    i18n:translate="go_to_users_collections">
219                    Collections created by
220                    <span tal:content="python: '%s (%s)' % (nicename, collections_n)">name(amount)</span>
221                </a>
222                <br />
223                <a href="" tal:condition="python: stories_n>0"
224                    tal:attributes="href string:$portal_url/community/${thismember}/stories"
225                    i18n:translate="go_to_users_story">
226                    Stories created by
227                    <span tal:content="python: '%s (%s)' % (nicename, stories_n)">name(amount)</span>
228                </a>
229
230            </tal:authorContent>
231
232        </div>
233    </div> <!-- end simulated tabs -->
234       
235    </tal:haveAuthor>
236
237    </tal:main-macro>
238
239</metal:main>
240
241</body>
242</html>
243
Note: See TracBrowser for help on using the repository browser.