Code source wiki de OSSGTPUserProfileSheet
Modifié par Vincent Massol le 2011/08/05 08:00
Afficher les derniers auteurs
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | ## | ||
3 | ## To use this page, edit XWiki.XWikiUserProfileSheet and replace: | ||
4 | ## | ||
5 | ## #end | ||
6 | ## </div> | ||
7 | ## </div> | ||
8 | ## | ||
9 | ## Par: | ||
10 | ## | ||
11 | ## #end | ||
12 | ## {{include document="OSSGTP.OSSGTPUserProfileSheet"/}} | ||
13 | ## </div> | ||
14 | ## </div> | ||
15 | |||
16 | #set($obj = $doc.getObject("OSSGTP.OSSGTPUsers")) | ||
17 | ## Automatically create the object if it doesn't exist | ||
18 | #if ("$!obj" == "") | ||
19 | #set ($obj = $doc.getObject("OSSGTP.OSSGTPUsers", true)) | ||
20 | $doc.save("Added OSSGTP User Object", true) | ||
21 | #end | ||
22 | |||
23 | {{html clean="false" wiki="true"}} | ||
24 | <h1>OSSGTP</h1> | ||
25 | <dl> | ||
26 | #set ($ohlohId = $obj.getProperty("ohloh").getValue()) | ||
27 | #if ($xcontext.action != 'view' || "$!ohlohId" != "") | ||
28 | <dt class="label"><label>Profil OHLOH</label></dt> | ||
29 | #if ($xcontext.action == 'view') | ||
30 | |||
31 | {{html}} | ||
32 | <a href='https://www.ohloh.net/accounts/${ohlohId}?ref=Detailed'> | ||
33 | <img alt='Ohloh profile' height='35' src='https://www.ohloh.net/accounts/${ohlohId}/widgets/account_detailed.gif' width='191' /> | ||
34 | </a> | ||
35 | {{/html}} | ||
36 | |||
37 | #else | ||
38 | <dd>$doc.display('ohloh', $obj)</dd> | ||
39 | #end | ||
40 | #end | ||
41 | #set ($mbId = $obj.getProperty("masterbranch").getValue()) | ||
42 | #if ($xcontext.action != 'view' || "$!mbId" != "") | ||
43 | <dt class="label"><label>Profil MasterBranch</label></dt> | ||
44 | #if ($xcontext.action == 'view') | ||
45 | |||
46 | {{html}} | ||
47 | <a href="https://www.masterbranch.com/developer/${mbId}"> | ||
48 | <img src="http://static.masterbranch.com/buttons/btn_profile_195x27.png" width="195" height="27" border="0" alt="View profile on Masterbranch" /> | ||
49 | </a> | ||
50 | {{/html}} | ||
51 | |||
52 | #else | ||
53 | <dd>$doc.display('masterbranch', $obj)</dd> | ||
54 | #end | ||
55 | #end | ||
56 | <dt class="label"><label>Projets Open Source sur lesquels je suis ou j'ai été committer</label></dt> | ||
57 | #if ($xcontext.action == 'view') | ||
58 | ## Put all projet definition in a map | ||
59 | #set ($projectMap = {}) | ||
60 | #foreach ($project in $xwiki.getDocument("OSSGTP.Projects").getObjects("OSSGTP.OSSGTPProject")) | ||
61 | #set ($dummy = $projectMap.put($project.getProperty("name").getValue(), $project.getProperty("url").getValue())) | ||
62 | #end | ||
63 | #set ($myProjects = $obj.getProperty("projects").getValue()) | ||
64 | #if ("$!myProjects" == "" || $myProjects.isEmpty()) | ||
65 | <dd>Aucun !</dd> | ||
66 | #else | ||
67 | #foreach ($projectName in $myProjects) | ||
68 | * [[$projectName>>$projectMap.get($projectName)]] | ||
69 | #end | ||
70 | #end | ||
71 | #else | ||
72 | <dd>$doc.display('projects', $obj)</dd> | ||
73 | #end | ||
74 | </dl> | ||
75 | {{/html}} | ||
76 | |||
77 | {{/velocity}} |