[Yanel-commits] rev 29926 - public/yanel/contributions/realms/foaf/data/xslt

michi at wyona.com michi at wyona.com
Sun Dec 16 23:19:50 CET 2007


Author: michi
Date: 2007-12-16 23:19:50 +0100 (Sun, 16 Dec 2007)
New Revision: 29926

Modified:
   public/yanel/contributions/realms/foaf/data/xslt/foaf2xhtml.xsl
Log:
differentiate between being loged in and not being loged in

Modified: public/yanel/contributions/realms/foaf/data/xslt/foaf2xhtml.xsl
===================================================================
--- public/yanel/contributions/realms/foaf/data/xslt/foaf2xhtml.xsl	2007-12-16 21:18:21 UTC (rev 29925)
+++ public/yanel/contributions/realms/foaf/data/xslt/foaf2xhtml.xsl	2007-12-16 22:19:50 UTC (rev 29926)
@@ -80,7 +80,7 @@
 <xsl:apply-templates select="/wyona:foaf/wyona:third-party-source" mode="atom"/>
 
 <br/><br/>
-<xsl:choose><xsl:when test="$username = 'foaf:uin'"><a href="{$yarep.back2realm}add-friend.html?href=TODO">Add to your address book</a> | <a href="{$yarep.back2realm}send-invitation.html?profile-of-friend=TODO">Send invitation</a></xsl:when><xsl:otherwise><a href="{$yarep.back2realm}profiles/{$username}/add-friend.html?href=TODO">Add to your address book</a> | <a href="{$yarep.back2realm}profiles/{$username}/send-invitation.html?profile-of-friend=TODO">Send invitation</a></xsl:otherwise></xsl:choose>
+<xsl:choose><xsl:when test="$username = 'foaf:uin'"><xsl:apply-templates select="/wyona:foaf/wyona:third-party-source" mode="add-friend-uin"/><xsl:apply-templates select="/wyona:foaf/wyona:source" mode="add-friend-uin"/></xsl:when><xsl:otherwise><xsl:apply-templates select="/wyona:foaf/wyona:third-party-source" mode="add-friend"/><xsl:apply-templates select="/wyona:foaf/wyona:source" mode="add-friend"/></xsl:otherwise></xsl:choose>
 </td>
 </tr>
 </table>
@@ -98,6 +98,23 @@
 <br/>
 </xsl:template>
 
+<xsl:template match="wyona:third-party-source" mode="add-friend-uin">
+  <a href="{$yarep.back2realm}add-friend.html?href={@href}&amp;remote">Add to your address book</a> | <a href="{$yarep.back2realm}send-invitation.html?profile-of-friend={@href}&amp;remote">Send invitation</a>
+</xsl:template>
+
+<xsl:template match="wyona:source" mode="add-friend-uin">
+  <a href="{$yarep.back2realm}add-friend.html?href={@href}&amp;local">Add to your address book</a> | <a href="{$yarep.back2realm}send-invitation.html?profile-of-friend={@href}&amp;local">Send invitation</a>
+</xsl:template>
+
+<xsl:template match="wyona:third-party-source" mode="add-friend">
+  <a href="{$yarep.back2realm}profiles/{$username}/add-friend.html?href={@href}&amp;remote">Add to your address book</a> | <a href="{$yarep.back2realm}profiles/{$username}/send-invitation.html?profile-of-friend={@href}&amp;remote">Send invitation</a>
+</xsl:template>
+
+<xsl:template match="wyona:source" mode="add-friend">
+  <a href="{$yarep.back2realm}profiles/{$username}/add-friend.html?href={@href}&amp;local">Add to your address book</a> | <a href="{$yarep.back2realm}profiles/{$username}/send-invitation.html?profile-of-friend={@href}&amp;local">Send invitation</a>
+</xsl:template>
+
+
 <xsl:template match="wyona:source" mode="original">
 <a href="{$yarep.back2realm}{@href}">FOAF RDF</a>
 <br/>



More information about the Yanel-commits mailing list