Fix #154 : short history of record are missing authors of actions

This commit is contained in:
Romain Neutron
2012-01-04 14:38:54 +01:00
parent 1f4562cb44
commit dd40dcdf97
2 changed files with 11 additions and 5 deletions

View File

@@ -375,8 +375,14 @@ class record_preview extends record_adapter
$tab[$hour][$site][$action] = array();
if (!isset($tab[$hour][$site][$action][$row['usr_id']]))
{
$tab[$hour][$site][$action][$row['usr_id']] =
array('final' => array(), 'comment' => array());
array(
'final' => array()
, 'comment' => array()
, 'user' => \User_Adapter::getInstance($row['usr_id'], $appbox)
);
}
if (!in_array($row['final'], $tab[$hour][$site][$action][$row['usr_id']]['final']))
$tab[$hour][$site][$action][$row['usr_id']]['final'][] =

View File

@@ -3,7 +3,7 @@
{% for hour, sites in record.get_short_history() %}
{% for site, actions in sites %}
{% for action, users in actions %}
{% for current_user, done in users %}
{% for done in users %}
<div style="margin:3px 0">
@@ -55,8 +55,8 @@
{% endif %}
<span class="actor">
{% if user.ACL().has_right_on_base(record.get_base_id(), 'canreport') %}
{% set user_infos = user.getInfos(current_user) %}
{% if current_user != session.get_usr_id() and user_infos %}
{% if done['user'].get_id() != session.get_usr_id() %}
{% set user_infos = done['user'].get_display_name() %}
{% trans %}report:: par {{ user_infos }}{% endtrans %}
{% endif %}
{% endif %}