[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] hrm/inc hook_admin.inc.php, 1.4 class.uiuser.inc.php,
From: |
sigurdne |
Subject: |
[Phpgroupware-cvs] hrm/inc hook_admin.inc.php, 1.4 class.uiuser.inc.php, 1.7 class.socategory.inc.php, 1.4 class.sojob.inc.php, 1.7 class.souser.inc.php, 1.5 class.uijob.inc.php, 1.7 class.bojob.inc.php, 1.7 |
Date: |
Tue, 29 Nov 2005 16:07:00 +0100 |
Update of hrm/inc
Modified Files:
Branch: MAIN
hook_admin.inc.php lines: +2 -1
class.uiuser.inc.php lines: +23 -7
class.socategory.inc.php lines: +4 -1
class.sojob.inc.php lines: +15 -6
class.souser.inc.php lines: +4 -4
class.uijob.inc.php lines: +24 -79
class.bojob.inc.php lines: +3 -2
Log Message:
*** empty log message ***
====================================================
Index: hrm/inc/hook_admin.inc.php
diff -u hrm/inc/hook_admin.inc.php:1.3 hrm/inc/hook_admin.inc.php:1.4
--- hrm/inc/hook_admin.inc.php:1.3 Mon Nov 28 15:06:48 2005
+++ hrm/inc/hook_admin.inc.php Tue Nov 29 15:07:58 2005
@@ -25,6 +25,7 @@
'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'),
+ 'task category'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=task'),
'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.6 hrm/inc/class.uiuser.inc.php:1.7
--- hrm/inc/class.uiuser.inc.php:1.6 Tue Nov 29 13:09:40 2005
+++ hrm/inc/class.uiuser.inc.php Tue Nov 29 15:07:58 2005
@@ -78,21 +78,30 @@
while (is_array($account_info) && list(,$entry) =
each($account_info))
{
-
+ if($entry['grants'])
+ {
+ $link_training =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiuser.training&user_id='
. $entry['account_id']);
+ $text_training =
lang('training');
+ $lang_training_user_text =
lang('Training profile');
+ }
+
$content[] = array
(
'first_name'
=> $entry['account_firstname'],
'last_name'
=> $entry['account_lastname'],
// 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiuser.training&user_id='
. $entry['account_id']),
- 'link_training'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiuser.training&user_id='
. $entry['account_id']),
+ 'link_training'
=> $link_training,
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiuser.view&user_id='
. $entry['account_id']),
'lang_view_user_text'
=> lang('view the user'),
- 'lang_training_user_text'
=> lang('Training profile'),
+ 'lang_training_user_text'
=> $lang_training_user_text,
'lang_edit_user_text'
=> lang('edit the user'),
'text_view'
=> lang('view'),
'text_edit'
=> lang('edit'),
- 'text_training'
=> lang('training'),
- );
+ 'text_training'
=> $text_training
+ );
+ unset ($link_training);
+ unset ($text_training);
+ unset ($lang_training_user_text);
}
//_debug_array($content);
@@ -331,7 +340,14 @@
'text_view' => lang('view'),
'text_edit' => $text_edit,
'text_delete' => $text_delete
- );
+ );
+
+ unset ($link_edit);
+ unset ($text_edit);
+ unset ($lang_edit_edit);
+ unset ($link_delete);
+ unset ($text_delete);
+ unset ($lang_delete_text);
}
====================================================
Index: hrm/inc/class.socategory.inc.php
diff -u hrm/inc/class.socategory.inc.php:1.3
hrm/inc/class.socategory.inc.php:1.4
--- hrm/inc/class.socategory.inc.php:1.3 Mon Nov 28 15:06:48 2005
+++ hrm/inc/class.socategory.inc.php Tue Nov 29 15:07:58 2005
@@ -116,6 +116,9 @@
case 'skill_level':
$table='hrm_skill_level';
break;
+ case 'task':
+ $table='hrm_task_category';
+ break;
}
return $table;
====================================================
Index: hrm/inc/class.sojob.inc.php
diff -u hrm/inc/class.sojob.inc.php:1.6 hrm/inc/class.sojob.inc.php:1.7
--- hrm/inc/class.sojob.inc.php:1.6 Wed Nov 23 10:55:40 2005
+++ hrm/inc/class.sojob.inc.php Tue Nov 29 15:07:58 2005
@@ -220,12 +220,14 @@
if ($this->db->next_record())
{
$values['id'] = $id;
- $values['name'] =
stripslashes($this->db->f('name'));
+ $values['name'] =
stripslashes($this->db->f('name'));
$values['descr'] =
stripslashes($this->db->f('descr'));
$values['job_id'] =
$this->db->f('job_id');
$values['cat_id'] =
$this->db->f('category');
$values['entry_date'] =
$this->db->f('entry_date');
- $values['owner'] = $this->db->f('owner');
+ $values['skill_id'] =
$this->db->f('skill_id');
+ $values['experience_id']=
$this->db->f('experience_id');
+ $values['owner'] = $this->db->f('owner');
}
return $values;
}
@@ -462,13 +464,16 @@
$values['job_id'],
$values['name'],
$values['descr'],
+ $values['cat_id'],
+ $values['skill_id'],
+ $values['experience_id'],
time(),
$this->account
);
$insert_values =
$this->bocommon->validate_db_insert($insert_values);
- $this->db->query("INSERT INTO hrm_task
(id,job_id,name,descr,entry_date,task_owner) "
+ $this->db->query("INSERT INTO hrm_task
(id,job_id,name,descr,category,skill_id,experience_id,entry_date,task_owner) "
. "VALUES ($insert_values)",__LINE__,__FILE__);
$receipt['message'][]=array('msg'=>lang('task item has
been saved'));
@@ -481,11 +486,15 @@
function edit_task($values)
{
+_debug_array($values);
$this->db->transaction_begin();
$value_set['descr'] =
$this->db->db_addslashes($values['descr']);
$value_set['name'] =
$this->db->db_addslashes($values['name']);
-
+ $value_set['category'] =
$values['cat_id'];
+ $value_set['skill_id'] =
$values['skill_id'];
+ $value_set['experience_id'] =
$values['experience_id'];
+
$value_set =
$this->bocommon->validate_db_update($value_set);
$table='hrm_task';
@@ -504,4 +513,4 @@
{
$this->db->query('DELETE FROM hrm_task WHERE id=' .
intval($id) . ' AND job_id=' . intval($job_id),__LINE__,__FILE__);
}
- }
\ No newline at end of file
+ }
====================================================
Index: hrm/inc/class.souser.inc.php
diff -u hrm/inc/class.souser.inc.php:1.4 hrm/inc/class.souser.inc.php:1.5
--- hrm/inc/class.souser.inc.php:1.4 Tue Nov 29 13:09:40 2005
+++ hrm/inc/class.souser.inc.php Tue Nov 29 15:07:58 2005
@@ -56,7 +56,7 @@
$allrows =
(isset($data['allrows'])?$data['allrows']:'');
}
- $filtermethod = ' ( account_id=' . $this->account;
+/* $filtermethod = ' AND ( account_id=' . $this->account;
if (is_array($this->grants))
{
$grants = $this->grants;
@@ -72,7 +72,7 @@
$filtermethod .= ' )';
}
- if ($order)
+*/ if ($order)
{
$ordermethod = " order by $order $sort";
@@ -92,7 +92,7 @@
$querymethod = " AND account_firstname
$this->like '%$query%' or account_lastname $this->like '%$query%'";
}
- $sql = "SELECT * FROM $table WHERE account_type = 'u'
AND account_status = 'A' AND $filtermethod $querymethod";
+ $sql = "SELECT * FROM $table WHERE account_type = 'u'
AND account_status = 'A' $filtermethod $querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
====================================================
Index: hrm/inc/class.uijob.inc.php
diff -u hrm/inc/class.uijob.inc.php:1.6 hrm/inc/class.uijob.inc.php:1.7
--- hrm/inc/class.uijob.inc.php:1.6 Mon Nov 28 15:06:48 2005
+++ hrm/inc/class.uijob.inc.php Tue Nov 29 15:07:58 2005
@@ -522,11 +522,14 @@
if (is_array($values))
{
- $values['place_id']=
get_var('place_id',array('POST'));
$values['job_id']= $job_id;
if ($values['save'] || $values['apply'])
{
+ if(!$values['cat_id'])
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
+ }
if(!$values['name'])
{
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
@@ -581,54 +584,20 @@
);
//_debug_array($link_data);
- $jscal = CreateObject('phpgwapi.jscalendar'); //
before phpgw_header() !!!
-
$msgbox_data = $this->bocommon->msgbox_data($receipt);
- $GLOBALS['phpgw_info']['flags']['java_script'] .= "\n"
- . '<script language ="javascript">' ."\n"
- . 'function modplace(form){' ."\n"
- . 'var val = form.place_id.value' ."\n"
- . 'if(val == "new_place"){' ."\n"
- . 'document.all.div1.style.display =
"block"' ."\n"
- . '}' ."\n"
- . 'else{' ."\n"
- . 'document.all.div1.style.display =
"none"' ."\n"
- . '}' ."\n"
- . '}' ."\n"
- . "</script>\n";
-
$data = array
(
'value_descr' =>
$values['descr'],
'value_name' =>
$values['name'],
- 'value_start_date' =>
$values['start_date'],
- 'value_end_date' =>
$values['end_date'],
'value_entry_date' =>
$values['entry_date'],
- 'value_reference' =>
$values['reference'],
- 'value_new_place_name' =>
$values['new_place_name'],
- 'value_new_place_address' =>
$values['new_place_address'],
- 'value_new_place_zip' =>
$values['new_place_zip'],
- 'value_new_place_town' =>
$values['new_place_town'],
- 'value_new_place_remark' =>
$values['new_place_remark'],
-
- 'date_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
- 'lang_start_date' =>
lang('start date'),
- 'lang_end_date' =>
lang('end date'),
- 'lang_start_date_title' =>
lang('select start date'),
- 'lang_end_date_title' =>
lang('select end date'),
- 'lang_start_date_status_text' =>
lang('Select the start date for your task'),
- 'lang_end_date_status_text' =>
lang('Select the end date for your task'),
- 'calendar_setup_start' =>
"Calendar.setup({inputField : 'values[start_date]',button :
'values[start_date]-trigger'});",
- 'calendar_setup_end' =>
"Calendar.setup({inputField : 'values[end_date]',button :
'values[end_date]-trigger'});",
- 'lang_reference' =>
lang('reference'),
-
'lang_entry_date' =>
lang('Entry date'),
+
'lang_name' =>
lang('name'),
- 'lang_name_status_text' => lang('name
of the task item'),
+ 'lang_name_status_text' =>
lang('name of the task item'),
'lang_skill' =>
lang('Skill level'),
'lang_skill_status_text' =>
lang('Select your skill'),
- 'skill_list' =>
$this->bocategory->select_category_list('skill_level',$values['skill']),
+ 'skill_list' =>
$this->bocategory->select_category_list('skill_level',$values['skill_id']),
'lang_no_skill' =>
lang('select a level'),
'experience_list' =>
$this->bocategory->select_category_list('experience',$values['experience_id']),
@@ -636,12 +605,6 @@
'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'),
- 'lang_new_place_zip' =>
lang('zip'),
- 'lang_new_place_town' =>
lang('town'),
- 'lang_new_place_remark' =>
lang('remark'),
-
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
'lang_id' =>
lang('task ID'),
@@ -649,7 +612,7 @@
'lang_save' =>
lang('save'),
'lang_cancel' =>
lang('cancel'),
'value_id' =>
$task_id,
- 'lang_id_status_text' =>
lang('Enter the task ID'),
+
'lang_descr_status_text' =>
lang('Enter a description the task'),
'lang_done_status_text' =>
lang('Back to the list'),
'lang_save_status_text' =>
lang('Save the task'),
@@ -657,10 +620,9 @@
'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->bocategory->select_category_list('task',$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]',
+ 'lang_cat_status_text' =>
lang('Select the category the task belongs to. To do not use a category select
NO CATEGORY'),
);
$job_info = $this->bo->read_single_job($job_id);
@@ -689,39 +651,22 @@
);
$data = array
- (
- 'value_descr' =>
$values['descr'],
+ (
'value_descr' =>
$values['descr'],
'value_name' =>
$values['name'],
- 'value_start_date' =>
$values['start_date'],
- 'value_end_date' =>
$values['end_date'],
'value_entry_date' =>
$values['entry_date'],
- 'value_reference' =>
$values['reference'],
- 'value_new_place_name' =>
$values['new_place_name'],
- 'value_new_place_address' =>
$values['new_place_address'],
- 'value_new_place_zip' =>
$values['new_place_zip'],
- 'value_new_place_town' =>
$values['new_place_town'],
- 'value_new_place_remark' =>
$values['new_place_remark'],
-
-
'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_name_status_text' =>
lang('name of the task item'),
+ 'lang_skill' =>
lang('Skill level'),
'lang_skill_status_text' =>
lang('Select your skill'),
+ 'skill_list' =>
$this->bocategory->select_category_list('skill_level',$values['skill_id']),
'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'),
-
- 'lang_new_place_name' =>
lang('name'),
- 'lang_new_place_address' =>
lang('address'),
- 'lang_new_place_zip' =>
lang('zip'),
- 'lang_new_place_town' =>
lang('town'),
- 'lang_new_place_remark' =>
lang('remark'),
+ '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'),
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
@@ -730,7 +675,7 @@
'lang_save' =>
lang('save'),
'lang_cancel' =>
lang('cancel'),
'value_id' =>
$task_id,
- 'lang_id_status_text' =>
lang('Enter the task ID'),
+
'lang_descr_status_text' =>
lang('Enter a description the task'),
'lang_done_status_text' =>
lang('Back to the list'),
'lang_save_status_text' =>
lang('Save the task'),
@@ -738,10 +683,10 @@
'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->bocategory->select_category_list('task',$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]',
+ 'lang_cat_status_text' =>
lang('Select the category the task belongs to. To do not use a category select
NO CATEGORY'),
+
);
$job_info = $this->bo->read_single_job($job_id);
====================================================
Index: hrm/inc/class.bojob.inc.php
diff -u hrm/inc/class.bojob.inc.php:1.6 hrm/inc/class.bojob.inc.php:1.7
--- hrm/inc/class.bojob.inc.php:1.6 Mon Nov 28 15:06:48 2005
+++ hrm/inc/class.bojob.inc.php Tue Nov 29 15:07:58 2005
@@ -153,6 +153,7 @@
{
$values =$this->so->read_single_task($id);
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
if($values['entry_date'])
{
$values['entry_date'] =
$GLOBALS['phpgw']->common->show_date($values['entry_date'],$dateformat);
@@ -259,4 +260,4 @@
return $job_list;
}
- }
\ No newline at end of file
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] hrm/inc hook_admin.inc.php, 1.4 class.uiuser.inc.php, 1.7 class.socategory.inc.php, 1.4 class.sojob.inc.php, 1.7 class.souser.inc.php, 1.5 class.uijob.inc.php, 1.7 class.bojob.inc.php, 1.7,
sigurdne <=