[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 require_once(dirname(__FILE__) . SEP . 'class.bo_user_forms.inc.php'); 3 4 class ui_useropeninstance extends bo_user_forms 5 { 6 var $public_functions = array( 7 'form' => true 8 ); 9 10 //communication with the workflow engine 11 var $GUI; 12 13 function ui_useropeninstance() 14 { 15 parent::bo_user_forms('user_openinstance'); 16 $this->GUI =& CreateObject('workflow.workflow_gui'); 17 } 18 19 function form() 20 { 21 $activities =& $this->GUI->gui_list_user_start_activities($GLOBALS['egw_info']['user']['account_id'], $this->start, $this->offset, $this->sort_mode, $this->search_str, ''); 22 23 $this->link_data = array( 24 'find' => $this->search_str, 25 ); 26 27 $this->fill_table($activities['data'], $activities['cant']); 28 $this->show_user_tabs($this->class_name); 29 30 //collect error messages 31 $this->message[] = $this->GUI->get_error(false, _DEBUG); 32 33 $this->fill_form_variables(); 34 $this->finish(); 35 } 36 37 function fill_table(&$activities, $total_number) 38 { 39 //_debug_array($activities); 40 41 //warning header names are header_[name or alias of the column in the query without a dot] 42 //this is necessary for sorting 43 $header_array = array( 44 'wf_procname' => lang('Process'), 45 'wf_name' => lang('Start activity'), 46 ); 47 $this->fill_nextmatchs($header_array,$total_number); 48 49 $this->t->set_var(array( 50 'help_info' => lang('by running theses links you will create new instances of the related process.') 51 )); 52 53 // now the table 54 $this->t->set_block('user_openinstance', 'block_table', 'table'); 55 $arrowimg = '<img src="'.$GLOBALS['egw']->common->image('workflow', 'runform') .'" alt="'. lang('start process') .'" title="'. lang('start process') .'" />'; 56 foreach($activities as $activity_data) 57 { 58 $runlink = $GLOBALS['egw']->link('/index.php', 'menuaction=workflow.run_activity.go&activity_id=' . $activity_data['wf_activity_id']); 59 $this->t->set_var(array( 60 'link_starting' => $runlink, 61 'wf_procname' => $activity_data['wf_procname'].':'.$activity_data['wf_version'], 62 'actname' => $activity_data['wf_name'], 63 'arrow' => '<a href="'.$runlink.'">'.$arrowimg.'</a>', 64 'color_line' => $this->nextmatchs->alternate_row_color($tr_color, true) 65 )); 66 $this->t->parse('table', 'block_table', true); 67 } 68 if($total_number==0) 69 { 70 $this->t->set_var('table', '<tr><td colspan="3" align="center">'. lang('There are no process available') .'</td></tr>'); 71 } 72 } 73 74 } 75 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |