Completed functionality for user to Create products on the site

This commit is contained in:
2024-01-21 21:33:55 +00:00
parent 3ce5d16651
commit cd88926475
4 changed files with 46 additions and 37 deletions

View File

@ -11,15 +11,24 @@
<a href="/login">Login/Signup</a>
{% endif %}
</nav>
<centre>
{% if user != None and user.role == "Seller" %}
<div class="categories">
{# List all available seller tools #}
<a href="/products/add" class="category">Create Products</a>
<a href="/products/ownproducts" class="category">View My Products</a>
<a href="/products/stats" class="category">View Seller Stats</a>
</div>
{% endif %}
<div class="categories">
{# List all categories and ensure the selected one is highlighted #}
{% for c in categories %}
{% if category == c.name %}
<a style="color: cyan" href="/products/{{c.name}}" class="category">{{c.name}}</a>
{% else %}
<a href="/products/{{c.name}}" class="category">{{c.name}}</a>
<a href="/products/{{c.name}}" class="category">{{c.name}}</a>
{% endif %}
{% endfor %}
</div>