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.
This commit is contained in:
Kumi 2024-03-16 10:39:22 +01:00
parent db79a2a39c
commit 957d99adcb
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 36 additions and 14 deletions

View file

@ -1,18 +1,30 @@
{% extends "users/base.html" %}
{% block content %}
{% extends "users/base.html" %} {% block content %}
<div class="row">
<p>This page lists your categories, and the categories you were invited to.</p>
<p>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.</p>
<p>
This page lists your categories, and the categories you were invited to.
</p>
<p>
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.
</p>
</div>
<div class="row">
<div class="col-md-6">
<h4>Available categories</h4>
<ul>
{% for category in categories %}
<li><a href="/users/category/{{ category.id }}/">{{ category.title }}</a>{% if category.owner != request.user %} (owner: {{ category.owner.email }}){% endif %}</li>
{% endfor %}
</ul>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center">
<h4>Available media</h4>
<button type="button" class="btn btn-primary">Create category</button>
</div>
<ul>
{% for category in categories %}
<li>
<a href="/users/category/{{ category.id }}/">{{ category.title }} </a>
{% if category.owner != request.user %}
(owner: {{ category.owner.email }})
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -43,4 +43,14 @@ class CategoryView(TitleMixin, DetailView):
assert category.user_has_permission(self.request.user)
return category
except (Category.DoesNotExist, AssertionError):
raise Http404()
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"