forked from extern/egroupware
Add Un-delete to context menu
This commit is contained in:
parent
8c133f883d
commit
e16ea584ba
@ -742,6 +742,10 @@ class timesheet_ui extends timesheet_bo
|
||||
$readonlys["delete[$row[ts_id]]"] = true;
|
||||
$row['class'] .= ' rowNoDelete ';
|
||||
}
|
||||
if($row['ts_status'] != self::DELETED_STATUS)
|
||||
{
|
||||
$row['class'] .= ' rowNoUndelete ';
|
||||
}
|
||||
if ($query['col_filter']['ts_project'] || !$query['filter2'])
|
||||
{
|
||||
unset($row['ts_project']); // dont need or want to show it
|
||||
@ -976,6 +980,13 @@ class timesheet_ui extends timesheet_bo
|
||||
'group' => ++$group,
|
||||
'disableClass' => 'rowNoDelete',
|
||||
),
|
||||
'undelete' => array(
|
||||
'caption' => 'Un-Delete',
|
||||
'confirm' => 'Recover this entry',
|
||||
'confirm_multiple' => 'Recover these entries',
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoUndelete',
|
||||
)
|
||||
);
|
||||
// enable additonal edit check for following actions, if they are generally available
|
||||
foreach(array('cat','status') as $action)
|
||||
@ -1046,6 +1057,20 @@ class timesheet_ui extends timesheet_bo
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'undelete':
|
||||
$action_msg =lang('recovered');
|
||||
foreach((array)$checked as $n => $id)
|
||||
{
|
||||
if ($this->set_status($id,''))
|
||||
{
|
||||
$success++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$failed++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'to_status':
|
||||
$action_msg =lang('changed status');
|
||||
foreach((array)$checked as $n => $id)
|
||||
|
Loading…
Reference in New Issue
Block a user