lib.itmens/catalog/templates/catalog_edit.html
2025-02-07 15:14:36 +00:00

65 lines
1.9 KiB
HTML
Raw Permalink 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 %}
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}" 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.display_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>