lib.itmens/catalog/templates/catalog_merge.html

99 lines
3.5 KiB
HTML
Raw Normal View History

2024-04-07 19:44:37 -04:00
{% load static %}
{% load i18n %}
{% load l10n %}
{% load mastodon %}
{% load thumb %}
2025-02-06 19:17:53 +00:00
{% get_current_language as LANGUAGE_CODE %}
2024-04-07 19:44:37 -04:00
<!DOCTYPE html>
2025-02-06 19:17:53 +00:00
<html lang="{{ LANGUAGE_CODE }}">
2024-04-07 19:44:37 -04:00
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-05-20 23:17:47 -04:00
<title>{{ site_name }} - {% trans 'Merge' %}</title>
2024-04-07 19:44:37 -04:00
{% include "common_libs.html" %}
{% if url %}<meta http-equiv="refresh" content="3;url={{ url }}">{% endif %}
</head>
<body>
{% include "_header.html" %}
<main class="container">
<h2>
2024-04-09 00:45:40 -04:00
{% if mode == "merge" %}
{% if new_item %}
{% trans 'Are you sure to merge?' %}
{% else %}
{% trans 'Are you sure to cancel merge?' %}
{% endif %}
{% elif mode == "link" %}
{% trans 'Are you sure to link?' %}
2024-04-07 19:44:37 -04:00
{% endif %}
</h2>
<div>
2024-04-09 00:45:40 -04:00
<article class="item-card {% if mode == 'merge' %}deleting{% endif %}">
{% include "_item_card.html" with item=item %}
</article>
2024-04-07 19:44:37 -04:00
{% if item.is_deleted %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-xmark"></i> {% trans "Item has been deleted." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if item.child_items %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-exclamation"></i> {% trans "Item contains sub-items." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if item.merged_to_item %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-xmark"></i> {% trans "Item has been merged to another item." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if item.journal_exists %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-exclamation"></i> {% trans "Item has been marked by users." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if new_item %}
<div>
<center><i class="fa-solid fa-angles-down"></i>
<i class="fa-solid fa-angles-down"></i>
<i class="fa-solid fa-angles-down"></i>
</center>
</div>
<article class="item-card">{% include "_item_card.html" with item=new_item %}</article>
{% if new_item.is_deleted %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-xmark"></i> {% trans "Item has been deleted." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if new_item.child_items %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-exclamation"></i> {% trans "Item contains sub-items." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if new_item.merged_to_item %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-xmark"></i> {% trans "Item has been merged to another item." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% if new_item.journal_exists %}
<p>
2024-05-20 23:17:47 -04:00
<i class="fa-solid fa-circle-exclamation"></i> {% trans "Item has been marked by users." %}
2024-04-07 19:44:37 -04:00
</p>
{% endif %}
{% endif %}
</div>
<form method="post"
2024-04-09 00:45:40 -04:00
{% if mode == "merge" %} action="{% url 'catalog:merge' item.url_path item.uuid %}" {% elif mode == "link" %} action="{% url 'catalog:link_edition' item.url_path item.uuid %}" {% endif %}
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "This operation cannot be undone. Sure to merge?" %}');">
2024-04-07 19:44:37 -04:00
{% csrf_token %}
<input type="hidden"
name="target_item_url"
value="{{ request.POST.target_item_url }}">
<input type="hidden" name="sure" value="1">
<input type="submit" value="{% trans 'Yes' %}">
<input type="reset" value="{% trans 'No' %}" onclick="history.go(-1)">
</form>
</main>
{% include "_footer.html" %}
</body>
</html>