Line | |
---|
1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
3 | <xsl:output method="html" omit-xml-declaration="yes"/> |
---|
4 | |
---|
5 | <xsl:param name="path" /> |
---|
6 | |
---|
7 | <xsl:template match="iq/query"> |
---|
8 | <xsl:apply-templates select="." mode="list" /> |
---|
9 | </xsl:template> |
---|
10 | |
---|
11 | <xsl:template match="*" mode="list"> |
---|
12 | <div id="im_contact_list" style="margin:2px;"> |
---|
13 | <xsl:for-each select="item"> |
---|
14 | <xsl:sort select="group" case-order="upper-first" /> |
---|
15 | <xsl:choose> |
---|
16 | <xsl:when test="not(group = preceding-sibling::item/group)"> |
---|
17 | <div style="font-weight:bold;padding-left:16px;background:url({$path}templates/default/images/group_open.gif) no-repeat;"> |
---|
18 | <xsl:value-of select="group[current()]" /> |
---|
19 | </div> |
---|
20 | <xsl:apply-templates select="." mode="contacts"/> |
---|
21 | </xsl:when> |
---|
22 | <xsl:otherwise> |
---|
23 | <xsl:apply-templates select="." mode="contacts"/> |
---|
24 | </xsl:otherwise> |
---|
25 | </xsl:choose> |
---|
26 | </xsl:for-each> |
---|
27 | </div> |
---|
28 | </xsl:template> |
---|
29 | |
---|
30 | <xsl:template match="*" mode="contacts"> |
---|
31 | <div style="background:url({$path}templates/default/images/unavailable.gif) no-repeat 15px;padding-left:30px;cursor:pointer;display:none;" id="contact_{@jid}" idgroup="{group}" idname="{@name}" jid="{@jid}"> |
---|
32 | <xsl:choose> |
---|
33 | <xsl:when test="@name"> |
---|
34 | <xsl:value-of select="@name"/> |
---|
35 | </xsl:when> |
---|
36 | <xsl:otherwise> |
---|
37 | <xsl:value-of select="@jid"/> |
---|
38 | </xsl:otherwise> |
---|
39 | </xsl:choose> |
---|
40 | <br/> |
---|
41 | <span id="status_{@jid}" style="font-size:8pt; font-family:Verdana, Arial, Helvetica, sans-serif; font-style:italic; display:none" /> |
---|
42 | </div> |
---|
43 | <span id="sub_{@jid}" style="background:#b4cfe5; font:8pt; position: absolute; display:none"></span> |
---|
44 | </xsl:template> |
---|
45 | |
---|
46 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.