Allow viewing profit
This commit is contained in:
@@ -219,7 +219,7 @@
|
||||
Home
|
||||
</a>
|
||||
{% if user.is_authenticated %}
|
||||
<a class="navbar-item" href="#">
|
||||
<a class="navbar-item" href="{% url 'profit' type='page' %}">
|
||||
Profit
|
||||
</a>
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
|
||||
27
core/templates/partials/profit-info.html
Normal file
27
core/templates/partials/profit-info.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% load cache %}
|
||||
{% load cachalot cache %}
|
||||
{% get_last_invalidation 'core.Platform' as last %}
|
||||
{% include 'mixins/partials/notify.html' %}
|
||||
{# cache 600 objects_platform_profit request.user.id object_list type last #}
|
||||
{% for platform_name, profit_map in object_list.items %}
|
||||
<h2 class="title is-4">{{ platform_name }}</h2>
|
||||
<table
|
||||
class="table is-fullwidth is-hoverable"
|
||||
hx-target="#{{ context_object_name }}-table"
|
||||
id="{{ context_object_name }}-table"
|
||||
hx-swap="outerHTML"
|
||||
hx-trigger="{{ context_object_name_singular }}Event from:body"
|
||||
hx-get="{{ list_url }}">
|
||||
<thead>
|
||||
<th>id</th>
|
||||
</thead>
|
||||
{% for item in profit_map.values %}
|
||||
<tr>
|
||||
<td> {{ item }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
{% endfor %}
|
||||
{# endcache #}
|
||||
Reference in New Issue
Block a user