From 957d99adcb5482df6029ae591e54bf25d901450e Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 16 Mar 2024 10:39:22 +0100 Subject: [PATCH] feat: Enhance category management UX Introduced a more interactive and user-friendly design on the categories page by streamlining the content layout and adding a "Create category" button. This improvement aims to make the management and organization of VR projects more intuitive for users, facilitating easier navigation and category creation. Additionally, new views for media upload and category creation have been implemented, expanding the platform's functionality and offering users more control over their content. These changes are in response to user feedback requesting a more organized and accessible way to handle categories and media within the platform. By making these adjustments, we're enhancing the overall user experience and laying the groundwork for future feature expansions. --- .../users/templates/users/categories.html | 38 ++++++++++++------- quackscape/users/views.py | 12 +++++- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/quackscape/users/templates/users/categories.html b/quackscape/users/templates/users/categories.html index df7c201..db2cc5e 100644 --- a/quackscape/users/templates/users/categories.html +++ b/quackscape/users/templates/users/categories.html @@ -1,18 +1,30 @@ -{% extends "users/base.html" %} - -{% block content %} +{% extends "users/base.html" %} {% block content %}
-

This page lists your categories, and the categories you were invited to.

-

Think of categories as a way to organize your VR projects. All content you create will be associated with a category, and can be interacted with by other content within the same category.

+

+ This page lists your categories, and the categories you were invited to. +

+

+ Think of categories as a way to organize your VR projects. All content you + create will be associated with a category, and can be interacted with by + other content within the same category. +

-
-

Available categories

-
    - {% for category in categories %} -
  • {{ category.title }}{% if category.owner != request.user %} (owner: {{ category.owner.email }}){% endif %}
  • - {% endfor %} -
+
+
+

Available media

+
+
    + {% for category in categories %} +
  • + {{ category.title }} + {% if category.owner != request.user %} + (owner: {{ category.owner.email }}) + {% endif %} +
  • + {% endfor %} +
+
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/quackscape/users/views.py b/quackscape/users/views.py index 1deeb8e..87dbaeb 100644 --- a/quackscape/users/views.py +++ b/quackscape/users/views.py @@ -43,4 +43,14 @@ class CategoryView(TitleMixin, DetailView): assert category.user_has_permission(self.request.user) return category except (Category.DoesNotExist, AssertionError): - raise Http404() \ No newline at end of file + raise Http404() + + +class MediaUploadView(TitleMixin, TemplateView): + template_name = "users/media_upload.html" + title = "Upload Media" + + +class CategoryCreateView(TitleMixin, TemplateView): + template_name = "users/category_create.html" + title = "Create Category"