Add user IP and token to posts in-line for staff

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-07-17 17:48:12 -07:00
parent 0b0c0fe603
commit bd970943de
2 changed files with 15 additions and 4 deletions

View File

@@ -9,10 +9,11 @@
<link rel="stylesheet" href="{% static 'board/style.css' %}"> <link rel="stylesheet" href="{% static 'board/style.css' %}">
<link rel="stylesheet" href="{% static 'board/font-awesome/css/font-awesome.min.css' %}"> <link rel="stylesheet" href="{% static 'board/font-awesome/css/font-awesome.min.css' %}">
{% block extrastyle %}{% endblock %} {% block extrastyle %}{% endblock %}
<script src="{% static 'board/jquery.js' %}"></script> <script src="{% static 'board/jquery.js' %}"></script>
<script src="{% static 'board/jsframe.min.js' %}"></script> <script src="{% static 'board/jsframe.min.js' %}"></script>
<script src="{% static 'board/post.js' %}"></script> <script src="{% static 'board/post.js' %}"></script>
{% if user.is_staff %} {% if user.is_staff %}
<link rel="stylesheet" href="{% static 'board/restricted.css' %}">
<script src="{% static 'board/restricted.js' %}"></script> <script src="{% static 'board/restricted.js' %}"></script>
{% endif %} {% endif %}
{% block extrajs %}{% endblock %} {% block extrajs %}{% endblock %}

View File

@@ -18,7 +18,7 @@
<span class="fa fa-minus-square thread_hide_button"></span> <span class="fa fa-minus-square thread_hide_button"></span>
{% endif %} {% endif %}
{# Post ID, status icons, username, time #} {# Post ID, status icons, username, time, admin info #}
<a href="#p{{post.id}}">#.</a> <a href="#p{{post.id}}">#.</a>
<span class="post_id">{{post.id}}</span> <span class="post_id">{{post.id}}</span>
{% if post.subject %} {% if post.subject %}
@@ -35,6 +35,15 @@
at {{post_created}} at {{post_created}}
{% endblocktranslate %} {% endblocktranslate %}
{# staff inline items #}
{% if user.is_staff %}
<span title="{% translate 'User info' %}" class="user_info_section">
<span class="user_info">
[ {{post.ip}} | {{post.user_token|slice:"0:6"}} ]
</span>
</span>
{% endif %}
{% if post.sticky and not post.op %} {% if post.sticky and not post.op %}
<span title="Stickied" class="fa fa-thumb-tack"></span> <span title="Stickied" class="fa fa-thumb-tack"></span>
{% endif %} {% endif %}
@@ -45,6 +54,7 @@
{% if reply_link %} {% if reply_link %}
[<a href="{{post.get_absolute_url}}">{% translate "Reply" %}</a>] [<a href="{{post.get_absolute_url}}">{% translate "Reply" %}</a>]
{% endif %} {% endif %}
<a href="#" class="post_menu_button" data-id="post_menu_button"></a> <a href="#" class="post_menu_button" data-id="post_menu_button"></a>
</div> </div>