* InfoLog/Calendar: renamed context menu "Calendar" to "Schedule appointment" and make preset participants configurable, allow to config prefix for sub-entries and allow times in due-date

This commit is contained in:
Ralf Becker 2012-02-22 12:32:56 +00:00
parent 587c2cf595
commit 2ecedd2d0d
11 changed files with 206 additions and 139 deletions

View File

@ -1214,72 +1214,21 @@ class calendar_uiforms extends calendar_ui
{
continue;
}
switch($link_app)
if(!$n)
{
case 'infolog':
static $infolog_bo;
if(!$infolog_bo) $infolog_bo = new infolog_bo();
$infolog = $app_entry = $infolog_bo->read($link_id);
$event = array_merge($event, array(
'category' => $GLOBALS['egw']->categories->check_list(EGW_ACL_READ, $infolog['info_cat']),
'priority' => $infolog['info_priority'] + 1,
'public' => $infolog['info_access'] != 'private',
'title' => $infolog['info_subject'],
'description' => $infolog['info_des'],
'location' => $infolog['info_location'],
'start' => $infolog['info_startdate'],
'end' => $infolog['info_enddate'] ? $infolog['info_enddate'] : $infolog['info_datecompleted']
));
if(!$event['end']) $event['end'] = $event['start'] + (int) $this->bo->cal_prefs['defaultlength']*60;
// Match categories by name
$event['category'] .= ($event['category'] ? ',':'') . $GLOBALS['egw']->categories->name2id(categories::id2name($infolog['info_cat']));
// Only add current user, not all selected calendar users
$event['participants'] = array(calendar_so::combine_user('u',$event['owner']) => 'ACHAIR');
$event['participant_types'] = array('u' => array($event['owner']=>'ACHAIR'));
// Add responsible as participant
foreach($infolog['info_responsible'] as $responsible) {
$event['participants'][calendar_so::combine_user('u',$responsible)] = calendar_so::combine_status('U');
$event['participant_types']['u'][$responsible] = 'U';
}
// Add linked contact as participant
if($infolog['info_link']['app'] == 'addressbook')
$event['title'] = egw_link::title($link_app,$link_id);
// ask first linked app via "calendar_set" hook, for further data to set, incl. links
if (($set = $GLOBALS['egw']->hooks->single($event+array('location'=>'calendar_set','entry_id'=>$link_id),$link_app)))
{
foreach((array)$set['link_app'] as $i => $l_app)
{
$event['participants'][calendar_so::combine_user('c',$infolog['info_link']['id'])] = calendar_so::combine_status('U');
$event['participant_types']['c'][$infolog['info_link']['id']] = 'U';
if (($l_id=$set['link_id'][$i])) egw_link::link('calendar',$content['link_to']['to_id'],$l_app,$l_id);
}
// Add infolog link to calendar entry
egw_link::link('calendar',$link_to_id,$infolog['info_link']['app'],$infolog['info_link']['id']);
unset($set['link_app']);
unset($set['link_id']);
// Copy infolog's links
foreach(egw_link::get_links('infolog',$link_id) as $copy_link)
{
if($copy_link['link_id'] < 0)
{
continue;
// Doesn't work yet
$fileinfo = egw_link::get_link($copy_link['app'], $copy_link['id'], 'infolog',$link_id);
$copy_link['id'] = array(
'name' => $copy_link['id'],
'type' => $copy_link['type'],
'tmp_name' => egw_link::vfs_path('infolog',$link_id,$copy_link['id'])
);
}
egw_link::link('calendar', $link_to_id, $copy_link['app'], $copy_link['id'],$copy_link['remark']);
}
break;
default:
$event['title'] = egw_link::title($link_app,$link_id);
}
// Copy same custom fields
$cal_cfs = config::get_customfields('calendar');
$link_app_cfs = config::get_customfields($link_app);
foreach($cal_cfs as $name => $settings)
{
if($link_app_cfs[$name]) $event['#'.$name] = $app_entry['#'.$name];
$event = array_merge($event,$set);
}
}
egw_link::link('calendar',$link_to_id,$link_app,$link_id);
}

View File

@ -502,18 +502,13 @@ class infolog_bo
{
$toTZ = egw_time::$server_timezone;
}
//error_log(__METHOD__.'(values[info_enddate]='.date('Y-m-d H:i:s',$values['info_enddate']).", from=".array2string($fromTZId).", to=".array2string($toTZId).") tz=".$tz->getName().', fromTZ='.$fromTZ->getName().', toTZ='.$toTZ->getName().', userTZ='.egw_time::$user_timezone->getName());
foreach($this->timestamps as $key)
{
if ($values[$key])
{
$time = new egw_time($values[$key], $tz);
$time->setTimezone($fromTZ);
if ($key == 'info_enddate')
{
// Set due date to 00:00
$time->setTime(0, 0, 0);
}
if ($time->format('Hi') == '0000')
{
// we keep dates the same in new timezone
@ -527,6 +522,7 @@ class infolog_bo
$values[$key] = egw_time::to($time,'ts');
}
}
//error_log(__METHOD__.'() --> values[info_enddate]='.date('Y-m-d H:i:s',$values['info_enddate']));
}
/**
@ -594,13 +590,6 @@ class infolog_bo
// pre-cache title and file access
self::set_link_cache($data);
}
elseif (!empty($data['info_enddate']))
{
$time = new egw_time($data['info_enddate'], egw_time::$server_timezone);
// Set due date to 00:00
$time->setTime(0, 0, 0);
$data['info_enddate'] = egw_time::to($time,'ts');
}
return $data;
}
@ -859,24 +848,9 @@ class infolog_bo
{
// convert user- to server-time
$this->time2time($to_write, null, false);
if (!empty($values['info_enddate']))
{
$time = new egw_time($values['info_enddate'], egw_time::$user_timezone);
// Set due date to 00:00
$time->setTime(0, 0, 0);
$values['info_enddate'] = egw_time::to($time,'ts');
}
}
else
{
if (!empty($values['info_enddate']))
{
$time = new egw_time($values['info_enddate'], egw_time::$server_timezone);
// Set due date to 00:00
$time->setTime(0, 0, 0);
$to_write['info_enddate'] = egw_time::to($time,'ts');
}
// convert server- to user-time
$this->time2time($values);
}
@ -1047,7 +1021,6 @@ class infolog_bo
if ($data[$key])
{
$time = new egw_time($data[$key], egw_time::$server_timezone);
if ($key == 'info_enddate') $time->setTime(0, 0,0 ); // Set due date to 00:00
if (!isset($query['date_format']) || $query['date_format'] != 'server')
{
if ($time->format('Hi') == '0000')

View File

@ -443,6 +443,25 @@ class infolog_hooks
'default'=> isset($options[$default_def]) ? $default_def : false,
);
}
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
{
$settings['calendar_set'] = array(
'type' => 'multiselect',
'label' => 'Participants for scheduling an appointment',
'name' => 'calendar_set',
'values' => array(
'responsible' => lang('Responsible'),
'contact' => lang('Contact'),
'owner' => lang('Owner'),
'user' => lang('Current user'),
'selected' => lang('Selected calendars'),
),
'help' => 'Which participants should be preselected when scheduling an appointment.',
'xmlrpc' => True,
'admin' => False,
'default'=> 'responsible,contact,user',
);
}
return $settings;
}

View File

@ -81,7 +81,6 @@ class infolog_ui
'add' => 'InfoLog - New',
'add_sub' => 'InfoLog - New Subproject',
'sp' => '- Subprojects from',
're' => 'Re:'
);
/**
@ -127,6 +126,12 @@ class infolog_ui
}
*/
$GLOBALS['infolog_ui'] =& $this; // make ourself availible for ExecMethod of get_rows function
// can be removed for next release / infolog update
if (!$GLOBALS['egw']->hooks->hook_exists('calendar_set','infolog'))
{
$GLOBALS['egw']->hooks->register_single_app_hook('infolog','calendar_set');
}
}
/**
@ -479,6 +484,95 @@ class infolog_ui
return $set;
}
/**
* Hook for calendar to set some extra data and links
*
* @param array $data event-array preset by calendar plus
* @param int $data[entry_id] info_id
* @return array with key => value pairs to set in new event and link_app/link_id arrays
*/
function calendar_set($data)
{
if (!($infolog = $this->bo->read($data['entry_id'])))
{
return $data;
}
$event = array_merge($data,array(
'category' => $GLOBALS['egw']->categories->check_list(EGW_ACL_READ, $infolog['info_cat']),
'priority' => $infolog['info_priority'] + 1,
'public' => $infolog['info_access'] != 'private',
'title' => $infolog['info_subject'],
'description' => $infolog['info_des'],
'location' => $infolog['info_location'],
'start' => $infolog['info_startdate'],
'end' => $infolog['info_enddate'] ? $infolog['info_enddate'] : $infolog['info_datecompleted']
));
unset($event['entry_id']);
if (!$event['end']) $event['end'] = $event['start'] + (int) $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength']*60;
// Match categories by name
$event['category'] = $GLOBALS['egw']->categories->name2id(categories::id2name($infolog['info_cat']));
// make current user the owner of the new event, not the selected calendar, if current user has rights for it
$event['owner'] = $user = $GLOBALS['egw_info']['user']['account_id'];
// add/modify participants according to prefs
$prefs = explode(',',$this->prefs['calendar_set'] ? $this->prefs['calendar_set'] : 'responsible,contact,user');
// if no default participants (selected calendars) --> remove all
if (!in_array('selected',$prefs))
{
$event['participants'] = $event['participant_types'] = array();
}
// Add responsible as participant
if (in_array('responsible',$prefs))
{
foreach($infolog['info_responsible'] as $responsible)
{
$event['participants'][$responsible] = $event['participant_types']['u'][$responsible] =
calendar_so::combine_status($user==$responsible?'A':'U');
}
}
// Add linked contact as participant
if (in_array('contact',$prefs) && $infolog['info_link']['app'] == 'addressbook')
{
$event['participants'][calendar_so::combine_user('c',$infolog['info_link']['id'])] =
$event['participant_types']['c'][$infolog['info_link']['id']] = calendar_so::combine_status('U');
}
if (in_array('owner',$prefs))
{
$event['participants'][$infolog['info_owner']] = $event['participant_types']['u'][$infolog['info_owner']] =
calendar_so::combine_status('A',1,'CHAIR');
}
// Add current user, if set or no other participants, which is not allowed
if (in_array('user',$prefs))
{
$event['participants'][$user] = $event['participant_types']['u'][$user] =
calendar_so::combine_status('A',1,'CHAIR');
}
// Add infolog link to calendar entry
$event['link_app'][] = $infolog['info_link']['app'];
$event['link_id'][] = $infolog['info_link']['id'];
// Copy infolog's links
foreach(egw_link::get_links('infolog',$infolog['info_id'],'','link_lastmod DESC',true) as $link)
{
if ($link['app'] != egw_link::VFS_APPNAME)
{
$event['link_app'][] = $link['app'];
$event['link_id'][] = $link['id'];
}
}
// Copy same custom fields
foreach(config::get_customfields('calendar') as $name => $settings)
{
if ($this->bo->customfields[$name]) $event['#'.$name] = $infolog['#'.$name];
}
//error_log(__METHOD__.'('.array2string($data).') infolog='.array2string($infolog).' returning '.array2string($event));
return $event;
}
/**
* Shows the infolog list
*
@ -950,7 +1044,7 @@ class infolog_ui
{
$actions['calendar'] = array( // interactive add for a single event
'icon' => 'calendar/navbar',
'caption' => 'Calendar',
'caption' => 'Schedule appointment',
'group' => $group,
'url' => 'menuaction=calendar.calendar_uiforms.edit&'.
egw_link::get_registry('calendar', 'add_app') . '[]=infolog&'.egw_link::get_registry('calendar','add_id').'[]=$id',
@ -1619,7 +1713,8 @@ class infolog_ui
$content['info_percent'] = $content['info_status'] == 'done' ? '100%' : '0%';
$content['info_datecompleted'] =$content['info_status'] == 'done' ? $this->bo->user_time_now : 0;
$content['info_confirm'] = 'not';
$content['info_subject']=lang($this->messages['re']).' '.$parent['info_subject'];
$config = config::read('infolog');
$content['info_subject']= lang(empty($config['sub_prefix']) ? 'Re:': $config['sub_prefix']).' '.$parent['info_subject'];
$content['info_des'] = '';
$content['info_lastmodified'] = '';
if ($content['info_startdate'] < $this->bo->user_time_now) // parent-startdate is in the past => today
@ -1822,6 +1917,10 @@ class infolog_ui
}
$readonlys['action'] = $readonlys['button[cancel]'] = false; // always allowed
}
elseif (!$info_id)
{
$readonlys['action'] = true;
}
// ToDo: use the old status before the delete
if ($undelete) $content['info_status'] = $this->bo->status['defaults'][$content['info_type']];
@ -2038,6 +2137,7 @@ class infolog_ui
config::save_value('implicit_rights',$this->bo->implicit_rights = $_POST['implicit_rights'] == 'edit' ? 'edit' : 'read','infolog');
config::save_value('history',$this->bo->history = $_POST['history'],'infolog');
config::save_value('index_load_cfs',$config_data['index_load_cfs'] = $_POST['index_load_cfs'],'infolog');
config::save_value('sub_prefix',$config_data['sub_prefix'] = $_POST['sub_prefix'],'infolog');
}
if($_POST['cancel'] || $_POST['save'])
{
@ -2077,6 +2177,8 @@ class infolog_ui
'lang_other' => lang('Other configurations'),
'lang_index_load_cfs' => lang('Load custom fields in index, if filtered by selected types (eg. to display them in a type-specific index template)'),
'index_load_cfs' => html::checkbox_multiselect('index_load_cfs',$config_data['index_load_cfs'],$this->bo->enums['type'],true,'',5),
'lang_sub_prefix' => lang('Prefix for sub-entries (default: Re:)'),
'sub_prefix' => html::input('sub_prefix',$config_data['sub_prefix']),
));
echo parse_navbar();

View File

@ -107,6 +107,7 @@ creation infolog de Erstellung
csv-fieldname infolog de CSV-Feldname
csv-filename infolog de CSV-Dateiname
csv-import common de CSV-Import
current user infolog de Aktueller Benutzer
custom infolog de Benutzerdefiniert
custom contact-address, leave empty to use information from most recent link infolog de benutzerdefinierte Kontaktadresse, leer lassen um die Daten der Verknüpfung zu verwenden
custom contact-information, leave emtpy to use information from most recent link infolog de benutzerdefinierte Kontaktinformationen, leer lassen um die Daten der Verknüpfung zu verwenden
@ -182,7 +183,7 @@ exists infolog de Besteht
exports infolog entries into a csv file. infolog de Exportiert Infolog Einträge in einen CSV Datei.
fax infolog de Fax
field must not be empty !!! infolog de Feld darf nicht leer sein !!!
Fields to exclude from copy when copying an infolog? (some fields like id, uid, created, createdby, modified and modifiedby are excluded by default) infolog de Welche felder wollen Sie zurücksetzen, wenn Sie einen Infologeintrag kopieren? (bestimmte Felder werden - aus technischen Erwägungen heraus - während des Kopiervorgangs immer zurückgesetzt. Bsp.: ID, Uid, Erstellt, Erstellt von, Geändert und Geändert von)
fields to exclude from copy when copying an infolog? (some fields like id, uid, created, createdby, modified and modifiedby are excluded by default) infolog de Welche felder wollen Sie zurücksetzen, wenn Sie einen Infologeintrag kopieren? (bestimmte Felder werden - aus technischen Erwägungen heraus - während des Kopiervorgangs immer zurückgesetzt. Bsp.: ID, Uid, Erstellt, Erstellt von, Geändert und Geändert von)
fieldseparator infolog de Feldbegrenzer
finish infolog de wenn erledigt
first argument for preg_replace infolog de Ersten Argument für pre_replace
@ -299,6 +300,7 @@ own upcoming infolog de eigene zukünftig
owner does not have edit rights infolog de Der Besitzer dieses Datensatzes benötigt Bearbeitungsrechte
parent infolog de Elterneintrag
parent infolog infolog de Übergeordneter Infolog
participants for scheduling an appointment infolog de Teilnehmer für Termin planen
path on (web-)serverside<br>eg. /var/samba/share infolog de Pfad auf (Web-)Server<br>zB. /var/samba/Share
path to user and group files has to be outside of the webservers document-root!!! infolog de Pfad zu Benutzer- und Gruppen-Dateien MUSS AUSSERHALB des Wurzelverzeichnisses des Webservers (document-root) liegen!!!
pattern for search in addressbook infolog de Muster für Suche im Adressbuch
@ -311,6 +313,7 @@ phone/email infolog de Telefon/E-Mail
phonecall infolog de Telefonanruf
planned infolog de geplant
planned time infolog de geplante Zeit
prefix for sub-entries (default: re:) infolog de Präfix für Untereinträge (Vorgabe: Re:)
price infolog de Preis
pricelist infolog de Preisliste
primary link infolog de Primäre Verknüpfung
@ -351,6 +354,7 @@ same day infolog de gleichen Tag
save infolog de Speichern
saves the changes made and leaves infolog de speichert die Änderungen und beendet
saves this entry infolog de diesen Eintrag speichern
schedule appointment infolog de Termin planen
search infolog de Suchen
search for: infolog de Suchen nach:
second parameter for preg_replace infolog de 2. Paramter für preg_replace
@ -370,6 +374,7 @@ select new category infolog de Wählen Sie eine Kategory
select to filter by owner infolog de Besitzer zum Filtern auswählen
select to filter by responsible infolog de Verantwortlichen zum Filtern auswählen
select users or groups infolog de Wählen Sie Benutzer oder Gruppen aus
selected calendars infolog de Ausgewählte Kalender
selection cf infolog de Auswahl für CF
sender infolog de Absender
set status to done infolog de Status auf erledigt setzen
@ -450,6 +455,7 @@ view this linked entry in its application infolog de diesen verknüpfen Eintrag
when should the todo or phonecall be started, it shows up from that date in the filter open or own open (startpage) infolog de wann soll mit dem Auftrag oder Anruf begonnen werden, ab diesem Datum wird er beim Filter offen oder eigene offen angezeigt (Startseite)
which additional fields should the responsible be allowed to edit without having edit rights?<br />status, percent and date completed are always allowed. infolog de Welche zusätzlichen Felder soll der Verantwortliche bearbeiten können ohne Bearbeitungsrechte zu haben?<br />Status, Prozent und Datum erledigt sind immer erlaubt.
which implicit acl rights should the responsible get? infolog de Welche impliziten Zugriffsrechte soll der Verantwortliche bekommen?
which participants should be preselected when scheduling an appointment. infolog de Welche Teilnehmer sollen als Vorgabe ausgewählt sein bei Termin planen.
which types should the calendar show infolog de Welche Typen soll der Kalender anzeigen
will-call infolog de ruft zurück
write (add or update) a record by passing its fields. infolog de Schreiben (zufügen oder aktualisieren) eines Datensatzes durch Angabe seiner Felder.

View File

@ -107,6 +107,7 @@ creation infolog en Creation
csv-fieldname infolog en CSV field name
csv-filename infolog en CSV file name
csv-import common en CSV import
current user infolog en Current user
custom infolog en Custom fields
custom contact-address, leave empty to use information from most recent link infolog en Custom contact address, leave empty to use information from most recent link
custom contact-information, leave emtpy to use information from most recent link infolog en Custom contact information, leave empty to use information from most recent link
@ -299,6 +300,7 @@ own upcoming infolog en Own upcoming
owner does not have edit rights infolog en Owner does not have edit rights
parent infolog en Parent
parent infolog infolog en Parent InfoLog
participants for scheduling an appointment infolog en Participants for scheduling an appointment
path on (web-)serverside<br>eg. /var/samba/share infolog en Path on (web-)serverside<br>eg. /var/samba/Share
path to user and group files has to be outside of the webservers document-root!!! infolog en Path to user and group files HAS TO BE OUTSIDE of the web servers document root!
pattern for search in addressbook infolog en Pattern for search in Address book
@ -311,6 +313,7 @@ phone/email infolog en Phone/Email
phonecall infolog en Phone call
planned infolog en Planned
planned time infolog en Planned time
prefix for sub-entries (default: re:) infolog en Prefix for sub-entries (default: Re:)
price infolog en Price
pricelist infolog en Price list
primary link infolog en Primary link
@ -351,6 +354,7 @@ same day infolog en Same day
save infolog en Save
saves the changes made and leaves infolog en Saves the changes and leaves
saves this entry infolog en Saves this entry
schedule appointment infolog en Schedule appointment
search infolog en Search
search for: infolog en Search for:
second parameter for preg_replace infolog en Second parameter for preg_replace
@ -370,6 +374,7 @@ select new category infolog en Select new category
select to filter by owner infolog en Select to filter by owner
select to filter by responsible infolog en Select to filter by responsible
select users or groups infolog en Select users or groups
selected calendars infolog en Selected calendars
selection cf infolog en Selection CF
sender infolog en Sender
set status to done infolog en Set status to done
@ -451,6 +456,7 @@ view this linked entry in its application infolog en View this linked entry in i
when should the todo or phonecall be started, it shows up from that date in the filter open or own open (startpage) infolog en When should the ToDo or Phone call be started, it shows up from that date in the filter open or own open (start page)
which additional fields should the responsible be allowed to edit without having edit rights?<br />status, percent and date completed are always allowed. infolog en Which additional fields should the responsible be allowed to edit without having edit rights?<br />Status, percent and date completed are always allowed.
which implicit acl rights should the responsible get? infolog en Which implicit ACL rights should the responsible get
which participants should be preselected when scheduling an appointment. infolog en Which participants should be preselected when scheduling an appointment.
which types should the calendar show infolog en Which types should the calendar show
will-call infolog en Will call
write (add or update) a record by passing its fields. infolog en Write, add or update a record by passing its fields.

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,7 @@ $setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog_hooks::all_hooks';
$setup_info['infolog']['hooks']['search_link'] = 'infolog_hooks::search_link';
$setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.infolog_bo.pm_icons';
$setup_info['infolog']['hooks']['timesheet_set'] = 'infolog.infolog_ui.timesheet_set';
$setup_info['infolog']['hooks']['calendar_set'] = 'infolog.infolog_ui.calendar_set';
/* Dependencies for this app to work */
$setup_info['infolog']['depends'][] = array(

View File

@ -35,6 +35,12 @@
{index_load_cfs}
</td>
</tr>
<tr class="row_off">
<td colspan="3">{lang_sub_prefix}</td>
<td>
{sub_prefix}
</td>
</tr>
<tr>
<td colspan="4" align="left">
{save_button} &nbsp; {apply_button} &nbsp; {cancel_button}

View File

@ -9,7 +9,7 @@
</columns>
<rows>
<row class="th">
<description value="Description" options=",,,info_des" span="all"/>
<description value="Description" for="info_des" span="all"/>
</row>
<row class="row" valign="top">
<description/>
@ -54,13 +54,13 @@
<description value="General" span="all"/>
</row>
<row class="row">
<description value="Priority" options=",,,info_priority"/>
<description value="Priority" for="info_priority"/>
<menulist>
<menupopup statustext="select a priority for this task" id="info_priority"/>
</menulist>
</row>
<row class="row">
<description value="Location" options=",,,info_location"/>
<description value="Location" for="info_location"/>
<textbox id="info_location" size="80" maxlength="255"/>
</row>
<row class="th">
@ -85,11 +85,11 @@
</grid>
</row>
<row class="row" valign="top">
<description value="Responsible" options=",,,info_responsible"/>
<description value="Responsible" for="info_responsible"/>
<listbox type="select-account" statustext="select a responsible user: a person you want to delegate this task" id="info_responsible" rows="9" options="both"/>
</row>
<row class="row" disabled="1">
<description value="Confirm" options=",,,info_confirm"/>
<description value="Confirm" for="info_confirm"/>
<menulist>
<menupopup statustext="do you want a confirmation of the responsible on: accepting, finishing the task or both" id="info_confirm"/>
</menulist>
@ -119,15 +119,15 @@
</hbox>
</row>
<row class="row">
<description value="planned time" options=",,,info_planned_time"/>
<description value="planned time" for="info_planned_time"/>
<date-duration id="info_planned_time" options=",$cont[duration_format]"/>
</row>
<row class="row">
<description value="Re-planned time" options=",,,info_replanned_time"/>
<description value="Re-planned time" for="info_replanned_time"/>
<date-duration id="info_replanned_time" options=",$cont[duration_format]"/>
</row>
<row class="row" valign="top" height="60%">
<description statustext="Leave blank to get the used time calculated by timesheet entries" value="used time" options=",,,info_used_time"/>
<description statustext="Leave blank to get the used time calculated by timesheet entries" value="used time" for="info_used_time"/>
<date-duration id="info_used_time"/>
</row>
</rows>
@ -160,12 +160,12 @@
</rows>
</grid>
</template>
<template id="infolog.edit" template="" lang="" group="0" version="1.9.001">
<template id="infolog.edit" template="" lang="" group="0" version="1.9.002">
<grid width="100%">
<columns>
<column width="103"/>
<column width="260"/>
<column width="140"/>
<column width="90"/>
<column width="27%"/>
</columns>
<rows>
@ -176,16 +176,16 @@
<description/>
</row>
<row class="th" height="28">
<description value="Type" options=",,,info_type"/>
<description value="Type" for="info_type"/>
<hbox options="0,0" span="all">
<menulist>
<menupopup statustext="Type of the log-entry: Note, Phonecall or ToDo" id="info_type" no_lang="1" onchange="1"/>
</menulist>
<int id="info_number" readonly="true" class="infoId"/>
<textbox type="integer" id="info_number" readonly="true" class="infoId"/>
</hbox>
</row>
<row class="row">
<description value="Contact" options=",,,info_from"/>
<description value="Contact" for="info_from"/>
<vbox options="0,0">
<hbox options="0,0">
<link-entry id="info_contact" class="noWrap"/>
@ -193,11 +193,11 @@
</hbox>
<textbox blur="@blur_title" statustext="Custom contact-information, leave emtpy to use information from most recent link" id="info_from" size="36" maxlength="255" class="$cont[hide_from_css]"/>
</vbox>
<description value="Phone/Email" options=",,,info_addr"/>
<description value="Phone/Email" for="info_addr"/>
<textbox statustext="Custom contact-address, leave empty to use information from most recent link" id="info_addr" size="30" maxlength="255" class="inputFullWidth"/>
</row>
<row class="row">
<description value="Category" options=",,,info_cat"/>
<description value="Category" for="info_cat"/>
<menulist>
<menupopup type="select-cat" statustext="select a category for this entry" id="info_cat" options="None"/>
</menulist>
@ -207,18 +207,18 @@
</hbox>
</row>
<row class="row">
<description value="Subject" options=",,,info_subject"/>
<description value="Subject" for="info_subject"/>
<textbox statustext="a short subject for the entry" id="info_subject" size="80" maxlength="255" span="all"/>
</row>
<row valign="top" height="250">
<tabbox id="description|links|delegation|project|customfields|history" span="all">
<tabs>
<tab label="Description" statustext="longer textual description"/>
<tab label="Links" statustext="Links of this entry"/>
<tab label="Delegation" statustext="responsible user, priority"/>
<tab label="Projectmanager" statustext="Project settings: price, times"/>
<tab label="Customfields" statustext="Custom fields"/>
<tab label="History" statustext="Change history"/>
<tab id="description" label="Description" statustext="longer textual description"/>
<tab id="links" label="Links" statustext="Links of this entry"/>
<tab id="delegation" label="Delegation" statustext="responsible user, priority"/>
<tab id="project" label="Projectmanager" statustext="Project settings: price, times"/>
<tab id="customfields" label="Customfields" statustext="Custom fields"/>
<tab id="history" label="History" statustext="Change history"/>
</tabs>
<tabpanels>
<template id="infolog.edit.description"/>
@ -234,52 +234,57 @@
<description value="Dates, Status, Access" span="all"/>
</row>
<row class="row_on">
<description value="Startdate" options=",,,info_startdate"/>
<description value="Startdate" for="info_startdate"/>
<date-time statustext="when should the ToDo or Phonecall be started, it shows up from that date in the filter open or own open (startpage)" id="info_startdate" options=",2"/>
<description value="Enddate" options=",,,info_enddate"/>
<date statustext="til when should the ToDo or Phonecall be finished" id="info_enddate"/>
<description value="Enddate" for="info_enddate"/>
<date-time statustext="til when should the ToDo or Phonecall be finished" id="info_enddate"/>
</row>
<row class="row">
<description value="Status" options=",,,info_status"/>
<description value="Status" for="info_status"/>
<menulist>
<menupopup statustext="@status_help" id="info_status" onchange="if (this.value=='done' || this.value=='billed') set_element(this.form,'exec[info_percent]','100'); else if (this.value=='not-started') set_element(this.form,'exec[info_percent]','0');"/>
</menulist>
<description value="Completed" options=",,,info_percent"/>
<description value="Completed" for="info_percent"/>
<menulist>
<menupopup type="select-percent" statustext="Percent completed" id="info_percent" onchange="if (this.value==100 &amp;&amp; this.form['exec[info_status]'].value != 'done' &amp;&amp; this.form['exec[info_status]'].value != 'billed' &amp;&amp; this.form['exec[info_status]'].value != 'cancelled') this.form['exec[info_status]'].value='done'; else if (this.value != 100 &amp;&amp; this.form['exec[info_status]'].value != 'cancelled') this.form['exec[info_status]'].value=this.value != 0 ? 'ongoing' : 'not-started'; else if (this.value==0 &amp;&amp; this.form['exec[info_status]'].value != 'cancelled' &amp;&amp; this.form['exec[info_status]'].value != 'offer') this.form['exec[info_status]'].value='not-started'; "/>
</menulist>
</row>
<row class="row">
<description value="Date completed" options=",,,info_datecompleted"/>
<description value="Date completed" for="info_datecompleted"/>
<date-time statustext="Date completed (leave it empty to have it automatic set if status is done or billed)" id="info_datecompleted"/>
<description value="Private" options=",,,info_access"/>
<description value="Private" for="info_access"/>
<checkbox statustext="should this entry only be visible to you and people you grant privat access via the ACL" id="info_access" options="private,public"/>
</row>
<row class="row" disabled="!@info_owner">
<description value="Owner"/>
<menulist>
<menupopup type="select-account" id="info_owner" readonly="true"/>
</menulist>
<vbox options="0,0">
<menulist>
<menupopup type="select-account" id="info_owner" readonly="true"/>
</menulist>
<date-time id="info_created" readonly="true"/>
</vbox>
<description value="Last modified"/>
<hbox options="0" orient="0">
<vbox options="0" orient="0">
<menulist>
<menupopup type="select-account" id="info_modifier" readonly="true"/>
</menulist>
<date-time id="info_datemodified" readonly="true" class="lpadding5"/>
</hbox>
<date-time id="info_datemodified" readonly="true"/>
</vbox>
</row>
<row>
<hbox span="3">
<hbox span="2">
<button statustext="Saves this entry" label="Save" id="button[save]"/>
<button statustext="Apply the changes" label="Apply" id="button[apply]"/>
<button statustext="leave without saveing the entry" label="Cancel" id="button[cancel]" onclick="window.close();"/>
<menulist>
<menupopup statustext="Execute a further action for this entry" id="action" onchange="this.form.submit(); this.value='';" options="Actions..."/>
</menulist>
<checkbox label="Do not notify of these changes" id="no_notifications" span="2"/>
<html id="js"/>
</hbox>
<button align="right" statustext="delete this entry" label="Delete" id="button[delete]" onclick="return $cont[info_anz_subs] || confirm('Delete this entry');"/>
<hbox span="2">
<checkbox label="Do not notify of these changes" id="no_notifications" span="2"/>
<button align="right" statustext="delete this entry" label="Delete" id="button[delete]" onclick="return $cont[info_anz_subs] || confirm('Delete this entry');"/>
</hbox>
</row>
</rows>
</grid>

View File

@ -103,7 +103,7 @@
</menulist>
<vbox cols="1" rows="3" options="0,0,1">
<date-time id="${row}[info_startdate]" readonly="true" options=",8" class="fixedHeight"/>
<date id="${row}[info_enddate]" readonly="true" class="$row_cont[end_class] fixedHeight"/>
<date-time id="${row}[info_enddate]" readonly="true" options=",8" class="$row_cont[end_class] fixedHeight"/>
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
</vbox>
<vbox cols="1" rows="3" options="0,0">
@ -161,7 +161,7 @@
</hbox>
<hbox options="0,0" class="image16" orient="0">
<button label="Insert in document" id="document[$row_cont[info_id]]" image="etemplate/merge"/>
<image label="Filemanager" src="filemanager/navbar" options="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="image16"/>
<image label="Filemanager" src="filemanager/navbar" href="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="image16"/>
</hbox>
</vbox>
</row>