fix inbox duplicate
This commit is contained in:
parent
afced90f19
commit
8b644da29a
|
@ -35,10 +35,8 @@ class DashboardView(LoginRequiredMixin):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
lot_tags = LotTag.objects.filter(
|
lot_tags = LotTag.objects.filter(
|
||||||
owner=self.request.user.institution,
|
owner=self.request.user.institution,
|
||||||
inbox=False
|
|
||||||
)
|
)
|
||||||
context.update({
|
context.update({
|
||||||
"inbox": LotTag.objects.get(inbox=True).name,
|
|
||||||
"commit_id": settings.COMMIT,
|
"commit_id": settings.COMMIT,
|
||||||
'title': self.title,
|
'title': self.title,
|
||||||
'subtitle': self.subtitle,
|
'subtitle': self.subtitle,
|
||||||
|
|
|
@ -129,15 +129,14 @@
|
||||||
{% trans 'Lots' %}
|
{% trans 'Lots' %}
|
||||||
</a>
|
</a>
|
||||||
<ul class="flex-column mb-2 ul_sidebar accordion-collapse {% if path == 'tags' or path == 'lot' or path in 'unassigned dashboard' %}expanded{% else %}collapse{% endif %}" id="ul_lots" data-bs-parent="#sidebarMenu">
|
<ul class="flex-column mb-2 ul_sidebar accordion-collapse {% if path == 'tags' or path == 'lot' or path in 'unassigned dashboard' %}expanded{% else %}collapse{% endif %}" id="ul_lots" data-bs-parent="#sidebarMenu">
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link{% if path == 'unassigned' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}">
|
|
||||||
{{ inbox }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% for tag in lot_tags %}
|
{% for tag in lot_tags %}
|
||||||
<li class="nav-items">
|
<li class="nav-items">
|
||||||
|
{% if tag.inbox %}
|
||||||
|
<a class="nav-link{% if path == 'unassigned' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}">
|
||||||
|
{% else %}
|
||||||
<a class="nav-link{% if path == 'tags' %} active2{% endif %}" href="{% url 'lot:tags' tag.id %}">
|
<a class="nav-link{% if path == 'tags' %} active2{% endif %}" href="{% url 'lot:tags' tag.id %}">
|
||||||
|
{% endif %}
|
||||||
{{ tag.name }}
|
{{ tag.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue