diff --git a/src/css/default/showObjectAccessLogs.css b/src/css/default/showObjectAccessLogs.css index ddb9a25a..bc8b957f 100644 --- a/src/css/default/showObjectAccessLogs.css +++ b/src/css/default/showObjectAccessLogs.css @@ -34,3 +34,7 @@ table.objectAccessLogs .col-value div { margin: 0; padding: 0; } + +table.objectAccessLogs tr.operation:hover { + font-weight: 600; +} diff --git a/src/includes/addons/LSaddons.accesslog.php b/src/includes/addons/LSaddons.accesslog.php index 19572dd4..6683b6f3 100644 --- a/src/includes/addons/LSaddons.accesslog.php +++ b/src/includes/addons/LSaddons.accesslog.php @@ -92,7 +92,6 @@ function mapAccessLogEntry(&$entry) { foreach(LSldap::getAttr($attrs, 'reqMod', true) as $mod) { if (preg_match('/^(?P[^\:]+)\:(?P[^ ]?)( (?P.*))?$/', $mod, $m)) { $attr = $m['attr']; - $op = $m['op']; $value = isset($m['value'])?$m['value']:null; if (!array_key_exists($attr, $mods)) { $mods[$attr] = array( @@ -100,13 +99,13 @@ function mapAccessLogEntry(&$entry) { 'old_values' => array(), ); } - $mods[$attr]['changes'][] = array( - 'op' => ( - array_key_exists($op, $GLOBALS['accesslog_modOps'])? - _($GLOBALS['accesslog_modOps'][$op]): $op - ), - 'value' => $value, + $op = ( + array_key_exists($m['op'], $GLOBALS['accesslog_modOps'])? + _($GLOBALS['accesslog_modOps'][$m['op']]): $m['op'] ); + if (!array_key_exists($op, $mods[$attr]['changes'])) + $mods[$attr]['changes'][$op] = array(); + $mods[$attr]['changes'][$op][] = $value; } } if (LSldap::getAttr($attrs, 'reqOld', true)) { diff --git a/src/templates/default/showObjectAccessLogs.tpl b/src/templates/default/showObjectAccessLogs.tpl index 02883014..dfebe42b 100644 --- a/src/templates/default/showObjectAccessLogs.tpl +++ b/src/templates/default/showObjectAccessLogs.tpl @@ -33,13 +33,14 @@ {foreach $log.mods as $attr => $info} - - 1}rowspan={$info.changes|count}{/if}>{$info.changes.0.op|escape:htmlall} - 1}rowspan={$info.changes|count}{/if}>{$attr} - 1}rowspan={$info.changes|count}{/if}> + {foreach $info.changes as $op => $new_values} + + {$op|escape:htmlall} + {$attr} + {if $info.old_values}
- {if count($info.old_values) == 1} + {if count($info.old_values) == 1 && count($new_values) <= 1} {$info.old_values[0]|escape:'htmlall'} {else}
    @@ -51,15 +52,23 @@
{/if} -
{$info.changes.0.value|escape:htmlall}
+ + {if $new_values} +
+ {if count($new_values) == 1 && count($info.old_values) <= 1} + {$new_values[0]|escape:'htmlall'} + {else} +
    + {foreach $new_values as $new_value} +
  • {$new_value|escape:'htmlall'}
  • + {/foreach} +
+ {/if} +
+ {/if} + - {if count($info.changes) > 1} - {section name=change loop=$info.changes step=1 start=1} - -
{$info.changes[change].value|escape:htmlall}
- - {/section} - {/if} + {/foreach} {/foreach}