|
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" indent="no"/>
<xsl:template match="Users">
<table class="grid">
<tr>
<th>User</th>
<th>Password</th>
<th>Role</th>
<th>Last Login</th>
<th class="actions"><img src="Images/add.png" alt="Add" Title="Add User" onclick="addUser();" /></th>
</tr>
<xsl:for-each select="User">
<tr>
<xsl:if test="position() mod 2 = 0"><xsl:attribute name="class">alternating</xsl:attribute></xsl:if>
<td><xsl:value-of select="@Name"/></td>
<td><xsl:value-of select="@Password"/></td>
<td><xsl:value-of select="@Role"/></td>
<td><xsl:value-of select="@LastLogin"/></td>
<td class="actions">
<img src="Images/delete.png" alt="Delete">
<xsl:attribute name="onclick">deleteUser('<xsl:value-of select="@Name"/>');</xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
</table>
<table style="margin-top: 30px;">
<tr>
<th class="title" colspan="2">Add User</th>
</tr>
<tr>
<th>User Name</th>
<td><input id="new_un" /></td>
</tr>
<tr>
<th>Password</th>
<td><input id="new_pw" /></td>
</tr>
<tr>
<th>Role</th>
<td>
<select id="new_role">
<option value="User">User</option>
<option value="Moderator">Moderator</option>
<option value="Administrator">Administrator</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" value="Add" onclick="addUser();" />
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Clayton Rumley is web developer for hire from Winnipeg, Manitoba, Canada.