source: trunk/instant_messenger/xsl/contacts.xsl @ 305

Revision 305, 1.7 KB checked in by niltonneto, 16 years ago (diff)

Correçoes

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                                                <img id="group_{group[current()]}" src="{$path}templates/default/images/group_open.gif" onclick="javascript:im.group_close('{group[current()]}');"/>
18                                                <b><xsl:value-of select="group[current()]" /><br/></b>
19                                                <xsl:apply-templates select="." mode="contacts"/>
20                                        </xsl:when>
21                                        <xsl:otherwise>
22                                                <xsl:apply-templates select="." mode="contacts"/>
23                                        </xsl:otherwise>
24                                </xsl:choose>
25                        </xsl:for-each>
26                </div>
27        </xsl:template>
28
29        <xsl:template match="*" mode="contacts">
30                <div style="background:url({$path}templates/default/images/unavailable.gif) no-repeat 15px;padding-left:30px;cursor:pointer;display:block;" id="contact_{@jid}" idgroup="{group}" idname="{@name}" jid="{@jid}">
31                        <xsl:choose>
32                                <xsl:when test="@name">
33                                        <xsl:value-of select="@name"/>
34                                </xsl:when>
35                                <xsl:otherwise>
36                                        <xsl:value-of select="@jid"/>
37                                </xsl:otherwise>
38                        </xsl:choose>
39                        <br/>
40                        <span id="status_{@jid}" style="font-size:8pt; font-family:Verdana, Arial, Helvetica, sans-serif; font-style:italic; display:none" />
41                </div>
42                <span id="sub_{@jid}" style="background:#b4cfe5; font:8pt; position: absolute; display:none"></span>
43        </xsl:template>
44
45</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.