fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10658] property: project listing


From: Sigurd Nes
Subject: [Fmsystem-commits] [10658] property: project listing
Date: Thu, 10 Jan 2013 08:37:03 +0000

Revision: 10658
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10658
Author:   sigurdne
Date:     2013-01-10 08:37:00 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
property: project listing

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/hook_settings.inc.php

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2013-01-10 08:20:42 UTC (rev 
10657)
+++ trunk/property/inc/class.boproject.inc.php  2013-01-10 08:37:00 UTC (rev 
10658)
@@ -69,12 +69,16 @@
                                $this->use_session = true;
                        }
 
+                       
+                       
+                       $default_filter_year    = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_project_filter_year'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_project_filter_year']
 == 'current_year' ? date('Y') : 'all';
+                       
                        $start                                  = 
phpgw::get_var('start', 'int', 'REQUEST', 0);
                        $query                                  = 
phpgw::get_var('query');
                        $sort                                   = 
phpgw::get_var('sort');
                        $order                                  = 
phpgw::get_var('order');
                        $filter                                 = 
phpgw::get_var('filter', 'int');
-                       $filter_year                    = 
phpgw::get_var('filter_year', 'string', 'REQUEST', 'all');
+                       $filter_year                    = 
phpgw::get_var('filter_year', 'string', 'REQUEST', $default_filter_year);
                        $cat_id                                 = 
phpgw::get_var('cat_id', 'int');
                        $status_id                              = 
phpgw::get_var('status_id');
                        $user_id                                = 
phpgw::get_var('user_id', 'int');
@@ -86,6 +90,7 @@
                        $this->allrows                  = 
phpgw::get_var('allrows', 'bool');
 
                        $this->start                    = $start ? $start : 0;
+                       $this->filter_year              = $filter_year;
 
                        if(isset($_POST['query']) || isset($_GET['query']))
                        {
@@ -103,10 +108,6 @@
                        {
                                $this->filter = $filter;
                        }
-                       if(isset($_POST['filter_year']) || 
isset($_GET['filter_year']))
-                       {
-                               $this->filter_year = $filter_year;
-                       }
                        if(isset($_POST['cat_id']) || isset($_GET['cat_id']))
                        {
                                $this->cat_id = $cat_id;

Modified: trunk/property/inc/hook_settings.inc.php
===================================================================
--- trunk/property/inc/hook_settings.inc.php    2013-01-10 08:20:42 UTC (rev 
10657)
+++ trunk/property/inc/hook_settings.inc.php    2013-01-10 08:37:00 UTC (rev 
10658)
@@ -246,7 +246,14 @@
 
        create_select_box('Default project 
type','default_project_type',$default_project_type,'Select your default project 
type');
 
+       $default_project_filter_year =array
+       (
+               'current_year'  => lang('current year'),
+               'all'                   => lang('all'),
+       );
 
+       create_select_box('Default project year 
filter','default_project_filter_year',$default_project_filter_year,'Select your 
default project year filter');
+
        create_select_box('Default project 
status','project_status',$_status_project,'The default status for your 
projects');
        create_select_box('Default workorder 
status','workorder_status',$_status_workorder,'The default status for your 
workorders');
        create_select_box('Default project 
categories','project_category',$_categories_project,'The default category for 
your projects and workorders');




reply via email to

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