phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api/skins/default acl_mgr.xsl,NONE,1.1.2.1


From: Joseph Engo <address@hidden>
Subject: [Phpgroupware-cvs] api/skins/default acl_mgr.xsl,NONE,1.1.2.1
Date: Mon, 17 Nov 2003 20:43:59 +0000

Update of /cvsroot/phpgroupware/api/skins/default
In directory subversions:/tmp/cvs-serv21019/skins/default

Added Files:
      Tag: proposal-branch
        acl_mgr.xsl 
Log Message:
Created a sample ACL manager, its currently only a form.  It has static test 
values and doesn't store anything.  This layout is going to change, I wanted to 
get it in CVS for archive purposes.  I might end up going seperate screens for 
"Allow" and "Deny" rights.


--- NEW FILE: acl_mgr.xsl ---
<?xml version="1.0"?>
<!-- $Id: acl_mgr.xsl,v 1.1.2.1 2003/11/17 20:43:56 jengo Exp $ -->
<!-- $Source: /cvsroot/phpgroupware/api/skins/default/Attic/acl_mgr.xsl,v $ -->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output indent="yes" />

<xsl:template name="acl_show_column">
        <xsl:param name="locations_item" />
        <xsl:param name="app" />
        <xsl:param name="pos" />

        <table border="0" width="100%" cellspacing="0" cellpadding="1">
                <xsl:if test="$pos = 1">
                <tr>
                        <td width="*" align="left">&#160;</td>
                        <td width="10%" align="right">Allow</td>
                        <td width="10%" align="right">Deny</td>
                </tr>
                </xsl:if>
                <tr>
                        <td colspan="3">
                                <table border="0" cellspacing="1" 
cellpadding="0" class="normalbox" width="100%">
                                        <tr>
                                                <td width="*" 
align="left"><xsl:value-of select="$locations_item/title" /></td>
                                                <td width="10%" align="right">
                                                        <xsl:choose>
                                                                <xsl:when 
test="count($locations_item/values) > 0">
                                                                        <select 
multiple="multiple" name="acl_allow[{$app}.{$locations_item/location}]">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="5 > count($locations_item/values/values_item)">
                                                                                
        <xsl:attribute name="size"><xsl:value-of 
select="count($locations_item/values/values_item)" /></xsl:attribute>
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:attribute name="size">5</xsl:attribute>
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>

                                                                        
<xsl:for-each select="$locations_item/values/values_item">
                                                                                
<option value="{$locations_item/value}"><xsl:value-of select="title" /></option>
                                                                        
</xsl:for-each>
                                                                        
</select>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        <input 
name="acl_allow[{$app}.{$locations_item/location}]" type="checkbox" />
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                </td>
                                                <td width="10%" align="right">
                                                        <xsl:choose>
                                                                <xsl:when 
test="count(values) > 0">
                                                                        <select 
multiple="multiple" name="acl_deny[{$app}.{$locations_item/location}]">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="5 > count($locations_item/values/values_item)">
                                                                                
        <xsl:attribute name="size"><xsl:value-of 
select="count($locations_item/values/values_item)" /></xsl:attribute>
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:attribute name="size">5</xsl:attribute>
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>

                                                                        
<xsl:for-each select="$locations_item/values/values_item">
                                                                                
<option value="{value}"><xsl:value-of select="title" /></option>
                                                                        
</xsl:for-each>
                                                                        
</select>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        <input 
name="acl_deny[{$app}.{$locations_item/location}]" type="checkbox" />
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                </td>
                                        </tr>                           
                                </table>
                        </td>
                </tr>
        </table>
</xsl:template>

<xsl:template match="APP[action='acl_mgr_account']">
        <form>
        <xsl:for-each select="acl_options/acl_options_item">
                <xsl:sort select="app" />
                <xsl:variable name="app" select="app" />
                <br />
                <table class="normalbox" cellSpacing="1" cellPadding="0" 
width="80%" border="0">
                        <tr> 
                                <td class="sideboxtitle" align="center" 
height="28" width="100%">

                                        <table border="0" width="100%" 
cellspacing="0" cellpadding="0" class="normalbox_title">
                                                <tr>
                                                        <td align="left" 
width="*"><input name="acl_checked[{$app}.base.start]" type="checkbox" 
/>&#160;<xsl:value-of select="title" /></td>
                                                        <xsl:if 
test="count(locations) > 0">
                                                                <td 
align="right" width="10%"><input type="checkbox" />All</td>
                                                        </xsl:if>
                                                </tr>
                                        </table>

                                </td>
                        </tr>
                        <xsl:if test="count(locations) > 0">
                        <tr>
                                <td class="sideboxcontent" bgColor="#efefef">
                                        <table class="sideboxtext" 
cellSpacing="0" cellPadding="0" width="100%" border="0" valign="top">
                                                <xsl:for-each 
select="locations/locations_item">
                                                        <xsl:if 
test="(position() mod 2) = 1">
                                                                <tr 
class="sideboxtext">
                                                                        <td 
width="49%" valign="top">
                                                                                
<xsl:call-template name="acl_show_column">
                                                                                
        <xsl:with-param name="locations_item" select="current()" />
                                                                                
        <xsl:with-param name="app" select="$app" />
                                                                                
        <xsl:with-param name="pos" select="position()" />
                                                                                
</xsl:call-template>
                                                                        </td>
                                                                        <td 
width="1%">&#160;</td>
                                                                        <xsl:if 
test="following-sibling::locations_item[position() = 1]">
                                                                                
<td width="49%">
                                                                                
        <xsl:call-template name="acl_show_column">
                                                                                
                <xsl:with-param name="locations_item" 
select="following-sibling::locations_item[position() = 1]" />
                                                                                
                <xsl:with-param name="app" select="$app" />
                                                                                
                <xsl:with-param name="pos" select="position()" />
                                                                                
        </xsl:call-template>
                                                                                
</td> 
                                                                        
</xsl:if>
                                                                        <td 
width="*">&#160;</td>
                                                                </tr>
                                                        </xsl:if>
                                                </xsl:for-each>
                                        </table>
                                </td>
                        </tr>
                        </xsl:if>
                </table>
        </xsl:for-each>
        </form>
        <p>&#160;</p>

</xsl:template>

</xsl:stylesheet>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]