fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10407]


From: Torstein
Subject: [Fmsystem-commits] [10407]
Date: Thu, 01 Nov 2012 11:30:44 +0000

Revision: 10407
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10407
Author:   vator
Date:     2012-11-01 11:30:44 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/logistic/inc/class.uiactivity.inc.php
    trunk/logistic/setup/phpgw_no.lang
    trunk/logistic/templates/base/activity/view_activity_item.xsl

Added Paths:
-----------
    trunk/logistic/templates/base/activity/activity_tabs.xsl

Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2012-11-01 11:22:44 UTC (rev 
10406)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2012-11-01 11:30:44 UTC (rev 
10407)
@@ -152,7 +152,6 @@
                                ),
                        );
 
-
                        $parameters = array
                                (
                                        'parameter' => array
@@ -419,8 +418,12 @@
                                $activity->set_responsible_user_name( 
$responsible_user );
                        }
 
+                       $tabs = $this->make_tab_menu($activity_id);
+                       
                        $data = array
                        (
+                               'tabs'           => 
$GLOBALS['phpgw']->common->create_tabs($tabs, 0),
+                               'view'           => 'activity_details',
                                'activity' => $activity
                        );
 
@@ -430,9 +433,7 @@
                                $data['parent_activity'] = $parent_activity;
                        }
                        
-                       $activity_children = 
$this->so->get($activity->get_id());
-
-                       
self::render_template_xsl('activity/view_activity_item', $data);
+                       
self::render_template_xsl(array('activity/view_activity_item', 
'activity/activity_tabs'), $data);
                }
                
                public function save()
@@ -509,4 +510,34 @@
 
                        return $user_array;
                }
+               
+               function make_tab_menu($activity_id)
+               {
+                       $tabs = array();
+
+                       if($activity_id > 0){
+
+                               $activity = $this->so->get_single($activity_id);
+
+                               $tabs = array(
+                                                  array(
+                                                       'label' => "1: " . 
lang('Activity details'),
+                                                  'link'  => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'logistic.uiactivity.view',
+                                                                               
                                                                                
                                                                                
                         'id' => $activity->get_id()))
+                                               ), array(
+                                                       'label' => "2: " . 
lang('Requirement allocation'),
+                                                       'link'  => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'logistic.uirequirement_resource_allocation.view',
+                                                                               
                                                                                
                                                                                
                         'activity_id' => $activity->get_id()))
+                                               ));
+                       }else{
+                               $tabs = array(
+                                                  array(
+                                                       'label' => "1: " . 
lang('Activity details')
+                                               ), array(
+                                                       'label' => "2: " . 
lang('Requirement allocation')
+                               ));
+                       }
+
+                       return $tabs;
+               }
        }

Modified: trunk/logistic/setup/phpgw_no.lang
===================================================================
--- trunk/logistic/setup/phpgw_no.lang  2012-11-01 11:22:44 UTC (rev 10406)
+++ trunk/logistic/setup/phpgw_no.lang  2012-11-01 11:30:44 UTC (rev 10407)
@@ -69,4 +69,5 @@
 Delete requirement     logistic        no Slett krav
 Allocate resources     logistic        no      Alloker ressurser
 Num allocated  logistic        no      Antall allokert
-Status logistic        no      Status
\ No newline at end of file
+Status logistic        no      Status
+Requirement allocation logistic        no      Allokering av ressurser
\ No newline at end of file

Added: trunk/logistic/templates/base/activity/activity_tabs.xsl
===================================================================
--- trunk/logistic/templates/base/activity/activity_tabs.xsl                    
        (rev 0)
+++ trunk/logistic/templates/base/activity/activity_tabs.xsl    2012-11-01 
11:30:44 UTC (rev 10407)
@@ -0,0 +1,57 @@
+<!-- $Id: control_tabs.xsl 9951 2012-08-31 10:14:12Z vator $ -->
+<!-- separate tabs and  inline tables-->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+<div class="yui-navset yui-navset-top" id="activity_tabview">
+
+       <xsl:choose>
+               <xsl:when test="view = 'activity_details'">
+                       <xsl:call-template name="yui_phpgw_i18n"/>
+               
+                       <xsl:choose>
+                               <xsl:when test="activity/id != '' or 
activity/id != 0">
+                                       <h1 style="float:left;"> 
+                                               <span>
+                                                       <xsl:value-of 
select="php:function('lang', 'Add requirement to activity')" />
+                                               </span>
+                                               <span style="margin-left:5px;">
+                                                       <xsl:value-of 
select="activity/name" />
+                                               </span>
+                                       </h1>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <h1 style="float:left;"> 
+                                               <xsl:value-of 
select="php:function('lang', 'Requirement allocation')" />
+                                       </h1>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
+                       <xsl:call-template name="activity_details" />
+               </xsl:when>
+               <xsl:when test="view = 'resource_allocation'">
+                       <xsl:choose>
+                               <xsl:when test="activity/id != '' or 
activity/id != 0">
+                                       <h1 style="float:left;"> 
+                                               <span>
+                                                       <xsl:value-of 
select="php:function('lang', 'Add criterias')" />
+                                               </span>
+                                               <span style="margin-left:5px;">
+                                                       <xsl:value-of 
select="activity/name" />
+                                               </span>
+                                       </h1>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <h1 style="float:left;"> 
+                                               <xsl:value-of 
select="php:function('lang', 'Add criterias')" />
+                                       </h1>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
+                       <xsl:call-template name="requirement_values" />
+               </xsl:when>
+       </xsl:choose>
+</div>
+       
+</xsl:template>


Property changes on: trunk/logistic/templates/base/activity/activity_tabs.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/logistic/templates/base/activity/view_activity_item.xsl
===================================================================
--- trunk/logistic/templates/base/activity/view_activity_item.xsl       
2012-11-01 11:22:44 UTC (rev 10406)
+++ trunk/logistic/templates/base/activity/view_activity_item.xsl       
2012-11-01 11:30:44 UTC (rev 10407)
@@ -1,11 +1,10 @@
 <!-- $Id: activity_item.xsl 10305 2012-10-23 09:08:34Z vator $ -->
 <!-- item  -->
 
-<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+<xsl:template name="activity_details" xmlns:php="http://php.net/xsl";>
 <xsl:variable name="date_format"><xsl:value-of 
select="php:function('get_phpgw_info', 
'user|preferences|common|dateformat')"/></xsl:variable>
 
-<xsl:call-template name="yui_phpgw_i18n"/>
-<div class="yui-navset yui-navset-top">
+<div class="content-wrp">
        <xsl:choose>
                <xsl:when test="parent_activity/id &gt; 0">
                        <h1> 




reply via email to

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