Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / plugins / webpresence / webpresence_html.xsl
blobf768ccf50b225ecf2aba1688c5e5c2eb96dbee83
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5 <!--
6 HTML 4.01 Transitional
7 -->
9 <xsl:output
10 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
11 doctype-system="http://www.w3.org/TR/html4/loose.dtd"
12 indent="yes"
13 method="html"
14 encoding="ISO-8859-1"
15 omit-xml-declaration="yes"/>
17 <xsl:template match="webpresence">
18 <html>
19 <head>
20 <title>My IM Status</title>
21 </head>
22 <body>
23 <p class="name"><xsl:value-of select="name"/></p>
24 <xsl:apply-templates select="accounts"/>
25 <hr/>
26 <font size="-2">
27 <xsl:text>Last update at: </xsl:text>
28 <xsl:value-of select="listdate"/>
29 </font>
30 </body>
31 </html>
32 </xsl:template>
34 <xsl:template match="accounts">
35 <table>
36 <xsl:for-each select="account">
37 <tr>
38 <td class="protocol">
39 <xsl:apply-templates select="protocol"/>
40 </td>
41 <td class="accountname">
42 <xsl:value-of select="accountname"/>
43 </td>
44 <td class="accountstatus">
45 <xsl:apply-templates select="accountstatus"/>
46 </td>
47 <td class="accountaddress">
48 <xsl:value-of select="accountaddress"/>
49 </td>
50 </tr>
51 </xsl:for-each>
52 </table>
53 </xsl:template>
55 <xsl:template match="protocol">
56 <xsl:choose>
57 <xsl:when test=".='AIMProtocol'">
58 <xsl:text>AIM</xsl:text>
59 </xsl:when>
60 <xsl:when test=".='MSNProtocol'">
61 <xsl:text>MSN</xsl:text>
62 </xsl:when>
63 <xsl:when test=".='ICQProtocol'">
64 <xsl:text>ICQ</xsl:text>
65 </xsl:when>
66 <xsl:when test=".='JabberProtocol'">
67 <xsl:text>Jabber</xsl:text>
68 </xsl:when>
69 <xsl:when test=".='YahooProtocol'">
70 <xsl:text>Yahoo</xsl:text>
71 </xsl:when>
72 <xsl:when test=".='GaduProtocol'">
73 <xsl:text>Gadu-Gadu</xsl:text>
74 </xsl:when>
75 <xsl:when test=".='WPProtocol'">
76 <xsl:text>WinPopup</xsl:text>
77 </xsl:when>
78 <xsl:when test=".='SMSProtocol'">
79 <xsl:text>SMS</xsl:text>
80 </xsl:when>
81 <xsl:when test=".='IRCProtocol'">
82 <xsl:text>IRC</xsl:text>
83 </xsl:when>
84 <xsl:otherwise>
85 <xsl:text>Unknown</xsl:text>
86 </xsl:otherwise>
87 </xsl:choose>
88 </xsl:template>
90 <xsl:template match="accountstatus">
91 <xsl:choose>
92 <xsl:when test=".='ONLINE'">
93 <font color="#00FF00">
94 <xsl:value-of select="."/>
95 </font>
96 </xsl:when>
97 <xsl:when test=".='OFFLINE'">
98 <font color="red">
99 <xsl:value-of select="."/>
100 </font>
101 </xsl:when>
102 <xsl:when test=".='AWAY'">
103 <font color="maroon">
104 <xsl:value-of select="."/>
105 </font>
106 <xsl:if test="@statusdescription != 'Away' or @awayreason">
107 <xsl:text> (</xsl:text>
108 </xsl:if>
109 <xsl:if test="@statusdescription != 'Away'">
110 <xsl:value-of select="@statusdescription"/>
111 <xsl:if test="@awayreason">
112 <xsl:text>: </xsl:text>
113 </xsl:if>
114 </xsl:if>
115 <xsl:if test="@awayreason">
116 <xsl:value-of select="@awayreason"/>
117 </xsl:if>
118 <xsl:if test="@statusdescription != 'Away' or @awayreason">
119 <xsl:text>)</xsl:text>
120 </xsl:if>
121 </xsl:when>
122 <xsl:when test=".='UNKNOWN'">
123 <font color="gray">
124 <xsl:value-of select="."/>
125 </font>
126 <xsl:if test="@statusdescription">
127 <xsl:text> (</xsl:text>
128 <xsl:value-of select="@statusdescription"/>
129 <xsl:text>)</xsl:text>
130 </xsl:if>
131 </xsl:when>
132 <xsl:otherwise>
133 <xsl:value-of select="."/>
134 </xsl:otherwise>
135 </xsl:choose>
136 </xsl:template>
138 </xsl:stylesheet>
140 <!-- vim: set ts=4 sts=4 sw=4: -->