From 00e7549186451237a5224ff6b09b7a71a2a4a113 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 22 May 2007 13:36:32 +0000 Subject: [PATCH] "fixed halfway done conversation to new col-selection prefs for the times-column: - the icon to attach timesheets is now always displayed if user has the timesheet app - the display of the times column and the cumulated time of attached timesheets depends on the col-selection pref" --- infolog/inc/class.uiinfolog.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 62aa8e11e3..0bf81de6d4 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -179,7 +179,7 @@ class uiinfolog $readonlys["sp[$id]"] = !$this->bo->check_access($info,EGW_ACL_ADD); $readonlys["view[$id]"] = $info['info_anz_subs'] < 1; $readonlys['view[0]'] = True; // no parent - $readonlys["timesheet[$id]"] = !$this->prefs['show_times'] || !isset($GLOBALS['egw_info']['user']['apps']['timesheet']); + $readonlys["timesheet[$id]"] = !isset($GLOBALS['egw_info']['user']['apps']['timesheet']); if (!$show_links) $show_links = $this->prefs['show_links']; @@ -321,9 +321,12 @@ class uiinfolog } else { - unset($query['columnselection_pref']); // it might be set + $query['columnselection_pref'] = 'infolog.index.rows'; $query['default_cols'] = '!cat_id,info_datemodified,info_used_time_info_planned_time,info_id'; } + // set old show_times pref, that get_info calculates the cumulated time of the timesheets + $this->prefs['show_times'] = strpos($this->prefs['nextmatch-'.$query['columnselection_pref']],'info_used_time_info_planned_time') !== false; + $readonlys = $rows = array(); foreach($ids as $id => $info) {