fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8506]


From: Torstein
Subject: [Fmsystem-commits] [8506]
Date: Fri, 06 Jan 2012 09:26:10 +0000

Revision: 8506
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8506
Author:   vator
Date:     2012-01-06 09:26:10 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.uicheck_list.inc.php
    trunk/controller/templates/base/check_list/view_control_details.xsl

Added Paths:
-----------
    trunk/controller/templates/base/check_list/view_control_items.xsl

Removed Paths:
-------------
    trunk/controller/templates/base/control_item/view_control_items.xsl

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2012-01-06 08:29:18 UTC 
(rev 8505)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2012-01-06 09:26:10 UTC 
(rev 8506)
@@ -344,11 +344,10 @@
                                'procedures_array'                      => 
$procedures_array,
                                'role_array'                            => 
$role_array
                        );
-                                       
                        
                        $xslttemplate = CreateObject('phpgwapi.xslttemplates');
                        
-            $xslttemplate->add_file(array(PHPGW_SERVER_ROOT . 
'/controller/templates/base/control/view_control_details'));
+            $xslttemplate->add_file(array(PHPGW_SERVER_ROOT . 
'/controller/templates/base/check_list/view_control_details'));
            
             $xslttemplate->set_var('phpgw',array('view_control_details' => 
$data));
             
@@ -360,10 +359,11 @@
 
                $xsl = new DOMDocument;
                $xsl->loadXML($xslttemplate->xsldata);
-
+               
                // Configure the transformer
                $proc = new XSLTProcessor;
                $proc->importStyleSheet($xsl); // attach the xsl rules
+                       $proc->registerPHPFunctions();
        
                $html = $proc->transformToXML($xml);
 

Modified: trunk/controller/templates/base/check_list/view_control_details.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_control_details.xsl 
2012-01-06 08:29:18 UTC (rev 8505)
+++ trunk/controller/templates/base/check_list/view_control_details.xsl 
2012-01-06 09:26:10 UTC (rev 8506)
@@ -1,6 +1,8 @@
 <!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+<xsl:variable name="date_format">d/m-Y</xsl:variable>
 
-<xsl:template match="view_control_details">
+<xsl:template match="view_control_details" xmlns:php="http://php.net/xsl";>
+       
 
        <fieldset>
                <dl class="proplist-col">
@@ -23,29 +25,7 @@
                        <label>Prosedyre</label>
                </dt>
                <dd>
-               <xsl:choose>
-                       <xsl:when test="editable">
-                               <select id="procedure_id" name="procedure_id">
-                                       <xsl:for-each select="procedures_array">
-                                               <xsl:choose>
-                                                       <xsl:when test="id != 
$control_procedure_id">
-                                                               <option 
value="{id}">
-                                                                       
<xsl:value-of disable-output-escaping="yes" select="title"/>
-                                                               </option>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <option 
value="{id}" selected="selected">
-                                                                       
<xsl:value-of disable-output-escaping="yes" select="title"/>
-                                                               </option>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>                   
                                        
-                                       </xsl:for-each>
-                               </select>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="control/procedure_name" />
-                       </xsl:otherwise>
-               </xsl:choose>
+                       <xsl:value-of select="control/procedure_name" />        
                </dd>
                <dt>
                        <label for="title">Tittel</label>
@@ -64,27 +44,27 @@
                        <label for="start_date">Startdato</label>
                </dt>
                <dd>
-                       <input>
-                     <xsl:attribute name="id">start_date</xsl:attribute>
-                     <xsl:attribute name="name">start_date</xsl:attribute>
-                     <xsl:attribute name="type">text</xsl:attribute>
-                     <xsl:if test="control/start_date != ''">
-                       <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(control/start_date))"/></xsl:attribute>
-                     </xsl:if>
-                   </input>
+                       <xsl:choose>
+                     <xsl:when test="not(control/start_date = '0') or 
not(control/start_date = '')">
+                       <xsl:value-of select="php:function('date', 
$date_format, number(control/start_date))"/>
+                     </xsl:when>
+                     <xsl:otherwise>
+                       Dato ikke angitt
+                     </xsl:otherwise>
+             </xsl:choose>
                </dd>
                <dt>
                        <label for="end_date">Sluttdato</label>
                </dt>
                <dd>
-                       <input>
-                     <xsl:attribute name="id">end_date</xsl:attribute>
-                     <xsl:attribute name="name">end_date</xsl:attribute>
-                     <xsl:attribute name="type">text</xsl:attribute>
-                     <xsl:if test="control/end_date != 0">
-                       <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(control/end_date))"/></xsl:attribute>
-                     </xsl:if>
-                   </input>
+             <xsl:choose>
+                     <xsl:when test="not(control/end_date = '0') or 
not(control/end_date = '')">
+                       Dato ikke angitt
+                     </xsl:when>
+                     <xsl:otherwise>
+                       <xsl:value-of select="php:function('date', 
$date_format, number(control/end_date))"/>
+                     </xsl:otherwise>
+             </xsl:choose>
                </dd>
                <dt>
                        <label>Frekvenstype</label>

Copied: trunk/controller/templates/base/check_list/view_control_items.xsl (from 
rev 8505, trunk/controller/templates/base/control_item/view_control_items.xsl)
===================================================================
--- trunk/controller/templates/base/check_list/view_control_items.xsl           
                (rev 0)
+++ trunk/controller/templates/base/check_list/view_control_items.xsl   
2012-01-06 09:26:10 UTC (rev 8506)
@@ -0,0 +1,53 @@
+<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+
+<xsl:template match="view_control_items">
+
+<ul class="groups">
+       <xsl:for-each select="saved_groups_with_items_array">
+               <li class="drag_group list_item">
+                       <h3><span class="group_order_nr"><xsl:number/></span>. 
<xsl:value-of select="control_group/group_name"/></h3>
+       
+                       <form 
action="index.php?menuaction=controller.uicontrol_item.save_item_order" 
class="frm_save_order">
+                               <xsl:variable 
name="control_group_id"><xsl:value-of select="control_group/id"/></xsl:variable>
+                               <input type="hidden" name="control_group_id" 
value="{$control_group_id}" />
+               
+                               <ul id="list">
+                                       <xsl:for-each select="control_items">
+                                               <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
+                                               <xsl:variable name="order_tag">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="order_nr > 0">
+                                                                       
<xsl:value-of select="order_nr"/>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       
<xsl:number/>
+                                                               </xsl:otherwise>
+                                                       
</xsl:choose>:<xsl:value-of select="id"/>
+                                               </xsl:variable>
+                                                                               
                                
+                                               <li class="list_item">
+                                                       <span class="drag">
+                                                               <span 
class="order_nr"><xsl:number/></span>. <xsl:value-of select="title"/><input 
type="hidden" name="order_nr[]" value="{$order_tag}" />
+                                                       </span>
+                                                       <a class="delete">
+                                                               <xsl:attribute 
name="href">
+                                                                       
<xsl:text>index.php?menuaction=controller.uicontrol_item.delete_item_list</xsl:text>
+                                                                       
<xsl:text>&amp;control_id=</xsl:text>
+                                                                       
<xsl:value-of select="//control_id"/>
+                                                                       
<xsl:text>&amp;control_item_id=</xsl:text>
+                                                                       
<xsl:value-of select="id"/>
+                                                               </xsl:attribute>
+                                                               <span>x</span>
+                                                       </a>
+                                               </li>
+                                       </xsl:for-each>
+                               </ul>
+                       </form>
+               </li>
+       </xsl:for-each>
+</ul>
+
+
+
+
+</xsl:template>


Property changes on: 
trunk/controller/templates/base/check_list/view_control_items.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Deleted: trunk/controller/templates/base/control_item/view_control_items.xsl
===================================================================
--- trunk/controller/templates/base/control_item/view_control_items.xsl 
2012-01-06 08:29:18 UTC (rev 8505)
+++ trunk/controller/templates/base/control_item/view_control_items.xsl 
2012-01-06 09:26:10 UTC (rev 8506)
@@ -1,53 +0,0 @@
-<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-
-<xsl:template match="view_control_items">
-
-<ul class="groups">
-       <xsl:for-each select="saved_groups_with_items_array">
-               <li class="drag_group list_item">
-                       <h3><span class="group_order_nr"><xsl:number/></span>. 
<xsl:value-of select="control_group/group_name"/></h3>
-       
-                       <form 
action="index.php?menuaction=controller.uicontrol_item.save_item_order" 
class="frm_save_order">
-                               <xsl:variable 
name="control_group_id"><xsl:value-of select="control_group/id"/></xsl:variable>
-                               <input type="hidden" name="control_group_id" 
value="{$control_group_id}" />
-               
-                               <ul id="list">
-                                       <xsl:for-each select="control_items">
-                                               <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
-                                               <xsl:variable name="order_tag">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="order_nr > 0">
-                                                                       
<xsl:value-of select="order_nr"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:number/>
-                                                               </xsl:otherwise>
-                                                       
</xsl:choose>:<xsl:value-of select="id"/>
-                                               </xsl:variable>
-                                                                               
                                
-                                               <li class="list_item">
-                                                       <span class="drag">
-                                                               <span 
class="order_nr"><xsl:number/></span>. <xsl:value-of select="title"/><input 
type="hidden" name="order_nr[]" value="{$order_tag}" />
-                                                       </span>
-                                                       <a class="delete">
-                                                               <xsl:attribute 
name="href">
-                                                                       
<xsl:text>index.php?menuaction=controller.uicontrol_item.delete_item_list</xsl:text>
-                                                                       
<xsl:text>&amp;control_id=</xsl:text>
-                                                                       
<xsl:value-of select="//control_id"/>
-                                                                       
<xsl:text>&amp;control_item_id=</xsl:text>
-                                                                       
<xsl:value-of select="id"/>
-                                                               </xsl:attribute>
-                                                               <span>x</span>
-                                                       </a>
-                                               </li>
-                                       </xsl:for-each>
-                               </ul>
-                       </form>
-               </li>
-       </xsl:for-each>
-</ul>
-
-
-
-
-</xsl:template>




reply via email to

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