source: sandbox/jabberit_messenger/trophy_expresso/xsl/listLdapContacts.xsl @ 2421

Revision 2421, 1.2 KB checked in by alexandrecorreia, 14 years ago (diff)

Ticket #986 - Adicionado a funcionalidade de procurar contatos no ldap, com templates XSL.

  • Property svn:executable set to *
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="lang_addContact" />
6        <xsl:param name="lang_empty" />
7        <xsl:param name="lang_many_results" />
8       
9        <xsl:template match="/">
10                <xsl:choose>
11                        <xsl:when test="error">
12                                <label><xsl:value-of select="$lang_many_results" /></label>
13                        </xsl:when>
14                        <xsl:when test="empty">
15                                <label><xsl:value-of select="$lang_empty" /></label>
16                        </xsl:when>
17                        <xsl:otherwise>
18                                <xsl:apply-templates select="uids/*" mode="uids" />
19                        </xsl:otherwise>
20                </xsl:choose>
21        </xsl:template>
22
23        <xsl:template match="*" mode="uids">
24                <xsl:for-each select="data">
25                        <xsl:sort select="cn"/>
26                        <span value="{mail};{uid}" jid="{jid}" name="{cn}" ou="{ou}" photo="{photo}">
27                                <span id="{mail};{uid}" style="display:none;"><xsl:value-of select="cn" /></span>
28                                <b><xsl:value-of select="name(..)"/></b>
29                                <br/><xsl:value-of select="cn" />
30                                <br/>
31                                <br/>
32                                <label id="__label__{mail};{uid}" style="color:blue;cursor:pointer;"><xsl:value-of select="$lang_addContact" /></label>
33                                <br/>
34                        </span>
35                </xsl:for-each>
36        </xsl:template>
37
38</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.