From: <reg...@us...> - 2005-07-29 14:45:10
|
Update of /cvsroot/egroupware/workflow/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12262/inc Modified Files: class.run_activity.inc.php Log Message: add possibility to display instance history table beside running activities by setting the ->display_history var Index: class.run_activity.inc.php =================================================================== RCS file: /cvsroot/egroupware/workflow/inc/class.run_activity.inc.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** class.run_activity.inc.php 29 Jul 2005 14:22:36 -0000 1.26 --- class.run_activity.inc.php 29 Jul 2005 14:45:00 -0000 1.27 *************** *** 45,48 **** --- 45,49 ---- var $display_owner=0; // if 0 draw nothing, 1 draw selected owner, else draw a select box for owner, see function descr var $display_next_user=0; // if 0 draw nothing, 1 draw selected next user, else draw a select box for next_user, see function descr + var $display_history=0; //if 0 draw nothing, 1 draw the history table in the bottom of the screen (ignore use_automatic_parsing config value) // array of roles associated with the activity, usefull for lists of users associated with theses roles var $act_role_names= Array(); *************** *** 422,425 **** --- 423,429 ---- $this->parse_info_zone(); + //draw the history zone if user wanted it + $this->parse_history_zone(); + $this->translate_template('run_activity'); $this->t->pparse('output', 'run_activity'); *************** *** 829,832 **** --- 833,858 ---- } + //!Parse the history zone in the activity form, the user can decide if he want this name to be shown or not + /*! + * @abstract if $this->display_history is 0 we draw nothing (default value) + * if $this->display_history is 1 we draw the history table + * this function does not test the use_automatic_parsing configuration value + */ + function parse_history_zone() + { + if ( (empty($this->display_history)) || (!($this->display_history))) + { + //hide the history zone + $this->t->set_var(array( 'history' => '')); + } + else + { + $inst_parser =& CreateObject('workflow.bo_uiinstance', $this->t); + $inst_parser->t =& $this->t; + $inst_parser->parse_instance_history($this->instance->workitems); + $this->t->set_var('history', $this->t->parse('output', 'history_tpl')); + } + } + } ?> |