fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10705] property: budget handling - disable listing f


From: Sigurd Nes
Subject: [Fmsystem-commits] [10705] property: budget handling - disable listing for now at project and order list
Date: Tue, 22 Jan 2013 14:35:50 +0000

Revision: 10705
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10705
Author:   sigurdne
Date:     2013-01-22 14:35:38 +0000 (Tue, 22 Jan 2013)
Log Message:
-----------
property: budget handling - disable listing for now at project and order list

Modified Paths:
--------------
    trunk/logistic/inc/class.uiactivity.inc.php
    trunk/logistic/inc/class.uirequirement.inc.php
    trunk/logistic/templates/base/requirement/requirement_item.xsl
    trunk/logistic/templates/base/requirement/requirement_overview.xsl
    trunk/logistic/templates/base/requirement/requirement_values.xsl

Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2013-01-22 10:15:47 UTC (rev 
10704)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2013-01-22 14:35:38 UTC (rev 
10705)
@@ -220,7 +220,8 @@
                                                'text'                  => 
lang('t_new_requirement'),
                                                'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
                                                (
-                                                       'menuaction'    => 
'logistic.uirequirement.edit'
+                                                       'menuaction'    => 
'logistic.uirequirement.edit',
+                                                       'nonavbar'              
=> true
                                                )),
                                                'parameters'    => 
json_encode($parameters3)
                                        );

Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php      2013-01-22 10:15:47 UTC 
(rev 10704)
+++ trunk/logistic/inc/class.uirequirement.inc.php      2013-01-22 14:35:38 UTC 
(rev 10705)
@@ -49,6 +49,7 @@
                private $so_project;
                private $so_resource_type_requirement;
                private $so_resource_allocation;
+               private $nonavbar;
 
                public $public_functions = array(
                        'query'                                                 
                        => true,
@@ -76,6 +77,18 @@
                        $this->so_resource_allocation = 
CreateObject('logistic.sorequirement_resource_allocation');
 
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"logistic::project::requirement";
+
+/*
+                       if( $this->nonavbar     = phpgw::get_var('nonavbar', 
'bool'))
+                       {
+                               $GLOBALS['phpgw_info']['flags']['nonavbar'] = 
$this->nonavbar;
+                               $GLOBALS['phpgw_info']['flags']['noheader_xsl'] 
= true;
+                               $GLOBALS['phpgw_info']['flags']['nofooter']     
        = true;
+                       }
+*/
+                       $GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
+                       $GLOBALS['phpgw_info']['flags']['noheader_xsl'] = true;
+                       $GLOBALS['phpgw_info']['flags']['nofooter']             
= true;
                }
 
 
@@ -145,10 +158,17 @@
                                        $rows[] = $result->serialize();
                                }
                        }
-
+//_debug_array($rows);
                        $line_id = 0; // optional preselect
                        foreach($rows as &$entry)
                        {
+
+//FIXME: hent verdier
+/*
+                               $_filters = array('requirement_id' => 
$entry['id']);
+                               $requirement_values_array = 
$this->so_requirement_value->get(0, false, $sort_field, $sort_ascending, 
$search_for, $search_type, $_filters);
+
+*/
                                $_checked = '';
 
                                if($entry['id'] == $line_id)
@@ -156,7 +176,7 @@
                                        $_checked = 'checked="checked"';
                                }
                                
-                         $num_required = $entry['no_of_items'];
+                               $num_required = $entry['no_of_items'];
          
                                $filters = array('requirement_id' => 
$entry['id']);
                                $num_allocated = 
$this->so_resource_allocation->get_count($search_for, $search_type, $filters);
@@ -179,7 +199,8 @@
                                        $entry['alloc_link'] = "<a 
class=\"btn-sm alloc\" href=\"{$href}\">Tildel ressurser</a>";
                                }
                                
-                               $href = self::link(array('menuaction' => 
'logistic.uirequirement.edit', 'id' => $entry['id']));
+                               //$href = self::link(array('menuaction' => 
'logistic.uirequirement.edit', 'id' => $entry['id']));
+                               $href = 
"javascript:load_requirement_edit_id({$entry['id']});";
                                $entry['edit_requirement_link'] = "<a 
class=\"btn-sm alloc\" href=\"{$href}\">Endre behov</a>";
                        }
 
@@ -466,7 +487,6 @@
                                $GLOBALS['phpgw_info']['flags']['nofooter']     
        = true;
                        }
 
-
                        if ($requirement_id)
                        {
                                $requirement = 
$this->so->get_single($requirement_id);
@@ -602,12 +622,12 @@
 
                        $data = array
                        (
-                               'tabs'                                          
                                                        => 
$GLOBALS['phpgw']->common->create_tabs($tabs, 1),
-                               'view'                                          
                                                        => "requirement_values",
-                               'requirement'                                   
                                => $requirement,
+                               'tabs'                                          
        => $GLOBALS['phpgw']->common->create_tabs($tabs, 1),
+                               'view'                                          
        => "requirement_values",
+                               'requirement'                                   
=> $requirement,
                                'requirement_attributes_array'  => 
$requirement_attributes_array,
-                               'distict_locations'                             
                => $distict_locations_array,
-                               'editable'                                      
                                                => true,
+                               'distict_locations'                     => 
$distict_locations_array,
+                               'editable'                                      
        => true,
                        );
 
                        if($activity_id > 0)
@@ -623,6 +643,13 @@
 
                public function view_requirement_values()
                {
+                       if( $nonavbar   = phpgw::get_var('nonavbar', 'bool'))
+                       {
+                               $GLOBALS['phpgw_info']['flags']['nonavbar'] = 
$nonavbar;
+                               $GLOBALS['phpgw_info']['flags']['noheader_xsl'] 
= true;
+                               $GLOBALS['phpgw_info']['flags']['nofooter']     
        = true;
+                       }
+
                        $requirement_id = phpgw::get_var('requirement_id');
 
                        if ($requirement_id && is_numeric($requirement_id))
@@ -732,7 +759,7 @@
                                        
$this->so_requirement_value->store($requirement_value);
                                }
 
-                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'logistic.uirequirement.view_requirement_values', 
'requirement_id' => $requirement_id));
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'logistic.uirequirement.view_requirement_values', 
'requirement_id' => $requirement_id, 'nonavbar' => $this->nonavbar));
                }               
                
                public function get_custom_attributes($location_id, 
$activity_id){
@@ -780,7 +807,8 @@
                {
                        $tabs = array();
 
-                       if($requirement_id > 0){
+                       if($requirement_id > 0)
+                       {
 
                                $requirement = 
$this->so->get_single($requirement_id);
 
@@ -788,13 +816,17 @@
                                                   array(
                                                        'label' => "1: " . 
lang('Requirement details'),
                                                   'link'  => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'logistic.uirequirement.view',
-                                                                               
                                                                                
                                                                                
                         'id' => $requirement->get_id()))
+                                                                               
                                                                                
         'id' => $requirement->get_id(),
+                                                                               
                                                                                
         'nonavbar' => $this->nonavbar))
                                                ), array(
                                                        'label' => "2: " . 
lang('Add constraints'),
                                                        'link'  => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'logistic.uirequirement.view_requirement_values',
-                                                                               
                                                                                
                                                                                
                         'requirement_id' => $requirement->get_id()))
+                                                                               
                                                                                
        'requirement_id' => $requirement->get_id(),
+                                                                               
                                                                                
         'nonavbar' => $this->nonavbar))
                                                ));
-                       }else{
+                       }
+                       else
+                       {
                                $tabs = array(
                                                   array(
                                                        'label' => "1: " . 
lang('Requirement details')

Modified: trunk/logistic/templates/base/requirement/requirement_item.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_item.xsl      
2013-01-22 10:15:47 UTC (rev 10704)
+++ trunk/logistic/templates/base/requirement/requirement_item.xsl      
2013-01-22 14:35:38 UTC (rev 10705)
@@ -142,9 +142,9 @@
                                                <input type="submit" 
name="save_requirement" value="{$lang_save}" title = "{$lang_save}" />
                                                <input type="submit" 
name="cancel_requirement" value="{$lang_cancel}" title = "{$lang_cancel}" />    
                           
                                                                
-                                               <a style="margin-left: 20px;" 
id="view-resources-btn" class="btn non-focus" href="{$view_resources_url}">
+                                       <!--    <a style="margin-left: 20px;" 
id="view-resources-btn" class="btn non-focus" href="{$view_resources_url}">
                                                  <xsl:value-of 
select="php:function('lang', 'View resources overview')" />
-                                               </a>
+                                               </a>-->
                                                
                                        </xsl:when>
                                        <xsl:otherwise>
@@ -160,9 +160,9 @@
                                                  <xsl:value-of 
select="php:function('lang', 'edit')" />
                                                </a>
 
-                                               <a style="margin-left: 20px;" 
id="view-resources-btn" class="btn non-focus" href="{$view_resources_url}">
+                                               <!--<a style="margin-left: 
20px;" id="view-resources-btn" class="btn non-focus" 
href="{$view_resources_url}">
                                                  <xsl:value-of 
select="php:function('lang', 'View resources overview')" />
-                                               </a>
+                                               </a>-->
                                        </xsl:otherwise>
                                </xsl:choose>
                        </div>

Modified: trunk/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_overview.xsl  
2013-01-22 10:15:47 UTC (rev 10704)
+++ trunk/logistic/templates/base/requirement/requirement_overview.xsl  
2013-01-22 14:35:38 UTC (rev 10705)
@@ -51,6 +51,13 @@
                TINY.box.show({iframe:requestUrl, 
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true, close: true,closejs:function(){closeJS_local()}});
        }
 
+       function load_requirement_edit_id( id ){
+               var oArgs = {menuaction: 'logistic.uirequirement.edit', id:id, 
nonavbar: true, lean: true};
+               var requestUrl = phpGWLink('index.php', oArgs);
+
+               TINY.box.show({iframe:requestUrl, 
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true, close: true,closejs:function(){closeJS_local()}});
+       }
+
        function closeJS_local()
        {
                var reqUrl = '<xsl:value-of select="//datatable/source"/>';

Modified: trunk/logistic/templates/base/requirement/requirement_values.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_values.xsl    
2013-01-22 10:15:47 UTC (rev 10704)
+++ trunk/logistic/templates/base/requirement/requirement_values.xsl    
2013-01-22 14:35:38 UTC (rev 10705)
@@ -191,9 +191,9 @@
                                                <input type="submit" 
name="save_requirement_values" value="{$lang_save}" title = "{$lang_save}" />
                                                <input type="submit" 
name="cancel_requirement_values" value="{$lang_cancel}" title = 
"{$lang_cancel}" />
                                                
-                                               <a style="margin-left: 20px;" 
id="view-resources-btn" class="btn non-focus" href="{$view_resources_url}">
+                                               <!--<a style="margin-left: 
20px;" id="view-resources-btn" class="btn non-focus" 
href="{$view_resources_url}">
                                                  <xsl:value-of 
select="php:function('lang', 'View resources overview')" />
-                                               </a>
+                                               </a>-->
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <xsl:variable name="params">
@@ -205,9 +205,9 @@
                                                        </xsl:variable>
                                                        <a class="btn" 
href="{$edit_url}"><xsl:value-of select="php:function('lang', 'edit')" /></a>
                                                        
-                                               <a style="margin-left: 20px;" 
id="view-resources-btn" class="btn non-focus" href="{$view_resources_url}">
+                                               <!--<a style="margin-left: 
20px;" id="view-resources-btn" class="btn non-focus" 
href="{$view_resources_url}">
                                                  <xsl:value-of 
select="php:function('lang', 'View resources overview')" />
-                                               </a>
+                                               </a>-->
                                        </xsl:otherwise>
                                </xsl:choose>
                        </div>




reply via email to

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