<%namespace name="base" file="/base/base.mako"/>

%if c.audit_logs:

${_('Uid')} | ${_('Username')} | ${_('Action')} | ${_('Action Data')} | ${_('Repository')} | ${_('Date')} | ${_('IP')}
--- | --- | --- | --- | --- | --- | ---

%for cnt,l in enumerate(c.audit_logs):

${l.entry_id}

%if l.user is not None: ${base.gravatar_with_user(l.user.email)} %else: ${l.username} %endif

% if l.version == l.VERSION_1: ${h.action_parser(request, l)[0]()} % else: ${h.literal(l.action)} % endif
% if l.version == l.VERSION_1: ${h.literal(h.action_parser(request, l)[1]())} % endif

% if l.version == l.VERSION_2: ${_('toggle')}

    ${h.formatted_str_json(l.action_data)}

% else:

    -

% endif

%if l.repository is not None: ${h.link_to(l.repository.repo_name, h.route_path('repo_summary',repo_name=l.repository.repo_name))} %else: ${l.repository_name} %endif

${h.format_date(l.action_date)}

${l.user_ip}

%endfor

${c.audit_logs.render()}
%else: ${_('No actions yet')} %endif