mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
fixed some bugs and missing things:
- subs are closed (set to done) too, if an entry is set to done via the close action - infolog stays now in the subs view, if you add or edit an entry there - entries created from the projectmanager go a set category - times can optionaly be shown in the list
This commit is contained in:
parent
02c51aa379
commit
e73c48f794
@ -15,7 +15,7 @@
|
||||
/**
|
||||
* eTemplate extension to input or display date and/or time values
|
||||
*
|
||||
* Contains the following widgets: Date, Date+Time, Time, Hour
|
||||
* Contains the following widgets: Date, Date+Time, Time, Hour, Duration
|
||||
*
|
||||
* Supported attributes: format[,options]
|
||||
* format: ''=timestamp, or eg. 'Y-m-d H:i' for 2002-12-31 23:59
|
||||
@ -315,11 +315,12 @@
|
||||
/**
|
||||
* pre-processing of the duration extension
|
||||
*
|
||||
* Options contain $data_format,$input_format,$hours_per_day,$empty_not_0
|
||||
* - data_format: d = days, h = hours, default minutes
|
||||
* - input_format: d = days, h = hours, default hours+days (selectbox), optional % = allow to enter a percent value (no conversation)
|
||||
* - hours_per_day: default 8 (workday)
|
||||
* - should the widget differ between 0 and empty, which get then returned as NULL
|
||||
* Options contain $data_format,$input_format,$hours_per_day,$empty_not_0,$short_labels
|
||||
* 1. data_format: d = days, h = hours, default minutes
|
||||
* 2. input_format: d = days, h = hours, default hours+days (selectbox), optional % = allow to enter a percent value (no conversation)
|
||||
* 3. hours_per_day: default 8 (workday)
|
||||
* 4. should the widget differ between 0 and empty, which get then returned as NULL
|
||||
* 5. short_labels use d/h instead of day/hour
|
||||
*
|
||||
* @param string $name form-name of the control
|
||||
* @param mixed &$value value / existing content, can be modified
|
||||
@ -333,7 +334,7 @@
|
||||
{
|
||||
//echo "<p>pre_process_duration($name,$value,...) cell[size]='$cell[size]'</p>\n";
|
||||
$readonly = $readonlys || $cell['readonly'];
|
||||
list($data_format,$input_format,$hours_per_day,$empty_not_0) = explode(',',$cell['size']);
|
||||
list($data_format,$input_format,$hours_per_day,$empty_not_0,$short_labels) = explode(',',$cell['size']);
|
||||
if (!$hours_per_day) $hours_per_day = 8; // workday is 8 hours
|
||||
if (($percent_allowed = strstr($input_format,'%') !== false))
|
||||
{
|
||||
@ -387,8 +388,8 @@
|
||||
|
||||
$selbox =& $tpl->empty_cell('select',$cell_name.'[unit]');
|
||||
$selbox['sel_options'] = array(
|
||||
'h' => 'hours',
|
||||
'd' => 'days',
|
||||
'h' => $short_labels ? 'h' : 'hours',
|
||||
'd' => $short_labels ? 'd' : 'days',
|
||||
);
|
||||
if ($cell['tabindex']) $selbox['tabindex'] = $cell['tabindex'];
|
||||
|
||||
@ -409,7 +410,8 @@
|
||||
elseif (!$readonly || $value)
|
||||
{
|
||||
$cell['no_lang'] = 2;
|
||||
$cell['label'] .= ($cell['label'] ? ' ' : '') . '%s '.($unit == 'h' ? lang('hours') : lang('days'));
|
||||
$cell['label'] .= ($cell['label'] ? ' ' : '') . '%s '.($unit == 'h' ? ($short_labels ? 'h' : lang('hours')) :
|
||||
($short_labels ? 'd' : lang('days')));
|
||||
}
|
||||
return True; // extra Label is ok
|
||||
}
|
||||
|
@ -37,6 +37,8 @@
|
||||
* 'no_files' => // I boolean suppress attach-files, default no
|
||||
* 'search_label' => // I string label to use instead of search
|
||||
* 'link_label' => // I string label for the link button, default 'Link'
|
||||
* // optional only for the link-add widget
|
||||
* 'extra' => // I array with extra parameters, eg. array('cat_id' => 15)
|
||||
* );
|
||||
*</code>
|
||||
*
|
||||
@ -207,7 +209,8 @@
|
||||
$value['options-app'] = array();
|
||||
foreach($apps as $app => $label)
|
||||
{
|
||||
$link = $GLOBALS['egw']->link('/index.php',$this->link->add($app,$value['to_app'],$value['to_id']));
|
||||
$link = $GLOBALS['egw']->link('/index.php',$this->link->add($app,$value['to_app'],$value['to_id'])+
|
||||
(is_array($value['extra']) ? $value['extra'] : array()));
|
||||
if (($popup = $this->link->is_popup($app,'add')))
|
||||
{
|
||||
list($w,$h) = explode('x',$popup);
|
||||
|
@ -648,7 +648,7 @@
|
||||
function cal_to_include($args)
|
||||
{
|
||||
//echo "<p>cal_to_include("; print_r($args); echo ")</p>\n";
|
||||
$user = intval($args['owner']);
|
||||
$user = (int) $args['owner'];
|
||||
if ($user <= 0 && !checkdate($args['month'],$args['day'],$args['year']))
|
||||
{
|
||||
return False;
|
||||
|
@ -154,6 +154,8 @@
|
||||
'cat_id' => $values['cat_id'],
|
||||
'order' => $values['order'],
|
||||
'sort' => $values['sort'],
|
||||
'action' => $values['action'],
|
||||
'action_id' => $values['action_id'],
|
||||
'col_filter' => $values['col_filter'],
|
||||
'session_for' => $for
|
||||
));
|
||||
@ -192,6 +194,7 @@
|
||||
$rows[] = $info;
|
||||
}
|
||||
if ($query['no_actions']) $rows['no_actions'] = true;
|
||||
if ($query['no_times']) $rows['no_times'] = true;
|
||||
//echo "<p>readonlys = "; _debug_array($readonlys);
|
||||
//echo "rows=<pre>".print_r($rows,True)."</pre>\n";
|
||||
|
||||
@ -232,6 +235,13 @@
|
||||
{
|
||||
$action = $values['action'] ? $values['action'] : get_var('action',array('POST','GET'));
|
||||
$action_id = $values['action_id'] ? $values['action_id'] : get_var('action_id',array('POST','GET'));
|
||||
if (!$action)
|
||||
{
|
||||
$session = $this->read_sessiondata();
|
||||
$action = $session['action'];
|
||||
$action_id = $session['action_id'];
|
||||
unset($session);
|
||||
}
|
||||
}
|
||||
//echo "<p>uiinfolog::index(action='$action/$action_id',called_as='$called_as/$values[referer]',own_referer='$own_referer') values=\n"; _debug_array($values);
|
||||
if (!is_array($values))
|
||||
@ -265,6 +275,10 @@
|
||||
}
|
||||
elseif ($values['cancel'] && $own_referer)
|
||||
{
|
||||
$session = $this->read_sessiondata();
|
||||
unset($session['action']);
|
||||
unset($session['action_id']);
|
||||
$this->save_sessiondata($session);
|
||||
$this->tmpl->location($own_referer);
|
||||
}
|
||||
else
|
||||
@ -281,7 +295,7 @@
|
||||
if (!($values['msg'] = $this->delete($do_id,$called_as,'index'))) return;
|
||||
break;
|
||||
case 'close':
|
||||
return $this->close($do_id,$called_as);
|
||||
return $this->close($do_id,$called_as,$do == 'close_subs');
|
||||
case 'sp':
|
||||
return $this->edit(0,'sp',$do_id,'',$called_as);
|
||||
case 'view':
|
||||
@ -324,8 +338,9 @@
|
||||
$values['nm']['bottom_too'] = True;
|
||||
$values['nm']['never_hide'] = isset($GLOBALS['egw_info']['user']['preferences']['infolog']['never_hide']) ?
|
||||
$GLOBALS['egw_info']['user']['preferences']['infolog']['never_hide'] : $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] > 15;
|
||||
$persist['action'] = $values['nm']['action'] = $action;
|
||||
$persist['action_id'] = $values['nm']['action_id'] = $action_id;
|
||||
$values['nm']['no_times'] = !$GLOBALS['egw_info']['user']['preferences']['infolog']['show_times'];
|
||||
$values['action'] = $persist['action'] = $values['nm']['action'] = $action;
|
||||
$values['action_id'] = $persist['action_id'] = $values['nm']['action_id'] = $action_id;
|
||||
$persist['called_as'] = $called_as;
|
||||
$persist['own_referer'] = $own_referer;
|
||||
|
||||
@ -355,6 +370,15 @@
|
||||
'info_status' => 'done',
|
||||
);
|
||||
$this->bo->write($values);
|
||||
|
||||
$query = array('action'=>'sp','action_id'=>$info_id);
|
||||
foreach((array)$this->bo->search($query) as $info)
|
||||
{
|
||||
if ($info['info_id_parent'] == $info_id) // search also returns linked entries!
|
||||
{
|
||||
$this->close($info['info_id'],$referer); // we call ourselfs recursive to process subs from subs too
|
||||
}
|
||||
}
|
||||
}
|
||||
return $referer ? $this->tmpl->location($referer) : $this->index();
|
||||
}
|
||||
@ -543,6 +567,7 @@
|
||||
$action_id = $action_id ? $action_id : get_var('action_id',array('POST','GET'));
|
||||
$info_id = $content ? $content : get_var('info_id', array('POST','GET'));
|
||||
$type = $type ? $type : get_var('type', array('POST','GET'));
|
||||
$cat_id = get_var('cat_id',array('POST','GET'),0);
|
||||
$ref=$referer = $referer !== '' ? $referer : ($_GET['referer'] ? $_GET['referer'] :
|
||||
$GLOBALS['egw']->common->get_referer('/index.php?menuaction=infolog.uiinfolog.index'));
|
||||
$referer = preg_replace('/([&?]{1})msg=[^&]+&?/','\\1',$referer); // remove previou/old msg from referer
|
||||
@ -550,6 +575,11 @@
|
||||
//echo "<p>uiinfolog::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";
|
||||
|
||||
$content = $this->bo->read( $info_id || $action != 'sp' ? $info_id : $action_id );
|
||||
|
||||
if (is_numeric($_REQUEST['cat_id']))
|
||||
{
|
||||
$content['info_cat'] = (int) $_REQUEST['cat_id'];
|
||||
}
|
||||
$today = mktime(-$this->bo->tz_offset,0,0,date('m'),date('d'),date('Y')); // time=00:00
|
||||
|
||||
if (intval($content['info_link_id']) > 0 && !$this->link->get_link($content['info_link_id']))
|
||||
|
@ -97,6 +97,14 @@
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_times' => array(
|
||||
'type' => 'check',
|
||||
'label' => 'Show times',
|
||||
'name' => 'show_times',
|
||||
'help' => 'Show a column for used and planned times in the list.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
);
|
||||
|
||||
unset($show_entries);
|
||||
|
File diff suppressed because one or more lines are too long
@ -182,6 +182,7 @@ permission denied infolog de Zugriff verweigert
|
||||
phone infolog de Anruf
|
||||
phone/email infolog de Telefon/Email
|
||||
phonecall infolog de Telefonanruf
|
||||
planned infolog de geplant
|
||||
planned time infolog de geplante Zeit
|
||||
priority infolog de Priorität
|
||||
private infolog de Privat
|
||||
@ -211,16 +212,18 @@ select an app to search in infolog de eine Anwendung zum Durchsuchen ausw
|
||||
select an entry to link with infolog de einen Eintrag zum Verküpfen auswählen
|
||||
select to filter by owner infolog de Besiter zum Filtern auswählen
|
||||
select to filter by responsible infolog de Verantwortlichen zum Filtern auswählen
|
||||
sets the status of this entry to done infolog de Setzt den Status dieses Eintrags auf erledigt
|
||||
sets the status of this entry and its subs to done infolog de Setzt den Status dieses Eintrags und seiner Untereinträge auf erledigt
|
||||
should infolog display your open entries - not finished tasks, phonecalls or notes - on the main screen. works only if you dont selected an application for the main screen (in your preferences). infolog de Soll InfoLog die offenen Einträge - nicht beendete Aufgaben, Anrufe oder Notizen - auf der Startsteite anzeigen. Funktioniert nur, wenn Sie keine (einzelne) Anwendung für die Startseite ausgewählt haben (in Ihren Einstellungen).
|
||||
should infolog show subtasks, -calls or -notes in the normal view or not. you can always view the subs via there parent. infolog de Soll InfoLog Untereinträge in der normalen Ansicht anzeigen oder nicht. Sie können die Untereinträge immer über deren Haupteintrag anzeigen.
|
||||
should infolog show the links to other applications and/or the file-attachments in the infolog list (normal view when you enter infolog). infolog de Soll InfoLog die Verknüpfungen zu anderen Anwendungen und/oder die Datei-Anhänge in der InfoLog Liste (normale Ansicht wenn InfoLog aufgerufen wird) anzeigen.
|
||||
should infolog use full names (surname and familyname) or just the loginnames. infolog de Soll InfoLog den vollen Namen (Vor- und Familienname) oder nur die Benutzerkennung verwenden.
|
||||
should this entry only be visible to you and people you grant privat access via the acl infolog de soll dieser Eintrag nur sichtbar sein für Sie und Personen denen Sie privaten Zugriff über die ACL erlaubt haben
|
||||
show a column for used and planned times in the list. infolog de Zeige eine Spalte für benutzte und geplante Zeiten in der List.
|
||||
show full usernames infolog de Kompletten Benutzernamen anzeigen
|
||||
show in the infolog list infolog de In der InfoLog Liste anzeigen
|
||||
show list of upcoming entries infolog de Liste zukünftiger Einträge anzeigen
|
||||
show open entries: tasks/calls/notes on main screen infolog de Nicht erledigte Einträge: Aufgaben/Anrufe/Notizen auf Startseite anzeigen
|
||||
show times infolog de Zeiten anzeigen
|
||||
small view infolog de schmale Ansicht
|
||||
start a new search, cancel this link infolog de eine neue Suche starten, diese Verknüpfung abbrechen
|
||||
startdate infolog de Startdatum
|
||||
|
@ -182,6 +182,7 @@ permission denied infolog en Permission denied
|
||||
phone infolog en Phone Call
|
||||
phone/email infolog en Phone/Email
|
||||
phonecall infolog en Phone Call
|
||||
planned infolog en planned
|
||||
planned time infolog en planned time
|
||||
priority infolog en Priority
|
||||
private infolog en Private
|
||||
@ -211,16 +212,18 @@ select an app to search in infolog en Select an App to search in
|
||||
select an entry to link with infolog en Select an entry to link with
|
||||
select to filter by owner infolog en select to filter by owner
|
||||
select to filter by responsible infolog en select to filter by responsible
|
||||
sets the status of this entry to done infolog en Sets the status of this entry to done
|
||||
sets the status of this entry and its subs to done infolog en Sets the status of this entry and its subs to done
|
||||
should infolog display your open entries - not finished tasks, phonecalls or notes - on the main screen. works only if you dont selected an application for the main screen (in your preferences). infolog en Should InfoLog display your open entries - not finised tasks, phonecalls or notes - on the main screen. Works only if you dont selected an application for the main screen (in your preferences).
|
||||
should infolog show subtasks, -calls or -notes in the normal view or not. you can always view the subs via there parent. infolog en Should InfoLog show Subtasks, -calls or -notes in the normal view or not. You can always view the subs via their parent.
|
||||
should infolog show the links to other applications and/or the file-attachments in the infolog list (normal view when you enter infolog). infolog en Should InfoLog show the links to other applications and/or the file-attachments in the InfoLog list (normal view when you enter InfoLog).
|
||||
should infolog use full names (surname and familyname) or just the loginnames. infolog en Should InfoLog use full names (surname and familyname) or just the loginnames.
|
||||
should this entry only be visible to you and people you grant privat access via the acl infolog en should this entry only be visible to you and people you grant privat access via the ACL
|
||||
show a column for used and planned times in the list. infolog en Show a column for used and planned times in the list.
|
||||
show full usernames infolog en Show full usernames
|
||||
show in the infolog list infolog en Show in the InfoLog list
|
||||
show list of upcoming entries infolog en show list of upcoming entries
|
||||
show open entries: tasks/calls/notes on main screen infolog en Show open entries: Tasks/Calls/Notes on main screen
|
||||
show times infolog en Show times
|
||||
small view infolog en small view
|
||||
start a new search, cancel this link infolog en start a new search, cancel this link
|
||||
startdate infolog en Start Date
|
||||
|
@ -11,3 +11,4 @@
|
||||
.urgent_done { color:#800080; }
|
||||
.overdue { color:#cc0000; font-weight:bold; }
|
||||
.private { font-style:italic; }
|
||||
.planned { font-style:italic; }
|
@ -19,6 +19,7 @@
|
||||
<column width="5%"/>
|
||||
<column/>
|
||||
<column width="8%"/>
|
||||
<column disabled="@no_times"/>
|
||||
<column width="8%"/>
|
||||
<column width="12%"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
@ -38,6 +39,10 @@
|
||||
<description value="Startdate"/>
|
||||
<description value="Enddate"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Times"/>
|
||||
<description class="planned" value="planned"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Owner"/>
|
||||
<description value="Responsible"/>
|
||||
@ -61,6 +66,10 @@
|
||||
<date id="${row}[info_startdate]" readonly="true"/>
|
||||
<date class="$row_cont[end_class]" id="${row}[info_enddate]" readonly="true"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<date-duration id="${row}[info_used_time]" readonly="true" options=",,,,1"/>
|
||||
<date-duration id="${row}[info_planned_time]" class="planned" readonly="true" options=",,,,1"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_owner]" readonly="true"/>
|
||||
@ -81,7 +90,7 @@
|
||||
<hbox>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
@ -93,6 +102,7 @@
|
||||
<column width="2%"/>
|
||||
<column/>
|
||||
<column width="8%"/>
|
||||
<column disabled="@no_times"/>
|
||||
<column width="8%"/>
|
||||
<column width="12%"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
@ -124,6 +134,10 @@
|
||||
<nextmatch-sortheader label="Startdate" id="info_startdate"/>
|
||||
<nextmatch-sortheader label="Enddate" id="info_enddate"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<nextmatch-sortheader label="Times" id="info_used_time"/>
|
||||
<nextmatch-sortheader id="info_planned_time" class="planned" label="planned"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<nextmatch-accountfilter id="info_owner" options="Owner" statustext="Select to filter by owner"/>
|
||||
<nextmatch-accountfilter id="info_responsible" options="Responsible" statustext="Select to filter by responsible"/>
|
||||
@ -147,6 +161,10 @@
|
||||
<date-time options=",8" id="${row}[info_startdate]" readonly="true"/>
|
||||
<date class="$row_cont[end_class]" id="${row}[info_enddate]" readonly="true"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<date-duration id="${row}[info_used_time]" readonly="true" options=",,,,1"/>
|
||||
<date-duration id="${row}[info_planned_time]" class="planned" readonly="true" options=",,,,1"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_owner]" readonly="true"/>
|
||||
@ -167,7 +185,7 @@
|
||||
<hbox>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done.gif" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
|
Loading…
Reference in New Issue
Block a user