lib.itmens/catalog/templates/catalog_edit.html
Your Name 463601660f i18n
2024-05-22 19:44:59 -04:00

64 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load static %}
{% load i18n %}
{% load mastodon %}
<!DOCTYPE html>
<html lang="zh" class="content-page">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site_name }} -
{% if form.instance.id %}
{% trans 'Edit' %} {{ form.instance.title }}
{% else %}
{% trans 'Create' %}
{% endif %}
</title>
{% include "common_libs.html" %}
<style>
aside details {
margin-bottom: 1rem;
padding: 1rem;
border: var(--pico-muted-color) solid 1px;
}
aside summary {
cursor: pointer;
font-weight: bold;
}
main>div {
margin-bottom: 4rem;
}
</style>
</head>
<body>
{% include "_header.html" %}
<main>
<div class="grid__main">
{% if item.is_deleted %}
<i>{% trans "Item has been deleted." %}</i>
{% endif %}
{% if item.merged_to_item %}
<i>{% trans "Item contains sub-items." %}</i>
{% endif %}
<form method="post"
enctype="multipart/form-data"
_=" init set .rjf-add-button's innerHTML to '' end">
{% csrf_token %}
{{ form.media }}
{{ form }}
<div class="grid">
{% if not item or item.editable or request.user.is_staff %}
<input type="submit" value="{% trans 'Save' %}">
{% endif %}
<input type="reset"
value="{% trans 'Cancel' %}"
onclick="{% if item %}window.location='{{ item.url }}'{% else %}history.go(-1){% endif %}">
</div>
</form>
</div>
<aside class="grid__aside">
{% include "_sidebar_edit.html" %}
</aside>
</main>
{% include "_footer.html" %}
</body>
</html>