Skip to content

Commit

Permalink
#130 - Add category list in provider detail
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoseba committed May 22, 2024
1 parent 18b2317 commit 3dd055e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions market/management/commands/delete_all_node_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def handle(self, *args, **options):
print(f'Current: {current}', end='\r')
if provider.owner:
provider.owner.delete()
if provider.gallery:
provider.gallery.delete()
provider.delete()

Expand Down
5 changes: 5 additions & 0 deletions templates/category/tag_list_detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="tags">
{% for tag in tags %}
<span class="badge" style="background-color:{{tag.color}}"> {{tag.name}} </span>
{% endfor %}
</div>
5 changes: 3 additions & 2 deletions templates/provider/header_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
<div class="jumbotron bg-secondary pb-4" >
<div class="container pb-4">
<div class="row">
<div class="mb-3 text-light {% if edit_url %}col-md-7{% else %}col-md-12{% endif %}">
<div class="mb-3 text-light {% if edit_url %}col-md-8{% else %}col-md-12{% endif %}">
<div class="profile pt-0">
{% include 'account/profile_circle.html' with addclass='float-left' %}
<h3 class="mb-0">{{account.name}}</h3>
{{account.address }}
{% include 'category/tag_list_detail.html' with tags=account.categories.all %}
</div>

</div>

{% if edit_url %}
<div class="col-md-5 text-right">
<div class="col-md-4 text-right">
<a href="{{edit_url}}" class="btn btn-primary btn-action"><i class="material-icons mr-2">edit</i>
{% if edit_label %} {% translate edit_label %} {% else %} {% translate "Editar" %} {% endif %}</a>
</div>
Expand Down

0 comments on commit 3dd055e

Please sign in to comment.