Skip to content

Commit

Permalink
expose the apFetchedAt field of users and magazines for admins (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
BentiGorlich authored Jun 14, 2024
1 parent 8afe388 commit 8c30a43
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/components/magazine_box.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
<li>{{ 'created_at'|trans }}:
{{ component('date', {date: computed.magazine.createdAt}) }}
</li>
{% if app.user is defined and app.user is not null and app.user.admin() and computed.magazine.apId is not null %}
<li>
{{ 'last_updated'|trans }}: {{ component('date', {date: computed.magazine.apFetchedAt}) }}
</li>
{% endif %}
<li>{{ 'subscribers'|trans }}: <span>{{ computed.magazine.subscriptionsCount }}</span></li>
</ul>
{% endif %}
Expand Down
5 changes: 5 additions & 0 deletions templates/user/_info.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
{% endif %}
<ul class="info">
<li>{{ 'joined'|trans }}: {{ component('date', {date: user.createdAt}) }}</li>
{% if app.user is defined and app.user is not null and app.user.admin() and user.apId is not null %}
<li>
{{ 'last_updated'|trans }}: {{ component('date', {date: user.apFetchedAt}) }}
</li>
{% endif %}
{%- set TYPE_ENTRY = constant('App\\Repository\\ReputationRepository::TYPE_ENTRY') -%}
<li><a href="{{ path('user_reputation', {username: user.username, reputationType: TYPE_ENTRY}) }}" class="stretched-link">{{ 'reputation_points'|trans }}:</a> {{ get_reputation_total(user) }}</li>
<li><a href="{{ path('user_moderated', {username: user.username}) }}"
Expand Down
1 change: 1 addition & 0 deletions translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -828,3 +828,4 @@ continue_with: Continue with
someone: Someone
magazine_log_mod_added: has added a moderator
magazine_log_mod_removed: has removed a moderator
last_updated: Last updated

0 comments on commit 8c30a43

Please sign in to comment.