[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/skins/default/phpgw.xsl, 1.1.1.1.2.30
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/skins/default/phpgw.xsl, 1.1.1.1.2.30 |
Date: |
Fri, 21 May 2004 19:10:44 -0000 |
Update of /api/skins/default
Modified Files:
Branch: proposal-branch
phpgw.xsl
date: 2004/04/26 00:28:22; author: jengo; state: Exp; lines: +186 -113
Log Message:
The javascript menus are now a preference. I am working on preferences right
now, moving things over to XML with table caching. You *must* create a
preference record for api.js_menus ... options are yes or no. If you don't,
you won't get any menus. The preferences should be done in a few hours.
=====================================================================
Index: api/skins/default/phpgw.xsl
diff -u api/skins/default/phpgw.xsl:1.1.1.1.2.29
api/skins/default/phpgw.xsl:1.1.1.1.2.30
--- api/skins/default/phpgw.xsl:1.1.1.1.2.29 Sat Apr 24 20:38:20 2004
+++ api/skins/default/phpgw.xsl Mon Apr 26 00:28:22 2004
@@ -10,6 +10,129 @@
<xsl:variable name="api_image_path"><xsl:value-of
select="/PHPGW/API/basepath"/>/api/skins/<xsl:value-of
select="/PHPGW/API/prefs/api.skin" />/images</xsl:variable>
<xsl:variable name="app_image_path"><xsl:value-of
select="/PHPGW/API/basepath"/>/<xsl:value-of select="/PHPGW/API/op/appname"
/>/skins/<xsl:value-of select="/PHPGW/API/prefs/api.skin"
/>/images</xsl:variable>
+<xsl:template name="build_menu">
+ <table class="sidebox" cellspacing="1" cellpadding="0" width="100%"
border="0">
+ <tr>
+ <td class="sideboxtitle" align="center"
height="28"><xsl:value-of select="/PHPGW/address@hidden'General Menu']"/></td>
+ </tr>
+ <tr>
+ <td class="sideboxcontent" bgcolor="#efefef">
+ <table class="sideboxtext" cellspacing="0"
cellpadding="0" width="100%" border="0" valign="top">
+ <xsl:for-each
select="/PHPGW/API/apimenu/apimenu_item">
+ <xsl:variable name="op"
select="op" />
+ <tr>
+ <td valign="top"
align="center"><font color="#ff9933">*</font></td>
+ <xsl:choose>
+ <xsl:when
test="/PHPGW/API/form_lock = 1">
+ <td
width="100%" height="20" align="left" vAlign="top"><font
class="fake_link"><xsl:value-of select="title" /></font></td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td
width="100%" height="20" align="left" vAlign="top"><a
href="{$baseurl}&op={$op}"><xsl:value-of select="title" /></a></td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:for-each select="/PHPGW/API/appmenus/appmenus_item">
+ <br />
+ <table class="sidebox" cellspacing="1" cellpadding="0"
width="100%" border="0">
+ <tr>
+ <td class="sideboxtitle" align="center"
height="28"><xsl:value-of select="title"/></td>
+ </tr>
+ <tr>
+ <td class="sideboxcontent" bgcolor="#efefef">
+ <table class="sideboxtext"
cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
+ <xsl:for-each
select="links/links_item">
+ <tr>
+ <td
vAlign="top" align="center"><font color="#ff9933">*</font></td>
+
<xsl:choose>
+
<xsl:when test="/PHPGW/API/form_lock = 1">
+
<td width="100%" height="20" align="left" vAlign="top"><font
class="fake_link"><xsl:value-of select="title" /></font></td>
+
</xsl:when>
+
<xsl:otherwise>
+
<td width="100%" height="20" align="left" vAlign="top"><a
href="{$baseurl}&op={op}"><xsl:value-of select="title" /></a></td>
+
</xsl:otherwise>
+
</xsl:choose>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="build_menu_js">
+ <td align="left" width="1%">
+ <div onMouseover="javascript:showdiv('apimenu{position()}');"
onMouseout="javascript:hidediv('apimenu{position()}');">
+ <table class="sidebox" cellSpacing="1" cellPadding="0"
width="100%" border="0">
+ <tr>
+ <td class="sideboxtitle" align="center"
height="28"><a onMouseOver="" onMouseout=""
onClick="javascript:autoshowhidediv('apimenu{position()}');"><xsl:value-of
select="/PHPGW/address@hidden'General Menu']"/></a></td>
+ </tr>
+ <tr>
+ <td>
+ <div id="apimenu{position()}"
style="float:left; width:150px;position: absolute; visibility: hidden;">
+ <table
class="sideboxcontent" bgColor="#efefef" cellSpacing="0" cellPadding="0"
width="100%" border="0" valign="top">
+ <xsl:for-each
select="/PHPGW/API/apimenu/apimenu_item">
+ <xsl:variable
name="op" select="op" />
+ <tr>
+ <td
vAlign="top" align="center"><font color="#ff9933">*</font></td>
+
<xsl:choose>
+
<xsl:when test="/PHPGW/API/form_lock = 1">
+
<td width="100%" height="20" align="left" vAlign="top"><font
class="fake_link"><xsl:value-of select="title" /></font></td>
+
</xsl:when>
+
<xsl:otherwise>
+
<td width="100%" height="20" align="left" vAlign="top"><a
href="{$baseurl}&op={$op}"><xsl:value-of select="title" /></a></td>
+
</xsl:otherwise>
+
</xsl:choose>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+
+ <xsl:for-each select="/PHPGW/API/appmenus/appmenus_item">
+ <td align="left" width="1%">
+ <div
onMouseover="javascript:showdiv('appmenu{position()}');"
onMouseout="javascript:hidediv('appmenu{position()}');">
+ <table class="sidebox" cellSpacing="1"
cellPadding="0" width="100%" border="0">
+ <tr>
+ <td class="sideboxtitle"
align="center" height="28"><a onMouseOver="" onMouseout=""
onClick="javascript:autoshowhidediv('appmenu{position()}');"><xsl:value-of
select="title"/></a></td>
+ </tr>
+ <tr>
+ <td>
+ <div
id="appmenu{position()}" style="float:left; width:150px;position: absolute;
visibility: hidden;">
+ <table
class="sideboxcontent" bgColor="#efefef" cellSpacing="0" cellPadding="0"
width="100%" border="0" valign="top">
+ <xsl:for-each
select="links/links_item">
+ <tr>
+
<td vAlign="top" align="center"><font color="#ff9933">*</font></td>
+
<xsl:choose>
+
<xsl:when test="/PHPGW/API/form_lock = 1">
+
<td width="100%" height="20" align="left"
vAlign="top"><font class="fake_link"><xsl:value-of select="title" /></font></td>
+
</xsl:when>
+
<xsl:otherwise>
+
<td width="100%" height="20" align="left"
vAlign="top"><a href="{$baseurl}&op={op}"><xsl:value-of select="title"
/></a></td>
+
</xsl:otherwise>
+
</xsl:choose>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </xsl:for-each>
+</xsl:template>
+
<xsl:template match="/">
<html>
<head>
@@ -19,7 +142,8 @@
</xsl:for-each>
<link rel="icon" href="favicon.ico" type="image/x-ico" />
<link rel="shortcut icon" href="favicon.ico" />
- <script>
+ <xsl:if test="/PHPGW/API/prefs/api.js_menus = 'yes'">
+ <script>
function autoshowhidediv(divid){
if(document.getElementById(divid).style.visibility == 'hidden'){
showdiv(divid);
@@ -36,15 +160,16 @@
document.getElementById(divid).style.visibility
= 'hidden';
}
</script>
+ </xsl:if>
</head>
<body bgcolor="#e5e5e5">
<div style="position:absolute; left:4; top:4; bottom:0; padding:0;
width:98%; height:99%;">
<table class="box" height="90%" cellSpacing="0" cellPadding="1"
width="100%" bgcolor="#ffffff" border="0">
<tr>
- <td vAlign="top">
- <table cellSpacing="0" cellPadding="0" width="100%"
bgcolor="#ffffff" border="0">
+ <td valign="top">
+ <table cellspacing="0" cellpadding="0" width="100%"
bgcolor="#ffffff" border="0">
<tr>
- <td width="185" rowspan="2"
align="center" vAlign="top" class="toppannel"><a
href="http://www.phpgroupware.org/" target="_blank"><img border="0"
title="www.phpGroupWare.org"><xsl:attribute name="src"><xsl:value-of
select="$api_image_path" />/logo.png</xsl:attribute></img></a></td>
+ <td width="185" rowspan="2"
align="center" valign="top" class="toppannel"><a
href="http://www.phpgroupware.org/" target="_blank"><img border="0"
title="www.phpGroupWare.org"><xsl:attribute name="src"><xsl:value-of
select="$api_image_path" />/logo.png</xsl:attribute></img></a></td>
<td colspan="2" valign="top"
style="background-repeat: repeat-x;"><xsl:attribute
name="background"><xsl:value-of select="$api_image_path"
/>/panel.png</xsl:attribute>
<table width="100%" border="0"
cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="background-repeat:
repeat-x;"><xsl:attribute name="background"><xsl:value-of
select="$api_image_path" />/panel.png</xsl:attribute>
<tr valign="center">
@@ -80,131 +205,79 @@
</td>
<td width="15" rowspan="2" vAlign="top"
class="toppannel"> </td>
</tr>
+
<xsl:if test="count(/PHPGW/API/apps/apps_item)
> 0">
- <tr>
- <td align="left" vAlign="top"
class="mainnote">
- <xsl:for-each
select="/PHPGW/API/op_history/op_history_item">
- <xsl:variable name="op"
select="op" />
- <xsl:variable
name="title" select="title" />
-
- <xsl:choose>
- <xsl:when
test="/PHPGW/API/form_lock = 1">
-
<b><xsl:value-of select="$title" /></b>
- </xsl:when>
- <xsl:otherwise>
- <b><a
href="{$baseurl}&op=api.statecache.restore&position_id={position}"><xsl:value-of
select="$title" /></a></b>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if
test="position() != count(/PHPGW/API/op_history/op_history_item)">
-  / 
- </xsl:if>
- </xsl:for-each>
- </td>
- <td align="right" vAlign="top"
class="mainnote"><b><xsl:value-of select="/PHPGW/API/user/fullname"/></b></td>
- </tr>
- <tr>
- <td colspan="3" align="right"
vAlign="top" class="mainnote"><xsl:value-of select="/PHPGW/API/currentdate"
/><!-- current_users --></td>
- </tr>
- </xsl:if>
+ <tr>
+ <td align="left" vAlign="top"
class="mainnote">
+ <xsl:for-each
select="/PHPGW/API/op_history/op_history_item">
+ <xsl:variable
name="op" select="op" />
+ <xsl:variable
name="title" select="title" />
+
+ <xsl:choose>
+
<xsl:when test="/PHPGW/API/form_lock = 1">
+
<b><xsl:value-of select="$title" /></b>
+
</xsl:when>
+
<xsl:otherwise>
+
<b><a
href="{$baseurl}&op=api.statecache.restore&position_id={position}"><xsl:value-of
select="$title" /></a></b>
+
</xsl:otherwise>
+ </xsl:choose>
+ <xsl:if
test="position() != count(/PHPGW/API/op_history/op_history_item)">
+
 / 
+ </xsl:if>
+ </xsl:for-each>
+ </td>
+ <td align="right" vAlign="top"
class="mainnote"><b><xsl:value-of select="/PHPGW/API/user/fullname"/></b></td>
+ </tr>
+ <tr>
+ <td colspan="3" align="right"
vAlign="top" class="mainnote"><xsl:value-of select="/PHPGW/API/currentdate"
/><!-- current_users --></td>
+ </tr>
+ </xsl:if>
</table>
- <table cellSpacing="0" cellPadding="0" width="100%"
border="0">
- <tr vAlign="top">
+
+ <table cellspacing="0" cellpadding="0" width="100%"
border="0">
+ <tr valign="top">
<td width="5"> </td>
- <td width="2"> </td>
+
+ <xsl:if
test="/PHPGW/API/prefs/api.js_menus = 'no'">
+ <td width="160">
+ <xsl:call-template
name="build_menu" />
+ </td>
+ <td width="5"> </td>
+ </xsl:if>
+
<td valign="top">
- <table border="0"
cellSpacing="0" cellPadding="0" width="99%">
+ <table border="0"
cellspacing="0" cellpadding="0" width="99%">
<tr>
<td>
<!--<xsl:apply-templates select="PHPGW/API/hooks/hooks_item" />-->
<xsl:choose>
<xsl:when test="PHPGW/APP != '' or /PHPGW/APPHTML">
<form method="POST" name="phpgw_form" action="{/PHPGW/API/baseurl}">
-
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
+
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
-
<td vAlign="top" height="100%">
+
<td valign="top" height="100%">
-
<table cellSpacing="0" cellPadding="0"
width="100%" border="0"><tr align="left">
+
<xsl:if
test="/PHPGW/API/prefs/api.js_menus = 'yes'">
+
<table cellspacing="0"
cellpadding="0" width="100%" border="0">
+
<tr align="left">
+
+
<xsl:if
test="count(/PHPGW/API/apps/apps_item) > 0">
+
<xsl:call-template name="build_menu_js" />
+
</xsl:if>
+
+
<td
width="99%"> </td>
+
</tr>
+
</table>
+
</xsl:if>
- <xsl:if
test="count(/PHPGW/API/apps/apps_item) > 0">
- <td align="left" width="1%">
- <div
onMouseover="javascript:showdiv('apimenu{position()}');"
onMouseout="javascript:hidediv('apimenu{position()}');">
- <table class="sidebox"
cellSpacing="1" cellPadding="0" width="100%" border="0">
- <tr>
- <td
class="sideboxtitle" align="center" height="28"><a onMouseOver="" onMouseout=""
onClick="javascript:autoshowhidediv('apimenu{position()}');"><xsl:value-of
select="/PHPGW/address@hidden'General Menu']"/></a></td>
- </tr>
- <tr>
- <td>
- <div
id="apimenu{position()}" style="float:left; width:150px;position: absolute;
visibility: hidden;">
- <table
class="sideboxcontent" bgColor="#efefef" cellSpacing="0" cellPadding="0"
width="100%" border="0" valign="top">
-
<xsl:for-each select="/PHPGW/API/apimenu/apimenu_item">
-
<xsl:variable name="op" select="op" />
-
<tr>
-
<td vAlign="top" align="center"><font
color="#ff9933">*</font></td>
-
<xsl:choose>
-
<xsl:when test="/PHPGW/API/form_lock = 1">
-
<td width="100%" height="20" align="left"
vAlign="top"><font class="fake_link"><xsl:value-of select="title" /></font></td>
-
</xsl:when>
-
<xsl:otherwise>
-
<td width="100%" height="20" align="left"
vAlign="top"><a href="{$baseurl}&op={$op}"><xsl:value-of select="title"
/></a></td>
-
</xsl:otherwise>
-
</xsl:choose>
-
</tr>
-
</xsl:for-each>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </td>
- <xsl:for-each
select="/PHPGW/API/appmenus/appmenus_item">
- <td align="left" width="1%">
- <div
onMouseover="javascript:showdiv('appmenu{position()}');"
onMouseout="javascript:hidediv('appmenu{position()}');">
- <table class="sidebox"
cellSpacing="1" cellPadding="0" width="100%" border="0">
- <tr>
- <td
class="sideboxtitle" align="center" height="28"><a onMouseOver="" onMouseout=""
onClick="javascript:autoshowhidediv('appmenu{position()}');"><xsl:value-of
select="title"/></a></td>
- </tr>
- <tr>
- <td>
- <div
id="appmenu{position()}" style="float:left; width:150px;position: absolute;
visibility: hidden;">
- <table
class="sideboxcontent" bgColor="#efefef" cellSpacing="0" cellPadding="0"
width="100%" border="0" valign="top">
-
<xsl:for-each select="links/links_item">
-
<tr>
-
<td vAlign="top" align="center"><font
color="#ff9933">*</font></td>
-
<xsl:choose>
-
<xsl:when test="/PHPGW/API/form_lock = 1">
-
<td width="100%" height="20"
align="left" vAlign="top"><font class="fake_link"><xsl:value-of select="title"
/></font></td>
-
</xsl:when>
-
<xsl:otherwise>
-
<td width="100%" height="20"
align="left" vAlign="top"><a href="{$baseurl}&op={op}"><xsl:value-of
select="title" /></a></td>
-
</xsl:otherwise>
-
</xsl:choose>
-
</tr>
-
</xsl:for-each>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </xsl:for-each>
- </xsl:if>
- <td width="99%"></td></tr></table>
-
-
-
</td>
</tr>
<tr>
-
<td vAlign="top" height="100%">
-
-
+
<td valign="top" height="100%">
-
-
<table align="center" class="box"
cellSpacing="1" cellPadding="0" width="100%" border="0">
+
<table align="center" class="box"
cellspacing="1" cellpadding="0" width="100%" border="0" valign="top">
<tr>
-
<td height="23"
colSpan="2" align="center" class="articletitle">
+
<td height="23"
colspan="2" align="center" class="articletitle">
<table
border="0" align="center" width="100%">
<tr>
<td align="left" width="5%">
@@ -237,7 +310,7 @@
</td>
</tr>
<tr align="center">
-
<td height="20"
colSpan="2" bgColor="#efefef" class="mainnote">
+
<td height="20"
colspan="2" bgcolor="#efefef" class="mainnote">
<xsl:apply-templates select="PHPGW/API/msgbox" />
<xsl:choose>
<xsl:when test="/PHPGW/APPHTML">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/skins/default/phpgw.xsl, 1.1.1.1.2.30,
nomail <=