diff --git a/bricktracker/views/admin/admin.py b/bricktracker/views/admin/admin.py index bb6a5e6..08cdafc 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 3582c7b..22a7e1a 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 8c7c261..351eaa5 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 %}{% endif %}