Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "recent changes" box show changes from all users #745

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/meshdb/templates/admin/index.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this will be in addition to the personal recent edits sidebar?

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends "admin/index.html" %}
{% load i18n static %}

{% block sidebar %}
<div id="content-related">
<div class="module" id="recent-actions-module">
<h2>Recent Admin Edits</h2>
{% load log %}
{% get_admin_log 15 as admin_log %}
{% if not admin_log %}
<p>{% translate 'None available' %}</p>
{% else %}
<ul class="actionlist">
{% for entry in admin_log %}
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
{% if entry.is_deletion or not entry.get_admin_url %}
{% if entry.content_type %}
{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Permission issues with tokens, possibly others.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the implication of this?

{% else %}
{% translate 'Unknown content' %}:
{% endif %} {{ entry.object_repr }}
{% else %}
<a href="{{ entry.get_admin_url }}">{% if entry.content_type %}
{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}:
{% else %}
{% translate 'Unknown content' %}:
{% endif %} {{ entry.object_repr }}</a>
{% endif %}
<br>
{% if entry.user %}
<span class="mini quiet">{% filter capfirst %}{{ entry.user.username }}{% endfilter %}</span>
{% else %}
<span class="mini quiet">{% translate 'Unknown user' %}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endblock %}
Loading