Rev | Line | |
---|
[260] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
[305] | 3 | <xsl:output method="html" omit-xml-declaration="yes"/> |
---|
[260] | 4 | |
---|
[305] | 5 | <xsl:param name="path" /> |
---|
[260] | 6 | |
---|
[305] | 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)"> |
---|
[311] | 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> |
---|
[305] | 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"> |
---|
[327] | 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}"> |
---|
[260] | 32 | <xsl:choose> |
---|
[305] | 33 | <xsl:when test="@name"> |
---|
| 34 | <xsl:value-of select="@name"/> |
---|
[260] | 35 | </xsl:when> |
---|
| 36 | <xsl:otherwise> |
---|
[305] | 37 | <xsl:value-of select="@jid"/> |
---|
[260] | 38 | </xsl:otherwise> |
---|
| 39 | </xsl:choose> |
---|
[305] | 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> |
---|
[260] | 45 | |
---|
| 46 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.