mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fixed bugs with recuring events in listview:
- opened as their first recurance not the one you clicked on - recure-information is not shown
This commit is contained in:
parent
a14cf00c50
commit
618c554c2f
@ -1386,6 +1386,54 @@ class bocal
|
||||
|
||||
return $users + $groups; // users first and then groups, both alphabeticaly
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the recure-information of an event, into a human readable string
|
||||
*
|
||||
* @param array $event
|
||||
* @return string
|
||||
*/
|
||||
function recure2string($event)
|
||||
{
|
||||
$str = '';
|
||||
// Repeated Events
|
||||
if($event['recur_type'] != MCAL_RECUR_NONE)
|
||||
{
|
||||
$str = lang($this->recur_types[$event['recur_type']]);
|
||||
|
||||
$str_extra = array();
|
||||
if ($event['recur_enddate'])
|
||||
{
|
||||
$str_extra[] = lang('ends').': '.lang($this->format_date($event['recur_enddate'],'l')).', '.$this->long_date($event['recur_enddate']).' ';
|
||||
}
|
||||
// only weekly uses the recur-data (days) !!!
|
||||
if($event['recur_type'] == MCAL_RECUR_WEEKLY)
|
||||
{
|
||||
$repeat_days = array();
|
||||
foreach ($this->recur_days as $mcal_mask => $dayname)
|
||||
{
|
||||
if ($event['recur_data'] & $mcal_mask)
|
||||
{
|
||||
$repeat_days[] = lang($dayname);
|
||||
}
|
||||
}
|
||||
if(count($repeat_days))
|
||||
{
|
||||
$str_extra[] = lang('days repeated').': '.implode(', ',$repeat_days);
|
||||
}
|
||||
}
|
||||
if($event['recur_interval'])
|
||||
{
|
||||
$str_extra[] = lang('Interval').': '.$event['recur_interval'];
|
||||
}
|
||||
|
||||
if(count($str_extra))
|
||||
{
|
||||
$str .= ' ('.implode(', ',$str_extra).')';
|
||||
}
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the holidays for a given $year
|
||||
|
@ -898,42 +898,9 @@ class bocalupdate extends bocal
|
||||
// Repeated Events
|
||||
if($event['recur_type'] != MCAL_RECUR_NONE)
|
||||
{
|
||||
$str = lang($this->rpt_type[$event['recur_type']]);
|
||||
|
||||
$str_extra = array();
|
||||
if ($event['recur_enddate'])
|
||||
{
|
||||
$str_extra[] = lang('ends').': '.lang($this->format_date($event['recur_enddate'],'l')).', '.$this->long_date($event['recur_enddate']).' ';
|
||||
}
|
||||
// only weekly uses the recur-data (days) !!!
|
||||
if($event['recur_type'] == MCAL_RECUR_WEEKLY)
|
||||
{
|
||||
$repeat_days = array();
|
||||
foreach ($this->recur_days as $mcal_mask => $dayname)
|
||||
{
|
||||
if ($event['recur_data'] & $mcal_mask)
|
||||
{
|
||||
$repeat_days[] = lang($dayname);
|
||||
}
|
||||
}
|
||||
if(count($repeat_days))
|
||||
{
|
||||
$str_extra[] = lang('days repeated').': '.implode(', ',$repeat_days);
|
||||
}
|
||||
}
|
||||
if($event['recur_interval'])
|
||||
{
|
||||
$str_extra[] = lang('Interval').': '.$event['recur_interval'];
|
||||
}
|
||||
|
||||
if(count($str_extra))
|
||||
{
|
||||
$str .= ' ('.implode(', ',$str_extra).')';
|
||||
}
|
||||
|
||||
$var['recur_type'] = Array(
|
||||
'field' => lang('Repetition'),
|
||||
'data' => $str,
|
||||
'data' => $this->recure2string($event),
|
||||
);
|
||||
}
|
||||
return $var;
|
||||
|
@ -194,6 +194,8 @@ class uilist extends uical
|
||||
$readonlys['view['.$event['id'].']'] = !$this->bo->check_perms(EGW_ACL_READ,$event);
|
||||
|
||||
$event['parts'] = implode(",\n",$this->bo->participants($event));
|
||||
$event['recure'] = $this->bo->recure2string($event);
|
||||
$event['date'] = $this->bo->date2string($event['start']);
|
||||
if (empty($event['description'])) $event['description'] = ' '; // no description screws the titles horz. alignment
|
||||
if (empty($event['location'])) $event['location'] = ' '; // no location screws the owner horz. alignment
|
||||
$rows[] = $event;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// eTemplates for Application 'calendar', generated by soetemplate::dump4setup() 2005-11-23 21:53
|
||||
// eTemplates for Application 'calendar', generated by soetemplate::dump4setup() 2005-12-02 16:31
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@ -54,3 +54,5 @@ $templ_data[] = array('name' => 'calendar.list.rows','template' => '','lang' =>
|
||||
|
||||
$templ_data[] = array('name' => 'calendar.list.rows','template' => '','lang' => '','group' => '0','version' => '1.0.1.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"B";s:3:"40%";s:1:"E";s:3:"10%";}i:1;a:5:{s:1:"A";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Start";s:4:"name";s:9:"cal_start";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:7:"cal_end";s:5:"label";s:3:"End";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:9:"cal_owner";s:5:"label";s:5:"Owner";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:12:"cal_location";s:5:"label";s:8:"Location";}}s:1:"D";a:3:{s:4:"size";s:16:"All participants";s:4:"name";s:11:"participant";s:4:"type";s:23:"nextmatch-accountfilter";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}}i:2;a:5:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[start]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:11:"${row}[end]";s:8:"readonly";s:1:"1";}s:4:"name";s:5:"start";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[title]";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"b";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[location]";s:7:"no_lang";s:1:"1";}}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[parts]";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"E";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"view";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this event";s:7:"onclick";s:176:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.view&cal_id=$row_cont[id]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this event";s:7:"onclick";s:176:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.edit&cal_id=$row_cont[id]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";}}}}s:4:"rows";i:2;s:4:"cols";i:5;s:7:"options";a:0:{}s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1128457387',);
|
||||
|
||||
$templ_data[] = array('name' => 'calendar.list.rows','template' => '','lang' => '','group' => '0','version' => '1.0.1.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"B";s:3:"40%";s:1:"E";s:3:"10%";}i:1;a:5:{s:1:"A";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Start";s:4:"name";s:9:"cal_start";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:7:"cal_end";s:5:"label";s:3:"End";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:9:"cal_owner";s:5:"label";s:5:"Owner";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:12:"cal_location";s:5:"label";s:8:"Location";}}s:1:"D";a:3:{s:4:"size";s:16:"All participants";s:4:"name";s:11:"participant";s:4:"type";s:23:"nextmatch-accountfilter";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}}i:2;a:5:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:13:"${row}[start]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:11:"${row}[end]";s:8:"readonly";s:1:"1";}s:4:"name";s:5:"start";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:5:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[title]";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"b";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[description]";s:7:"no_lang";s:1:"1";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:14:"${row}[recure]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[location]";s:7:"no_lang";s:1:"1";}}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[parts]";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"E";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"view";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this event";s:7:"onclick";s:197:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.view&cal_id=$row_cont[id]&date=$row_cont[date]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this event";s:7:"onclick";s:197:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";}}}}s:4:"rows";i:2;s:4:"cols";i:5;s:7:"options";a:0:{}s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1128457387',);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="calendar.list.rows" template="" lang="" group="0" version="1.0.1.002">
|
||||
<template id="calendar.list.rows" template="" lang="" group="0" version="1.0.1.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
@ -35,6 +35,7 @@
|
||||
<vbox>
|
||||
<description id="${row}[title]" readonly="true" no_lang="1" options="b"/>
|
||||
<description id="${row}[description]" no_lang="1"/>
|
||||
<description id="${row}[recure]" no_lang="1"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<menulist>
|
||||
@ -44,8 +45,8 @@
|
||||
</vbox>
|
||||
<description id="${row}[parts]" readonly="true" no_lang="1"/>
|
||||
<hbox>
|
||||
<button image="view" label="view" id="view[$row_cont[id]]" statustext="View this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.view&cal_id=$row_cont[id]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[id]]" statustext="Edit this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.edit&cal_id=$row_cont[id]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="view" label="view" id="view[$row_cont[id]]" statustext="View this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.view&cal_id=$row_cont[id]&date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[id]]" statustext="Edit this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button id="delete[$row_cont[id]]" image="delete" label="Delete" statustext="Delete this event" onclick="return confirm('Delete this event');"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
Loading…
Reference in New Issue
Block a user