phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] notes/skins/default/base.xsl, 1.1.2.1


From: nomail
Subject: [Phpgroupware-cvs] notes/skins/default/base.xsl, 1.1.2.1
Date: Thu, 20 May 2004 18:02:41 -0000

Update of /notes/skins/default
Added Files:
        Branch: proposal-branch
          base.xsl

date: 2004/04/17 06:45:37;  author: jengo;  state: Exp;  lines: +530 -0

Log Message:
Merging changes over from the temp CVS server
=====================================================================
<?xml version="1.0"?>   
<!-- $Id: base.xsl,v 1.1.2.1 2004/04/17 06:45:37 jengo Exp $ -->
<!-- $Source: /cvsroot/phpgroupware/notes/skins/default/Attic/base.xsl,v $ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output indent="yes"/>

<xsl:template match="APP">

</xsl:template> 

<xsl:template match="APP[action_type='note_create']">
        <input type="hidden" name="form_submit" value="true" />
        <input type="hidden" name="status" value="{/PHPGW/APP/note/status}" />
        <input type="hidden" name="datamine_location" 
value="{note/datamine_location}" />
        <input type="hidden" name="dm_type" value="{note/dm_type}" />
        <input type="hidden" name="dm_redirect" value="{note/dm_redirect}" />

        <table border="0" width="95%" cellpadding="1" cellspacing="1">
        <tr>
                <td width="*" valign="top">

                        <table class="normalbox" cellSpacing="1" 
cellPadding="0" width="100%" border="0">
                                <tr>
                                        <td class="sideboxtitle" align="center" 
height="28" width="100%">Create note</td>
                                </tr>
                                <tr>
                                        <td class="sideboxcontent" 
bgColor="#efefef">
                                                <table class="sideboxtext" 
cellSpacing="0" cellPadding="2" width="70%" border="0" valign="top" 
align="left">
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Category:</td>
                                                                <td width="75%" 
align="left">
                                                                        <select 
name="category">
                                                                                
<option value="0">None</option>
                                                                        
</select>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Access:</td>
                                                                <td width="75%" 
align="left">
                                                                        <select 
name="access">
                                                                                
<option value="private">Private</option>
                                                                                
<option value="public">Public</option>
                                                                        
</select>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><hr /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td colspan="2" 
width="center">
                                                                        
<textarea name="content" cols="80" rows="15" wrap="virtual">
                                                                                
<xsl:if test="missing_fields/content = 1">
                                                                                
        <xsl:attribute name="class">form_object_missing</xsl:attribute>
                                                                                
</xsl:if>
                                                                                
<xsl:value-of select="/PHPGW/APP/note/content" />
                                                                        
</textarea>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td colspan="3" 
align="right">

                                                                        
<xsl:variable name="prevop" select="/PHPGW/API/prevop" />
                                                                        <table 
width="100%" border="0">
                                                                                
<td width="*">&#160;</td>
                                                                                
<td align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/save.png" value="notes.base.create" alt="Create" 
title="Create" /></td>
                                                                        </table>

                                                                </td>
                                                        </tr>
                                                </table>
                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
        </table>

        <p>&#160;</p>
</xsl:template>

<xsl:template match="APP[action_type='note_edit']">
        <input type="hidden" name="form_submit" value="true" />
        <input type="hidden" name="note_id" value="{/PHPGW/APP/note/id}" />

        <table border="0" width="95%" cellpadding="1" cellspacing="1">
        <tr>
                <td width="*" valign="top">

                        <table class="normalbox" cellSpacing="1" 
cellPadding="0" width="100%" border="0">
                                <tr>
                                        <td class="sideboxtitle" align="center" 
height="28" width="100%">Edit note for <xsl:value-of select="owner" /></td>
                                </tr>
                                <tr>
                                        <td class="sideboxcontent" 
bgColor="#efefef">
                                                <table class="sideboxtext" 
cellSpacing="0" cellPadding="2" width="70%" border="0" valign="top" 
align="left">
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Category:</td>
                                                                <td width="75%" 
align="left">
                                                                        <!-- 
TODO: create widget to handle this -->
                                                                        <select 
name="category">
                                                                                
<option value="0">None</option>
                                                                        
</select>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Access:</td>
                                                                <td width="75%" 
align="left">
                                                                        <!-- 
TODO: create widget to handle this -->
                                                                        <select 
name="access">
                                                                                
<option value="private">
                                                                                
        <xsl:if test="/PHPGW/APP/note/access = 'private'">
                                                                                
                <xsl:attribute name="selected">selected</xsl:attribute>
                                                                                
        </xsl:if>
                                                                                
        Private
                                                                                
</option>
                                                                                
<option value="public">
                                                                                
        <xsl:if test="/PHPGW/APP/note/access = 'public'">
                                                                                
                <xsl:attribute name="selected">selected</xsl:attribute>
                                                                                
        </xsl:if>
                                                                                
        Public
                                                                                
</option>
                                                                        
</select>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><hr /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td colspan="2" 
width="center">
                                                                        
<textarea name="content" cols="80" rows="15" wrap="virtual">
                                                                                
<xsl:if test="missing_fields/content = 1">
                                                                                
        <xsl:attribute name="class">form_object_missing</xsl:attribute>
                                                                                
</xsl:if>
                                                                                
<xsl:value-of select="/PHPGW/APP/note/content" />
                                                                        
</textarea>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td colspan="3" 
align="right">

                                                                        
<xsl:variable name="prevop" select="/PHPGW/API/prevop" />
                                                                        <table 
width="100%" border="0">
                                                                                
<td width="*">&#160;</td>
                                                                                
<td align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/save.png" value="notes.base.edit" alt="Edit" 
title="Edit" /></td>
                                                                        </table>

                                                                </td>
                                                        </tr>
                                                </table>
                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
        </table>

        <p>&#160;</p>
</xsl:template>

<xsl:template name="notes_view">
        <xsl:param name="note" />

        <table border="0" width="95%" cellpadding="1" cellspacing="1">
        <tr>
                <td width="*" valign="top">

                        <table class="normalbox" cellSpacing="1" 
cellPadding="0" width="100%" border="0">
                                <tr>
                                        <td class="sideboxtitle" align="center" 
height="28" width="100%">Note for <xsl:value-of select="note/owner" /></td>
                                </tr>
                                <tr>
                                        <td class="articlecontent" 
bgColor="#efefef">
                                                <table class="sideboxtext" 
cellSpacing="0" cellPadding="0" width="70%" border="0" valign="top" 
align="left">
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Created on:</td>
                                                                <td width="75%" 
align="left"><xsl:value-of select="note/created" /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Last modified:</td>
                                                                <td width="75%" 
align="left">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="note/modified = note/created">
                                                                                
        -
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:value-of select="note/modified" />
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Category:</td>
                                                                <td width="75%" 
align="left">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="note/category = ''">
                                                                                
        -
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:value-of select="note/category" />
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Access:</td>
                                                                <td width="75%" 
align="left"><xsl:value-of select="note/access" /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><hr /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><pre><xsl:value-of select="note/content" /></pre></td>
                                                        </tr>
                                                </table>
                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
        </table>
</xsl:template>

<xsl:template match="APP[action_type='note_view']">
        <xsl:call-template name="notes_view">
                <xsl:with-param name="note" select="note" />
        </xsl:call-template>

        <xsl:call-template name="record_history">
                <xsl:with-param name="history_data" select="history_data" />
                <xsl:with-param name="title" select="'Note history'" />
        </xsl:call-template>

        <!-- FIXME: There should be a generic widget for this -->
        <xsl:if test="count(datamine/datamine_item) > 0">
                <table border="0" width="95%">
                        <tr>
                                <td><font color="#000000"><b>Record 
links</b></font></td>
                        </tr>
                </table>
                <xsl:apply-templates select="datamine/datamine_item" />
        </xsl:if>
</xsl:template>

<xsl:template match="APP[action_type='note_delete']">
        <xsl:if test="count(dialog) > 0">
                <br />
                <xsl:call-template name="widget_dialog_yesno">
                        <xsl:with-param name="question" 
select="dialog/question" />
                        <xsl:with-param name="yes_op" select="dialog/yes_op" />
                        <xsl:with-param name="no_op" select="dialog/no_op" />
                        <xsl:with-param name="inputs" 
select="dialog/current_inputs/current_inputs_item" />
                </xsl:call-template>
                <p>&#160;</p>
        </xsl:if>

        <xsl:call-template name="notes_view">
                <xsl:with-param name="values" select="note" />
        </xsl:call-template>
</xsl:template>

<xsl:template match="APP[action_type='note_start']">
<script type="text/javascript">
            function setPointer(theRow, thePointerColor)
            {
                if (thePointerColor == '' || typeof(theRow.style) == 
'undefined')
                {
                    return false;
                }

                if (typeof(document.getElementsByTagName) != 'undefined')
                {
                    var theCells = theRow.getElementsByTagName('td');
                }
                else if (typeof(theRow.cells) != 'undefined')
                {
                    var theCells = theRow.cells;
                }
                else
                {
                    return false;
                }

                var rowCellsCnt = theCells.length;

                for (var c = 0; c &lt; rowCellsCnt; c++)
                {
                    theCells[c].style.backgroundColor = thePointerColor;
                }

                return true;
                }

                function inlinedetails(noteid)
                {
                        
if(document.getElementById('hidden_details_'+noteid).style.visibility == 
"hidden")
                        {
                                
document.getElementById('hidden_details_'+noteid).style.display ="block";
                                
document.getElementById('hidden_details_'+noteid).style.visibility ="visible";
                        }
                        else
                        {
                                
document.getElementById('hidden_details_'+noteid).style.display ="none";
                                
document.getElementById('hidden_details_'+noteid).style.visibility ="hidden";
                        }
                }
                        
                function editinlinedetails(noteid)
                {
                        if(document.getElementById('href_'+noteid).innerHTML == 
"Edit")
                        {
                                
document.getElementById('content_'+noteid).readOnly = false;
                                
document.getElementById('content_'+noteid).className  = "active";
                                
document.getElementById('href_'+noteid).innerHTML = "Save";
                        }
                        else
                        {
                                
document.getElementById('content_'+noteid).readOnly = true;
                                
document.getElementById('content_'+noteid).className  = "readonly";
                                
document.getElementById('href_'+noteid).innerHTML = "Edit";
                                
document.getElementById('form_'+noteid).submit();
                        }
                }
        </script>

        <table cellSpacing="1" cellPadding="0" width="95%" border="0" 
align="center">
                <tr>
                        <td width="100%">
                                <table border="0" width="100%">
                                        <tr>
                                                <td align="left">
                                                        <xsl:call-template 
name="nextmatchs_left">
                                                                <xsl:with-param 
name="op" select="concat($baseurl,'&amp;op=notes.base.start')" />
                                                        </xsl:call-template>
                                                </td>
                                                <td align="center">
                                                        <xsl:value-of 
select="/PHPGW/API/nextmatchs/text" />
                                                </td>
                                                <td align="right">
                                                        <xsl:call-template 
name="nextmatchs_right">
                                                                <xsl:with-param 
name="op" select="concat($baseurl,'&amp;op=notes.base.start')" />
                                                        </xsl:call-template>
                                                </td>
                                        </tr>
                                </table>
                        </td>
                </tr>
        </table>

        <table class="normalbox" cellSpacing="1" cellPadding="0" width="95%" 
border="0" align="center">
                <tr>
                        <td class="sideboxtitle" align="center" height="28" 
width="100%">

                                <table class="normalbox_title" border="0" 
width="100%" cellspacing="0" cellpadding="0">
                                        <tr>
                                                <td width="*">&#160;</td>
                                                <td 
width="22%"><b>Owner</b></td>
                                                <td 
width="18%"><b>Created</b></td>
                                                <td width="24">&#160;</td>
                                                <td width="24">&#160;</td>
                                        </tr>
                                </table>

                        </td>
                </tr>
                <tr>
                        <td class="articlecontent" bgcolor="#efefef" 
align="center" width="100%">
                                <table class="sideboxtext" cellspacing="0" 
cellpadding="0" width="100%" border="0" valign="top" align="center">

                                        <xsl:if test="count(notes/notes_item) = 
0">
                                                <tr class="sideboxtext">
                                                        <td colspan="6" 
align="center"><font color="#000000">No records found</font></td>
                                                </tr>
                                        </xsl:if>

                                        <xsl:for-each select="notes/notes_item">
                                        <xsl:variable name="note_id" 
select="id" />

                                        <tr class="sideboxtext">
                                                <xsl:choose>
                                                        <!-- NOTE and FIXME: 
The setPointer() function was borrowed -->
                                                        <!-- from phpMyAdmin, 
it doesn't use CSS, it needs to be -->
                                                        <!-- converted to 
handle it -->
                                                        <xsl:when 
test="position() mod 2 = 1">
                                                                <xsl:attribute 
name="class">row_on</xsl:attribute>
                                                                <xsl:attribute 
name="onmouseover">setPointer(this, '#D3DCE3')</xsl:attribute>
                                                                <xsl:attribute 
name="onmouseout">setPointer(this, '#DDDDDD')</xsl:attribute>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <xsl:attribute 
name="class">row_off</xsl:attribute>
                                                                <xsl:attribute 
name="onmouseover">setPointer(this, '#D3DCE3')</xsl:attribute>
                                                                <xsl:attribute 
name="onmouseout">setPointer(this, '#EEEEEE')</xsl:attribute>
                                                        </xsl:otherwise>
                                                </xsl:choose>

                                                <td width="*">
                                                        <font color="#000000">
                                                                <a 
href="{$baseurl}&amp;op=notes.base.view&amp;note_id={$note_id}">
                                                                        
<xsl:value-of select="content_title" />
                                                                </a>
                                                        </font> - 
                                                        <a 
href="javascript:inlinedetails('{$note_id}');">(New View Tester)</a>
                                                </td>
                                                <td width="22%"><font 
color="#000000"><xsl:value-of select="owner" />&#160;</font></td>
                                                <td width="18%"><font 
color="#000000"><xsl:value-of select="created" />&#160;</font></td>
                                                <xsl:choose>
                                                        <xsl:when 
test="/PHPGW/APP/edit_allowed = 1">
                                                                <td width="24" 
align="right"><a 
href="{$baseurl}&amp;op=notes.base.edit&amp;note_id={$note_id}"><img alt="Edit" 
title="Edit" src="{$api_image_path}/edit.png" border="0" /></a></td>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <td 
width="24">&#160;</td>
                                                        </xsl:otherwise>
                                                </xsl:choose>

                                                <xsl:choose>
                                                        <xsl:when 
test="/PHPGW/APP/delete_allowed = 1">
                                                                <td width="24" 
align="right"><a 
href="{$baseurl}&amp;op=notes.base.delete&amp;note_id={$note_id}"><img 
alt="Delete" title="Delete" src="{$api_image_path}/delete.png" border="0" 
/></a></td>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <td 
width="24">&#160;</td>
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </tr>
                                        <tr><td colspan="5"><div 
id="show_details_{$note_id}">
                                                <div 
id="hidden_details_{$note_id}" style="display:none; visibility: hidden;">
                                                        <form 
id="form_{$note_id}" method="POST" action="{$baseurl}&amp;op=notes.base.edit">
        <input type="hidden" name="form_submit" value="true" />
        <input type="hidden" name="note_id" value="{$note_id}" />
        
        <table border="0" width="95%" cellpadding="1" cellspacing="1">
        <tr>
                <td width="*" valign="top">

                        <table class="normalbox" cellSpacing="1" 
cellPadding="0" width="100%" border="0">
                                <tr>
                                        <td class="sideboxtitle" align="center" 
height="28" width="100%">Note for <xsl:value-of select="owner" /></td>
                                </tr>
                                <tr>
                                        <td class="sideboxcontent" 
bgColor="#efefef">
                                                <table class="sideboxtext" 
cellSpacing="0" cellPadding="0" width="70%" border="0" valign="top" 
align="left">
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Created on:</td>
                                                                <td width="75%" 
align="left"><xsl:value-of select="created" /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Last modified:</td>
                                                                <td width="75%" 
align="left">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="modified = created">
                                                                                
        -
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:value-of select="modified" />
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Category:</td>
                                                                <td width="75%" 
align="left">
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="category = ''">
                                                                                
        -
                                                                                
</xsl:when>
                                                                                
<xsl:otherwise>
                                                                                
        <xsl:value-of select="category" />
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
width="25%">Access:</td>
                                                                <td width="75%" 
align="left"><xsl:value-of select="access" /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><hr /></td>
                                                        </tr>
                                                        <tr>
                                                                <td 
width="2%">&#160;</td>
                                                                <td 
colspan="2"><textarea id="content_{$note_id}" name="content" cols="80" 
wrap="virtual" readonly="true" class="readonly"><xsl:value-of select="content" 
/></textarea></td>
                                                        </tr>
                                                </table>
                                        </td>
                                </tr>
                                <tr><td><a id="href_{$note_id}" 
href="javascript:editinlinedetails('{$note_id}');" title="click to edit this 
entry">Edit</a></td></tr>
                        </table>
                </td>
        </tr>
        </table>

                                                        
        </form>         </div>

                                        
                                        </div></td></tr>
                                        </xsl:for-each>
                                </table>
                        </td>
                </tr>
        </table>
        <br />
        <table cellSpacing="0" cellPadding="0" width="95%" border="0" 
align="center">
                <tr>
                        <td width="100%">
                                <input name="search" size="40" value=" [ Search 
]" />
                        </td>
                </tr>
        </table>
        <p>&#160;</p>
</xsl:template>

</xsl:stylesheet>




reply via email to

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