lib.itmens/catalog/templates/catalog_edit.html

66 lines
1.9 KiB
HTML
Raw Normal View History

2023-01-05 03:06:13 -05:00
{% load static %}
{% load i18n %}
{% load mastodon %}
2025-02-06 19:17:53 +00:00
{% get_current_language as LANGUAGE_CODE %}
2023-01-05 03:06:13 -05:00
<!DOCTYPE html>
2025-02-06 19:17:53 +00:00
<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 %}
2024-07-13 01:36:18 -04:00
{% trans 'Edit' %} {{ form.instance.display_title }}
{% else %}
2024-05-20 23:17:47 -04:00
{% trans 'Create' %}
{% endif %}
</title>
2024-01-07 17:24:34 -05:00
{% 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">
2024-05-20 23:17:47 -04:00
{% 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 %}
2023-06-05 18:57:52 -04:00
<form method="post"
2023-06-05 17:55:39 -04:00
enctype="multipart/form-data"
_=" init set .rjf-add-button's innerHTML to '' end">
{% csrf_token %}
{{ form.media }}
{{ form }}
<div class="grid">
2023-05-28 12:35:20 -04:00
{% if not item or item.editable or request.user.is_staff %}
2024-05-20 23:17:47 -04:00
<input type="submit" value="{% trans 'Save' %}">
{% endif %}
2023-06-09 17:06:02 -04:00
<input type="reset"
2024-05-20 23:17:47 -04:00
value="{% trans 'Cancel' %}"
2023-06-09 17:06:02 -04:00
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>
2023-06-09 03:01:17 -04:00
{% include "_footer.html" %}
</body>
</html>