phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] hrm/inc hook_admin.inc.php, 1.3 class.uiuser.inc.php,


From: sigurdne
Subject: [Phpgroupware-cvs] hrm/inc hook_admin.inc.php, 1.3 class.uiuser.inc.php, 1.5 class.boplace.inc.php, 1.3 class.bojob.inc.php, 1.6 class.bouser.inc.php, 1.5 class.socategory.inc.php, 1.3 class.uijob.inc.php, 1.6 class.bocategory.inc.php, 1.3
Date: Mon, 28 Nov 2005 16:06:00 +0100

Update of hrm/inc

Modified Files:
     Branch: MAIN
            hook_admin.inc.php lines: +3 -1
            class.uiuser.inc.php lines: +8 -5
            class.boplace.inc.php lines: +2 -67
            class.bojob.inc.php lines: +1 -2
            class.bouser.inc.php lines: +2 -67
            class.socategory.inc.php lines: +24 -1
            class.uijob.inc.php lines: +10 -12
            class.bocategory.inc.php lines: +6 -4

Log Message:
*** empty log message ***

====================================================
Index: hrm/inc/hook_admin.inc.php
diff -u hrm/inc/hook_admin.inc.php:1.2 hrm/inc/hook_admin.inc.php:1.3
--- hrm/inc/hook_admin.inc.php:1.2      Mon Nov 21 20:25:33 2005
+++ hrm/inc/hook_admin.inc.php  Mon Nov 28 15:06:48 2005
@@ -23,6 +23,8 @@
                                                                ) ),

                                'training category'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=training'),
+                               'skill level'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=skill_level'),
+                               'experience category'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=experience'),
                                'Configure Access Permissions'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.list_acl'),
                        );
                        display_section($appname,$appname,$file);

====================================================
Index: hrm/inc/class.uiuser.inc.php
diff -u hrm/inc/class.uiuser.inc.php:1.4 hrm/inc/class.uiuser.inc.php:1.5
--- hrm/inc/class.uiuser.inc.php:1.4    Wed Nov 23 10:55:40 2005
+++ hrm/inc/class.uiuser.inc.php        Mon Nov 28 15:06:48 2005
@@ -43,6 +43,7 @@
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bo                               = 
CreateObject($this->currentapp.'.bouser',False);
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
+                       $this->bocategory                       = 
CreateObject($this->currentapp.'.bocategory');
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->menu->sub                        ='user';

@@ -543,7 +544,7 @@
                                'lang_title_status_text'                => 
lang('Title of the training item'),
                                'lang_skill'                            => 
lang('Skill'),
                                'lang_skill_status_text'                => 
lang('Select your skill'),
-                               'skill_list'                            => 
$this->bo->select_skill_list($values['skill']),
+                               'skill_list'                            => 
$this->bocategory->select_category_list('skill_level',$values['skill']),
                                'lang_no_skill'                         => 
lang('select a skill'),

                                'place_list'                            => 
$this->bo->select_place_list($values['place_id']),
@@ -574,7 +575,8 @@
                                'lang_apply_status_text'                => 
lang('Apply the values'),

                                'lang_category'                         => 
lang('category'),
-                               'cat_list'                              => 
$this->bo->select_category_list('select',$values['cat_id']),
+//                             'cat_list'                              => 
$this->bo->select_category_list('select',$values['cat_id']),
+                               'cat_list'                              => 
$this->bocategory->select_category_list('training',$values['cat_id']),
                                'lang_no_cat'                           => 
lang('no category'),
                                'lang_cat_status_text'                  => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                           => 
'values[cat_id]',
@@ -629,7 +631,7 @@
                                'lang_title_status_text'                        
=> lang('Title of the training item'),
                                'lang_skill'                                    
=> lang('Skill'),
                                'lang_skill_status_text'                        
=> lang('Select your skill'),
-                               'skill_list'                                    
=> $this->bo->select_skill_list($values['skill']),
+                               'skill_list'                                    
=> $this->bocategory->select_category_list('skill_level',$values['skill']),
                                'lang_no_skill'                                 
=> lang('select a skill'),

                                'place_list'                                    
=> $this->bo->select_place_list($values['place_id']),
@@ -654,7 +656,8 @@
                                'lang_apply_status_text'                        
=> lang('Apply the values'),

                                'lang_category'                         => 
lang('category'),
-                               'cat_list'                              => 
$this->bo->select_category_list('select',$values['cat_id']),
+//                             'cat_list'                              => 
$this->bo->select_category_list('select',$values['cat_id']),
+                               'cat_list'                              => 
$this->bocategory->select_category_list('training',$values['cat_id']),
                                'lang_no_cat'                           => 
lang('no category'),
                                'lang_cat_status_text'                  => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                           => 
'values[cat_id]',

====================================================
Index: hrm/inc/class.boplace.inc.php
diff -u hrm/inc/class.boplace.inc.php:1.2 hrm/inc/class.boplace.inc.php:1.3
--- hrm/inc/class.boplace.inc.php:1.2   Tue Nov 22 18:20:09 2005
+++ hrm/inc/class.boplace.inc.php       Mon Nov 28 15:06:48 2005
@@ -221,76 +221,11 @@
                        return $category_list;
                }

-               function select_skill_list($selected='')
-               {
-
-                       $skill_comment[0]=' - '.lang('None');
-                       $skill_comment[1]=' - '.lang('Medium');
-                       $skill_comment[2]=' - '.lang('Good');
-                       $skill_comment[3]=' - '.lang('Expert');
-
-                       for ($i=0; $i<=3; $i++)
-                       {
-                               $skill_list[$i]['id'] =$i;
-                               $skill_list[$i]['name'] =$i . 
$skill_comment[$i];
-                       }
-
-
-                       while (is_array($skill_list) && list(,$entry) = 
each($skill_list))
-                       {
-                               $sel_entry = '';
-                               if ($entry['id']==$selected)
-                               {
-                                       $sel_entry = 'selected';
-                               }
-
-                               $entry_list[] = array
-                               (
-                                       'id'    => $entry['id'],
-                                       'name'          => $entry['name'],
-                                       'selected'      => $sel_entry
-                               );
-                       }
-
-                       for ($i=0;$i<count($entry_list);$i++)
-                       {
-                               if ($entry_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($entry_list[$i]['selected']);
-                               }
-                       }
-
-                       return $entry_list;
-               }

                function select_place_list($selected='')
                {
                        $places= $this->so->select_place_list();
-
-                       while (is_array($places) && list(,$place) = 
each($places))
-                       {
-                               $sel_place = '';
-                               if ($place['id']==$selected)
-                               {
-                                       $sel_place = 'selected';
-                               }
-
-                               $place_list[] = array
-                               (
-                                       'id'            => $place['id'],
-                                       'name'          => $place['name'],
-                                       'selected'      => $sel_place
-                               );
-                       }
-
-                       for ($i=0;$i<count($place_list);$i++)
-                       {
-                               if ($place_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($place_list[$i]['selected']);
-                               }
-                       }
-
+                       $place_list = 
$this->bocommon->select_list($selected,$places);
                        return $place_list;
                }
        }

====================================================
Index: hrm/inc/class.bojob.inc.php
diff -u hrm/inc/class.bojob.inc.php:1.5 hrm/inc/class.bojob.inc.php:1.6
--- hrm/inc/class.bojob.inc.php:1.5     Wed Nov 23 10:55:40 2005
+++ hrm/inc/class.bojob.inc.php Mon Nov 28 15:06:48 2005
@@ -259,5 +259,4 @@

                        return $job_list;
                }
-
        }

====================================================
Index: hrm/inc/class.bouser.inc.php
diff -u hrm/inc/class.bouser.inc.php:1.4 hrm/inc/class.bouser.inc.php:1.5
--- hrm/inc/class.bouser.inc.php:1.4    Wed Nov 23 10:55:40 2005
+++ hrm/inc/class.bouser.inc.php        Mon Nov 28 15:06:48 2005
@@ -238,76 +238,11 @@
                        return $category_list;
                }

-               function select_skill_list($selected='')
-               {
-
-                       $skill_comment[0]=' - '.lang('None');
-                       $skill_comment[1]=' - '.lang('Medium');
-                       $skill_comment[2]=' - '.lang('Good');
-                       $skill_comment[3]=' - '.lang('Expert');
-
-                       for ($i=0; $i<=3; $i++)
-                       {
-                               $skill_list[$i]['id'] =$i;
-                               $skill_list[$i]['name'] =$i . 
$skill_comment[$i];
-                       }
-
-
-                       while (is_array($skill_list) && list(,$entry) = 
each($skill_list))
-                       {
-                               $sel_entry = '';
-                               if ($entry['id']==$selected)
-                               {
-                                       $sel_entry = 'selected';
-                               }
-
-                               $entry_list[] = array
-                               (
-                                       'id'    => $entry['id'],
-                                       'name'          => $entry['name'],
-                                       'selected'      => $sel_entry
-                               );
-                       }
-
-                       for ($i=0;$i<count($entry_list);$i++)
-                       {
-                               if ($entry_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($entry_list[$i]['selected']);
-                               }
-                       }
-
-                       return $entry_list;
-               }

                function select_place_list($selected='')
                {
                        $places= $this->so->select_place_list();
-
-                       while (is_array($places) && list(,$place) = 
each($places))
-                       {
-                               $sel_place = '';
-                               if ($place['id']==$selected)
-                               {
-                                       $sel_place = 'selected';
-                               }
-
-                               $place_list[] = array
-                               (
-                                       'id'            => $place['id'],
-                                       'name'          => $place['name'],
-                                       'selected'      => $sel_place
-                               );
-                       }
-
-                       for ($i=0;$i<count($place_list);$i++)
-                       {
-                               if ($place_list[$i]['selected'] != 'selected')
-                               {
-                                       unset($place_list[$i]['selected']);
-                               }
-                       }
-
+                       $place_list = 
$this->bocommon->select_list($selected,$places);
                        return $place_list;
                }
        }

====================================================
Index: hrm/inc/class.socategory.inc.php
diff -u hrm/inc/class.socategory.inc.php:1.2 
hrm/inc/class.socategory.inc.php:1.3
--- hrm/inc/class.socategory.inc.php:1.2        Mon Nov 21 20:25:33 2005
+++ hrm/inc/class.socategory.inc.php    Mon Nov 28 15:06:48 2005
@@ -110,6 +110,12 @@
                                case 'training':
                                        $table='hrm_training_category';
                                        break;
+                               case 'experience':
+                                       $table='hrm_experience_category';
+                                       break;
+                               case 'skill_level':
+                                       $table='hrm_skill_level';
+                                       break;
                        }

                        return $table;
@@ -168,4 +174,21 @@

                        $this->db->query("DELETE FROM $table WHERE id='" . $id 
. "'",__LINE__,__FILE__);
                }
+
+               function select_category_list($type)
+               {
+                       $table = $this->select_table($type,$type_id);
+
+                       $this->db->query("SELECT id, descr FROM $table ORDER BY 
descr ");
+
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $categories[$i]['id']                           
= $this->db->f('id');
+                               $categories[$i]['name']                         
= stripslashes($this->db->f('descr'));
+                               $i++;
+                       }
+                       return $categories;
+               }
+
        }

====================================================
Index: hrm/inc/class.uijob.inc.php
diff -u hrm/inc/class.uijob.inc.php:1.5 hrm/inc/class.uijob.inc.php:1.6
--- hrm/inc/class.uijob.inc.php:1.5     Wed Nov 23 10:55:40 2005
+++ hrm/inc/class.uijob.inc.php Mon Nov 28 15:06:48 2005
@@ -47,6 +47,7 @@
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bo                               = 
CreateObject($this->currentapp.'.bojob',true);
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
+                       $this->bocategory                       = 
CreateObject($this->currentapp.'.bocategory');
                        $this->menu                             = 
CreateObject($this->currentapp.'.menu');
                        $this->menu->sub                        ='job';

@@ -625,17 +626,15 @@
                                'lang_entry_date'                       => 
lang('Entry date'),
                                'lang_name'                             => 
lang('name'),
                                'lang_name_status_text'         => lang('name 
of the task item'),
-                               'lang_skill'                            => 
lang('Skill'),
+                               'lang_skill'                            => 
lang('Skill level'),
                                'lang_skill_status_text'                => 
lang('Select your skill'),
-//                             'skill_list'                            => 
$this->bo->select_skill_list($values['skill']),
-                               'lang_no_skill'                         => 
lang('select a skill'),
+                               'skill_list'                            => 
$this->bocategory->select_category_list('skill_level',$values['skill']),
+                               'lang_no_skill'                         => 
lang('select a level'),

-//                             'place_list'                            => 
$this->bo->select_place_list($values['place_id']),
-                               'lang_place'                            => 
lang('place'),
-                               'lang_new_place'                        => 
lang('new place'),
-                               'lang_place_status_text'                => 
lang('Select a place'),
-                               'lang_new_place_status_text'            => 
lang('Enter a new place'),
-                               'lang_no_place'                                 
=> lang('select a place'),
+                               'experience_list'                       => 
$this->bocategory->select_category_list('experience',$values['experience_id']),
+                               'lang_experience'                       => 
lang('experience'),
+                               'lang_experience_status_text'           => 
lang('Select a experience level'),
+                               'lang_no_experience'                    => 
lang('select experience'),

                                'lang_new_place_name'                   => 
lang('name'),
                                'lang_new_place_address'                => 
lang('address'),
@@ -709,8 +708,7 @@
                                'lang_name_status_text'         => lang('name 
of the task item'),
                                'lang_skill'                            => 
lang('Skill'),
                                'lang_skill_status_text'                => 
lang('Select your skill'),
-//                             'skill_list'                            => 
$this->bo->select_skill_list($values['skill']),
-                               'lang_no_skill'                         => 
lang('select a skill'),
+                               'lang_no_skill'                         => 
lang('select a level'),

 //                             'place_list'                            => 
$this->bo->select_place_list($values['place_id']),
                                'lang_place'                            => 
lang('place'),

====================================================
Index: hrm/inc/class.bocategory.inc.php
diff -u hrm/inc/class.bocategory.inc.php:1.2 
hrm/inc/class.bocategory.inc.php:1.3
--- hrm/inc/class.bocategory.inc.php:1.2        Mon Nov 21 20:25:33 2005
+++ hrm/inc/class.bocategory.inc.php    Mon Nov 28 15:06:48 2005
@@ -57,7 +57,7 @@
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so               = 
CreateObject($this->currentapp.'.socategory');
-                       $this->socommon = 
CreateObject($this->currentapp.'.socommon');
+                       $this->bocommon = 
CreateObject($this->currentapp.'.bocommon');

                        if ($session)
                        {
@@ -148,9 +148,11 @@
                        return $this->so->read_single($id,$type,$type_id);
                }

-               function select_part_of_town($part_of_town_id)
+               function select_category_list($type,$selected)
                {
-                       return 
$this->socommon->select_part_of_town($part_of_town_id);
+                       $category_list = $this->so->select_category_list($type);
+                       $category_list = 
$this->bocommon->select_list($selected,$category_list);
+                       return $category_list;
                }

                function save($category,$action='',$type ='',$type_id)






reply via email to

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