mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 19:31:53 +02:00
added last and next date to edit & view too
This commit is contained in:
parent
bd4b0cc4ef
commit
5174804b39
@ -1293,6 +1293,12 @@ class uicontacts extends bocontacts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($content['id'])
|
||||||
|
{
|
||||||
|
// last and next calendar date
|
||||||
|
list(,$dates) = each($this->read_calendar(array($content['id']),false));
|
||||||
|
if(is_array($dates)) $content += $dates;
|
||||||
|
}
|
||||||
// how to display addresses
|
// how to display addresses
|
||||||
$content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']);
|
$content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']);
|
||||||
$content['addr_format2'] = $this->addr_format_by_country($content['adr_two_countryname']);
|
$content['addr_format2'] = $this->addr_format_by_country($content['adr_two_countryname']);
|
||||||
@ -1569,6 +1575,14 @@ $readonlys['button[vcard]'] = true;
|
|||||||
{
|
{
|
||||||
$content['owner'] .= 'p';
|
$content['owner'] .= 'p';
|
||||||
}
|
}
|
||||||
|
// disable not needed tabs
|
||||||
|
$readonlys[$this->tabs]['cats'] = !($content['cat_tab'] = $this->config['cat_tab']);
|
||||||
|
$readonlys[$this->tabs]['custom'] = !$this->customfields;
|
||||||
|
|
||||||
|
// last and next calendar date
|
||||||
|
list(,$dates) = each($this->read_calendar(array($content['id']),false));
|
||||||
|
if(is_array($dates)) $content += $dates;
|
||||||
|
|
||||||
// set id for automatic linking via quick add
|
// set id for automatic linking via quick add
|
||||||
$GLOBALS['egw_info']['flags']['currentid'] = $content['id'];
|
$GLOBALS['egw_info']['flags']['currentid'] = $content['id'];
|
||||||
|
|
||||||
@ -1940,9 +1954,10 @@ $readonlys['button[vcard]'] = true;
|
|||||||
* Read the next and last event of given contacts
|
* Read the next and last event of given contacts
|
||||||
*
|
*
|
||||||
* @param array $ids contact_id's
|
* @param array $ids contact_id's
|
||||||
|
* @param boolean $extra_title=true if true, use a short date only title and put the full title as extra_title (tooltip)
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function read_calendar($ids)
|
function read_calendar($ids,$extra_title=true)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['egw_info']['user']['apps']['calendar']) return null;
|
if (!$GLOBALS['egw_info']['user']['apps']['calendar']) return null;
|
||||||
|
|
||||||
@ -1978,12 +1993,17 @@ $readonlys['button[vcard]'] = true;
|
|||||||
if (!isset($calendars[$id]['last_event']) || $event['start'] > $calendars[$id]['last_event'])
|
if (!isset($calendars[$id]['last_event']) || $event['start'] > $calendars[$id]['last_event'])
|
||||||
{
|
{
|
||||||
$calendars[$id]['last_event'] = $event['start'];
|
$calendars[$id]['last_event'] = $event['start'];
|
||||||
$calendars[$id]['last_link'] = array(
|
$link = array(
|
||||||
'id' => $event['id'],
|
'id' => $event['id'],
|
||||||
'app' => 'calendar',
|
'app' => 'calendar',
|
||||||
'title' => date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$event['start']),
|
'title' => $bocal->link_title($event),
|
||||||
'extra_title' => $bocal->link_title($event),
|
|
||||||
);
|
);
|
||||||
|
if ($extra_title)
|
||||||
|
{
|
||||||
|
$link['extra_title'] = $link['title'];
|
||||||
|
$link['title'] = date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$event['start']);
|
||||||
|
}
|
||||||
|
$calendars[$id]['last_link'] = $link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // future event --> check for next event
|
else // future event --> check for next event
|
||||||
@ -1991,12 +2011,17 @@ $readonlys['button[vcard]'] = true;
|
|||||||
if (!isset($calendars[$id]['next_event']) || $event['start'] < $calendars[$id]['next_event'])
|
if (!isset($calendars[$id]['next_event']) || $event['start'] < $calendars[$id]['next_event'])
|
||||||
{
|
{
|
||||||
$calendars[$id]['next_event'] = $event['start'];
|
$calendars[$id]['next_event'] = $event['start'];
|
||||||
$calendars[$id]['next_link'] = array(
|
$link = array(
|
||||||
'id' => $event['id'],
|
'id' => $event['id'],
|
||||||
'app' => 'calendar',
|
'app' => 'calendar',
|
||||||
'title' => date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$event['start']),
|
'title' => $bocal->link_title($event),
|
||||||
'extra_title' => $bocal->link_title($event),
|
|
||||||
);
|
);
|
||||||
|
if ($extra_title)
|
||||||
|
{
|
||||||
|
$link['extra_title'] = $link['title'];
|
||||||
|
$link['title'] = date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],$event['start']);
|
||||||
|
}
|
||||||
|
$calendars[$id]['next_link'] = $link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -247,7 +247,7 @@
|
|||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="addressbook.edit.details" template="" lang="" group="0" version="1.3.004">
|
<template id="addressbook.edit.details" template="" lang="" group="0" version="1.5.001">
|
||||||
<grid width="100%" height="258" overflow="auto">
|
<grid width="100%" height="258" overflow="auto">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -270,6 +270,16 @@
|
|||||||
<description/>
|
<description/>
|
||||||
<checkbox label="change all organisation members" id="change_org" span="all" statustext="Apply changes to all members, whose fields have the same previous content"/>
|
<checkbox label="change all organisation members" id="change_org" span="all" statustext="Apply changes to all members, whose fields have the same previous content"/>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<image src="home"/>
|
||||||
|
<description value="Last date"/>
|
||||||
|
<link id="last_link"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description/>
|
||||||
|
<description value="Next date"/>
|
||||||
|
<link id="next_link"/>
|
||||||
|
</row>
|
||||||
<row class="row_off" valign="top">
|
<row class="row_off" valign="top">
|
||||||
<image src="gear"/>
|
<image src="gear"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user