diff --git a/bricktracker/views/admin/admin.py b/bricktracker/views/admin/admin.py
index bb6a5e60..08cdafcb 100644
--- a/bricktracker/views/admin/admin.py
+++ b/bricktracker/views/admin/admin.py
@@ -87,15 +87,19 @@ def admin() -> str:
open_tag = request.args.get('open_tag', None)
open_theme = request.args.get('open_theme', None)
+ open_metadata = (
+ open_owner or
+ open_status or
+ open_storage or
+ open_tag
+ )
+
open_database = (
open_image is None and
open_instructions is None and
open_logout is None and
- open_owner is None and
+ not open_metadata and
open_retired is None and
- open_status is None and
- open_storage is None and
- open_tag is None and
open_theme is None
)
@@ -120,6 +124,7 @@ def admin() -> str:
open_image=open_image,
open_instructions=open_instructions,
open_logout=open_logout,
+ open_metadata=open_metadata,
open_owner=open_owner,
open_retired=open_retired,
open_status=open_status,
diff --git a/templates/admin.html b/templates/admin.html
index 3582c7b6..22a7e1a7 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -1,3 +1,5 @@
+{% import 'macro/accordion.html' as accordion %}
+
{% extends 'base.html' %}
{% block title %} - Administration{% endblock %}
@@ -36,10 +38,12 @@
{% endif %}
{% include 'admin/theme.html' %}
{% include 'admin/retired.html' %}
+ {{ accordion.header('Set metadata', 'metadata', 'admin', expanded=open_metadata, icon='profile-line', class='p-0') }}
{% include 'admin/owner.html' %}
{% include 'admin/status.html' %}
{% include 'admin/storage.html' %}
{% include 'admin/tag.html' %}
+ {{ accordion.footer() }}
{% include 'admin/database.html' %}
{% include 'admin/configuration.html' %}
{% endif %}
diff --git a/templates/admin/owner.html b/templates/admin/owner.html
index 8c7c2619..351eaa51 100644
--- a/templates/admin/owner.html
+++ b/templates/admin/owner.html
@@ -1,6 +1,6 @@
{% import 'macro/accordion.html' as accordion %}
-{{ accordion.header('Set owners', 'owner', 'admin', expanded=open_owner, icon='user-line', class='p-0') }}
+{{ accordion.header('Set owners', 'owner', 'metadata', expanded=open_owner, icon='user-line', class='p-0') }}
{% if owner_error %}<div class="alert alert-danger m-2" role="alert"><strong>Error:</strong> {{ owner_error }}.</div>{% endif %}
<ul class="list-group list-group-flush">
{% if metadata_owners | length %}
diff --git a/templates/admin/status.html b/templates/admin/status.html
index 609bc68d..0377a4c3 100644
--- a/templates/admin/status.html
+++ b/templates/admin/status.html
@@ -1,6 +1,6 @@
{% import 'macro/accordion.html' as accordion %}
-{{ accordion.header('Set statuses', 'status', 'admin', expanded=open_status, icon='checkbox-line', class='p-0') }}
+{{ accordion.header('Set statuses', 'status', 'metadata', expanded=open_status, icon='checkbox-line', class='p-0') }}
{% if status_error %}<div class="alert alert-danger m-2" role="alert"><strong>Error:</strong> {{ status_error }}.</div>{% endif %}
<ul class="list-group list-group-flush">
{% if metadata_statuses | length %}
diff --git a/templates/admin/storage.html b/templates/admin/storage.html
index 1f317e6c..ddd3e4b4 100644
--- a/templates/admin/storage.html
+++ b/templates/admin/storage.html
@@ -1,6 +1,6 @@
{% import 'macro/accordion.html' as accordion %}
-{{ accordion.header('Set storages', 'storage', 'admin', expanded=open_storage, icon='archive-2-line', class='p-0') }}
+{{ accordion.header('Set storages', 'storage', 'metadata', expanded=open_storage, icon='archive-2-line', class='p-0') }}
{% if storage_error %}<div class="alert alert-danger m-2" role="alert"><strong>Error:</strong> {{ storage_error }}.</div>{% endif %}
<ul class="list-group list-group-flush">
{% if metadata_storages | length %}
diff --git a/templates/admin/tag.html b/templates/admin/tag.html
index c3ca1f61..30bfa711 100644
--- a/templates/admin/tag.html
+++ b/templates/admin/tag.html
@@ -1,6 +1,6 @@
{% import 'macro/accordion.html' as accordion %}
-{{ accordion.header('Set tags', 'tag', 'admin', expanded=open_tag, icon='price-tag-2-line', class='p-0') }}
+{{ accordion.header('Set tags', 'tag', 'metadata', expanded=open_tag, icon='price-tag-2-line', class='p-0') }}
{% if tag_error %}<div class="alert alert-danger m-2" role="alert"><strong>Error:</strong> {{ tag_error }}.</div>{% endif %}
<ul class="list-group list-group-flush">
{% if metadata_tags | length %}
diff --git a/templates/set/management.html b/templates/set/management.html
index 26959d3a..1a8c2b7b 100644
--- a/templates/set/management.html
+++ b/templates/set/management.html
@@ -1,5 +1,6 @@
{% if g.login.is_authenticated() %}
- {{ accordion.header('Owners', 'owner', 'set-details', icon='group-line', class='p-0') }}
+ {{ accordion.header('Management', 'set-management', 'set-details', icon='settings-4-line', class='p-0') }}
+ {{ accordion.header('Owners', 'owner', 'set-management', icon='group-line', class='p-0') }}
<ul class="list-group list-group-flush">
{% if brickset_owners | length %}
{% for owner in brickset_owners %}
@@ -13,7 +14,7 @@
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.admin', open_owner=true) }}"><i class="ri-settings-4-line"></i> Manage the set owners</a>
</div>
{{ accordion.footer() }}
- {{ accordion.header('Storage', 'storage', 'set-details', icon='archive-2-line') }}
+ {{ accordion.header('Storage', 'storage', 'set-management', icon='archive-2-line') }}
{% if brickset_storages | length %}
{{ form.select('Storage', item, 'storage', brickset_storages, delete=delete) }}
{% else %}
@@ -22,7 +23,7 @@
<hr>
<a href="{{ url_for('admin.admin', open_storage=true) }}" class="btn btn-primary" role="button"><i class="ri-settings-4-line"></i> Manage the set storages</a>
{{ accordion.footer() }}
- {{ accordion.header('Tags', 'tag', 'set-details', icon='price-tag-2-line', class='p-0') }}
+ {{ accordion.header('Tags', 'tag', 'set-management', icon='price-tag-2-line', class='p-0') }}
<ul class="list-group list-group-flush">
{% if brickset_tags | length %}
{% for tag in brickset_tags %}
@@ -36,8 +37,8 @@
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.admin', open_tag=true) }}"><i class="ri-settings-4-line"></i> Manage the set tags</a>
</div>
{{ accordion.footer() }}
- {{ accordion.header('Management', 'management', 'set-details', icon='settings-4-line') }}
- <h5 class="border-bottom">Data</h5>
+ {{ accordion.header('Data', 'data', 'set-management', icon='database-2-line') }}
<a href="{{ item.url_for_refresh() }}" class="btn btn-primary" role="button"><i class="ri-refresh-line"></i> Refresh the set data</a>
+ {{ accordion.footer() }}
{{ accordion.footer() }}
{% endif %}