mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 19:19:43 +01:00
WIP admin history
This commit is contained in:
parent
e1476e4167
commit
21962bdfe4
@ -5,51 +5,63 @@
|
|||||||
<template id="admin.cmds.rows" template="" lang="" group="0" version="1.5.001">
|
<template id="admin.cmds.rows" template="" lang="" group="0" version="1.5.001">
|
||||||
<grid width="100%">
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="30%" minWidth="300"/>
|
<column width="20%" minWidth="300"/> <!-- Title -->
|
||||||
<column/>
|
<column width="200"/> <!-- Application -->
|
||||||
<column/>
|
<column width="200"/> <!-- Account -->
|
||||||
<column/>
|
<column width="200"/> <!-- Type -->
|
||||||
<column width="120"/>
|
<column width="200"/> <!-- Requested -->
|
||||||
<column width="120"/>
|
<column width="15%" minWidth="120"/> <!-- Comment -->
|
||||||
<column width="120"/>
|
<column width="120"/> <!-- Scheduled -->
|
||||||
<column width="30%" minWidth="120"/>
|
<column width="80"/> <!-- Periodic -->
|
||||||
<column/>
|
<column/> <!-- Remote -->
|
||||||
<column/>
|
<column width="200"/> <!-- Created/or -->
|
||||||
<column/>
|
<column width="15%" minWidth="120"/> <!-- Status/Error -->
|
||||||
<column/>
|
<column width="200"/> <!-- Mofified/r -->
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row class="th">
|
<row class="th">
|
||||||
<nextmatch-header label="Title" id="title"/>
|
<nextmatch-header label="Title" id="title"/>
|
||||||
|
<nextmatch-filterheader type="select-app" empty_label="Application" id="app"/>
|
||||||
|
<nextmatch-accountfilter empty_label="Account" id="account"/>
|
||||||
<nextmatch-filterheader empty_label="Type" id="type"/>
|
<nextmatch-filterheader empty_label="Type" id="type"/>
|
||||||
<nextmatch-accountfilter empty_label="Requested" id="requested"/>
|
<nextmatch-accountfilter empty_label="Requested" id="requested"/>
|
||||||
<nextmatch-header label="Comment" id="comment"/>
|
<nextmatch-header label="Comment" id="comment"/>
|
||||||
<nextmatch-sortheader label="Scheduled" id="scheduled"/>
|
<nextmatch-sortheader label="Scheduled" id="cmd_scheduled"/>
|
||||||
<nextmatch-filterheader empty_label="Periodic" id="periodic"/>
|
<nextmatch-filterheader empty_label="Periodic" id="periodic"/>
|
||||||
<nextmatch-filterheader options="Remote" id="remote_id"/>
|
<nextmatch-filterheader options="Remote" id="remote_id"/>
|
||||||
<nextmatch-sortheader label="Created" id="created"/>
|
<vbox>
|
||||||
|
<nextmatch-sortheader label="Created" id="cmd_created"/>
|
||||||
<nextmatch-accountfilter empty_label="Creator" id="creator"/>
|
<nextmatch-accountfilter empty_label="Creator" id="creator"/>
|
||||||
|
</vbox>
|
||||||
<nextmatch-filterheader empty_label="Status" id="status"/>
|
<nextmatch-filterheader empty_label="Status" id="status"/>
|
||||||
<nextmatch-sortheader label="Modified" id="modified"/>
|
<vbox>
|
||||||
|
<nextmatch-sortheader label="Modified" id="cmd_modified"/>
|
||||||
<nextmatch-accountfilter options="Modifier" id="modifier"/>
|
<nextmatch-accountfilter options="Modifier" id="modifier"/>
|
||||||
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
<row class="row $row_cont[class]">
|
<row class="row $row_cont[class]">
|
||||||
<description id="${row}[title]" statustext="$row_cont[data]"/>
|
<description id="${row}[title]" statustext="$row_cont[data]"/>
|
||||||
|
<select-app id="${row}[app]" readonly="true"/>
|
||||||
|
<select-account id="${row}[account]" readonly="true"/>
|
||||||
<select id="${row}[type]" readonly="true"/>
|
<select id="${row}[type]" readonly="true"/>
|
||||||
<url-email id="${row}[requested_email]" readonly="true" statustext="$row_cont[comment]"/>
|
<url-email id="${row}[requested_email]" readonly="true" statustext="$row_cont[comment]"/>
|
||||||
<description id="${row}[comment]"/>
|
<description id="${row}[comment]"/>
|
||||||
<date-time id="${row}[scheduled]" readonly="true"/>
|
<date-time id="${row}[scheduled]" readonly="true"/>
|
||||||
<description id="${row}[rrule]"/>
|
<description id="${row}[rrule]"/>
|
||||||
<select id="${row}[remote_id]" readonly="true"/>
|
<select id="${row}[remote_id]" readonly="true"/>
|
||||||
|
<vbox>
|
||||||
<date-time id="${row}[created]" readonly="true"/>
|
<date-time id="${row}[created]" readonly="true"/>
|
||||||
<select-account id="${row}[creator]" readonly="true" statustext="$row_cont[creator_email]"/>
|
<select-account id="${row}[creator]" readonly="true" statustext="$row_cont[creator_email]"/>
|
||||||
|
</vbox>
|
||||||
<vbox>
|
<vbox>
|
||||||
<select id="${row}[status]" readonly="true"/>
|
<select id="${row}[status]" readonly="true"/>
|
||||||
<description id="${row}[error]" class="redItalic"/>
|
<description id="${row}[error]" class="redItalic"/>
|
||||||
<description id="${row}[value]"/>
|
<description id="${row}[value]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
<vbox>
|
||||||
<date-time id="${row}[modified]" readonly="true"/>
|
<date-time id="${row}[modified]" readonly="true"/>
|
||||||
<select-account id="${row}[modifier]" readonly="true" statustext="$row_cont[modifier_email]"/>
|
<select-account id="${row}[modifier]" readonly="true" statustext="$row_cont[modifier_email]"/>
|
||||||
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @subpackage etemplate
|
* @subpackage etemplate
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||||
* @copyright 2002-18 by RalfBecker@outdoor-training.de
|
* @copyright 2002-19 by RalfBecker@outdoor-training.de
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace EGroupware\Api\Etemplate\Widget;
|
namespace EGroupware\Api\Etemplate\Widget;
|
||||||
@ -762,6 +762,43 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
}, array(), 86400); // cache for 1 day
|
}, array(), 86400); // cache for 1 day
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merges actions together with positions based on group parameter
|
||||||
|
*
|
||||||
|
* @param array $actions
|
||||||
|
* @param array $actions2
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
static function merge_actions_by_group(array $actions, array $actions2)
|
||||||
|
{
|
||||||
|
//error_log(__METHOD__.'('.array2string($actions).', '.array2string($actions2).')');
|
||||||
|
|
||||||
|
//return array_merge_recursive($actions, $actions2);
|
||||||
|
foreach($actions2 as $name => $action)
|
||||||
|
{
|
||||||
|
// overwrite existing action of given name or append action without group
|
||||||
|
if (isset($actions[$name]) || !isset($action['group']))
|
||||||
|
{
|
||||||
|
$actions[$name] = $action;
|
||||||
|
}
|
||||||
|
// find position to insert action
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$n = 0;
|
||||||
|
foreach($actions as $a)
|
||||||
|
{
|
||||||
|
if ($a['group'] > $action['group']) break;
|
||||||
|
++$n;
|
||||||
|
}
|
||||||
|
$actions = array_merge(array_slice($actions, 0, $n),
|
||||||
|
array($name => $action),
|
||||||
|
array_slice($actions, $n, count($actions)-$n));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//error_log(__METHOD__.'() returning '.array2string($actions));
|
||||||
|
return $actions;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default maximum length for context submenus, longer menus are put as a "More" submenu
|
* Default maximum length for context submenus, longer menus are put as a "More" submenu
|
||||||
*/
|
*/
|
||||||
@ -817,6 +854,19 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
//echo "<p>".__METHOD__."(\$actions, '$template_name', '$prefix', \$action_links, $max_length) \$actions="; _debug_array($actions);
|
//echo "<p>".__METHOD__."(\$actions, '$template_name', '$prefix', \$action_links, $max_length) \$actions="; _debug_array($actions);
|
||||||
$first_level = !$action_links; // add all first level actions
|
$first_level = !$action_links; // add all first level actions
|
||||||
|
|
||||||
|
if ($first_level)
|
||||||
|
{
|
||||||
|
// allow other apps to add actions
|
||||||
|
foreach(Api\Hooks::process(array(
|
||||||
|
'location' => 'add_row_actions',
|
||||||
|
'template_name' => $template_name,
|
||||||
|
), array('policy'), true) as $app => $data)
|
||||||
|
{
|
||||||
|
// todo: place new items based on group
|
||||||
|
if ($data) $actions = self::merge_actions_by_group((array)$actions, $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//echo "actions="; _debug_array($actions);
|
//echo "actions="; _debug_array($actions);
|
||||||
$egw_actions = array();
|
$egw_actions = array();
|
||||||
$n = 1;
|
$n = 1;
|
||||||
@ -1053,7 +1103,6 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
return $cat_actions;
|
return $cat_actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate input
|
* Validate input
|
||||||
*
|
*
|
||||||
@ -1092,7 +1141,6 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
$validated += $content[$value[$preserve['action_var']].'_popup'];
|
$validated += $content[$value[$preserve['action_var']].'_popup'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Save current column settings as default, clear, or force (admins only)
|
// Save current column settings as default, clear, or force (admins only)
|
||||||
if($GLOBALS['egw_info']['user']['apps']['admin'] && $app && $value['selectcols'])
|
if($GLOBALS['egw_info']['user']['apps']['admin'] && $app && $value['selectcols'])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user