hide edit link from bots

This commit is contained in:
Your Name 2023-01-08 23:28:19 -05:00
parent 62ee15ec0b
commit 67e6ef7136
7 changed files with 25 additions and 5 deletions

View file

@ -102,7 +102,9 @@
{% endif %}
<div>
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑这张专辑' %}</a>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}

View file

@ -67,7 +67,9 @@
{% endif %}
<div>
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑这本书' %}</a>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}

View file

@ -96,7 +96,9 @@
{% endif %}
<div>
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑这个游戏' %}</a>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}

View file

@ -184,6 +184,7 @@
<div class="grid__aside" id="aside">
{% block sidebar_review %}
{% if user.is_authenticated %}
<div class="aside-section-wrapper">
{% if mark.shelf_type %}
<div class="mark-panel">
@ -261,6 +262,13 @@
{% endif %}
</div>
</div>
{% else %}
<div class="aside-section-wrapper">
<div class="mark-panel">
<span>{% trans '登录后可管理标记和评论' %}</span>
</div>
</div>
{% endif %}
{% endblock %}
{% block sidebar %}

View file

@ -160,7 +160,9 @@
{% endif %}
<div>
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑这部电影' %}</a>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}

View file

@ -174,7 +174,9 @@
{% endif %}
<div>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}

View file

@ -172,7 +172,9 @@
{% endif %}
<div>
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑这部剧集' %}</a>
{% if user.is_authenticated %}
<a href="{% url 'catalog:edit' item.url_path item.uuid %}">{% trans '编辑' %}{{ item.demonstrative }}</a>
{% endif %}
{% if user.is_staff %}
/<a href="{% url 'catalog:delete' item.url_path item.uuid %}"> {% trans '删除' %}</a>
{% endif %}