From 38849094a9937a9425108f345d1787e78d5dbfb3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 3 Sep 2014 16:22:05 +0000 Subject: [PATCH] * Calendar: if contact is added as participant and event has not yet a title add contact as title --- calendar/inc/class.calendar_uiforms.inc.php | 18 +++++++++++++++++- calendar/templates/default/edit.xet | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 4e2e73e834..061f0a04f8 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -70,6 +70,16 @@ class calendar_uiforms extends calendar_ui { $extra_participants = $_GET['participants'] ? explode(',',$_GET['participants']) : array(); + // if participant is a contact, add its link title as title + foreach($extra_participants as $uid) + { + if ($uid[0] == 'c') + { + $title = egw_link::title('addressbook', substr($uid, 1)); + break; + } + } + if (isset($_GET['owner'])) { $owner = $_GET['owner']; @@ -175,6 +185,7 @@ class calendar_uiforms extends calendar_ui 'public'=> $this->cal_prefs['default_private'] ? 0 : 1, 'alarm' => $alarms, 'recur_exception' => array(), + 'title' => $title ? $title : '', ); } @@ -394,6 +405,11 @@ class calendar_uiforms extends calendar_ui $msg_permission_denied_added = true; } } + // if participant is a contact and no title yet, add its link title as title + if ($app == 'addressbook' && empty($event['title'])) + { + $event['title'] = egw_link::title($app, substr($uid, 1)); + } break; } // fall-through for accounts entered as contact @@ -994,7 +1010,7 @@ class calendar_uiforms extends calendar_ui else { egw_framework::refresh_opener($msg, 'calendar', $content['id'], $button == 'save'?'update': 'delete'); - } + } egw_framework::window_close(); common::egw_exit(); } diff --git a/calendar/templates/default/edit.xet b/calendar/templates/default/edit.xet index d35970a4da..842f26ff48 100644 --- a/calendar/templates/default/edit.xet +++ b/calendar/templates/default/edit.xet @@ -119,7 +119,7 @@ -