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

Revision 469, 2.3 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      i18n:domain="plone">
4<body>
5<!--
6All of this macros need a specific userid to request information. The only way
7to pass parameters to a macro, is defining a variable in the block around
8the macro. I choosed variable user_id, you need to define this, if u wanna use
9these macros.
10-->
11<div metal:define-macro="user_image">
12    <a href="#" tal:attributes="href string: ${portal_url}/author/${user_id}">
13    <img src=""
14                 alt=""
15                 class="portraitPhoto"
16                 width="75"
17                 height="100"
18                 tal:attributes="src python:context.lemill_usertool.getPortraitURL(user_id)" />
19    </a>
20</div>
21
22<div metal:define-macro="user_name">
23    <a href="#" tal:attributes="href string: ${portal_url}/author/${user_id}"
24     tal:content="python:context.lemill_usertool.getFullName(user_id)">PLACEHOLDER</a>
25</div>
26
27<div metal:define-macro="user_info">
28    <div metal:use-macro="here/usermacro/macros/user_image"> Display image </div>
29    <div metal:use-macro="here/usermacro/macros/user_name"> Display name </div>
30    <br />
31    <h2 i18n:translate="heading_contact_information">
32         Contact informations
33    </h2>
34    <br/>
35    <span tal:define="user_email    python:context.lemill_usertool.getEmail(user_id);
36                      user_skype    python:context.lemill_usertool.getSkype(user_id);
37                      user_homepage python:context.lemill_usertool.getHomepage(user_id);">
38        <span tal:condition="user_email">
39            <p i18n:translate="label_email">E-mail:
40                <a tal:attributes="href python:'mailto:' + user_email" tal:content="user_email">user_email</a>
41            </p>
42        </span>
43        <span tal:condition="user_skype">
44            <p i18n:translate="label_skype">Skype:
45                <a tal:attributes="href python:'skype:' + user_skype" tal:content="user_skype" href="skype">user_skype</a>
46            </p>
47        </span>
48        <span tal:condition="user_homepage">
49            <p i18n:translate="label_homepage">Homepage:
50                <a href="#" tal:attributes="href user_homepage"
51                    i18n:translate="label_author_external_home_page">Author's external home page&hellip;</a>
52            </p>
53        </span>
54    </span>               
55</div>
56</body>
57</html>
Note: See TracBrowser for help on using the repository browser.