You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
{% load static %}
|
|
{% load cache %}
|
|
{% load cachalot cache %}
|
|
{% get_last_invalidation 'core.Plan' as last %}
|
|
{% cache 600 objects_plans request.user.id plans last %}
|
|
|
|
{% for plan in plans %}
|
|
<div class="box">
|
|
<article class="media">
|
|
<div class="media-left">
|
|
<figure class="image is-64x64">
|
|
<img src="{% static plan.image %}" alt="Image">
|
|
</figure>
|
|
</div>
|
|
<div class="media-content">
|
|
<div class="content">
|
|
<p class="subtitle">
|
|
<strong>{{ plan.name }}</strong> <small>£{{ plan.cost }}</small>
|
|
{% if plan in user_plans %}
|
|
<i class="fas fa-check" aria-hidden="true"></i>
|
|
{% endif %}
|
|
<br>
|
|
{{ plan.description }}
|
|
</p>
|
|
</div>
|
|
<nav class="level is-mobile">
|
|
<div class="level-left">
|
|
{% if plan not in user_plans %}
|
|
<a class="level-item" href="/order/{{ plan.name }}">
|
|
<span class="icon is-small has-text-success">
|
|
<i class="fas fa-plus" aria-hidden="true"></i>
|
|
</span>
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if plan in user_plans %}
|
|
<a class="level-item" href="/cancel_subscription/{{ plan.name }}">
|
|
<span class="icon is-small has-text-info">
|
|
<i class="fas fa-cancel" aria-hidden="true"></i>
|
|
</span>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</article>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endcache %} |