{% comment %} "Upcoming Renewals" home dashboard panel — renders the same data the RenewalCheckJob produces, but at-a-glance with click-through links. Context variables (from homepage.py): - upcoming_renewals: queryset of Contract objects, end_date within the configured window, soonest first, capped at 10. {% endcomment %} {% load helpers %} {% if upcoming_renewals and perms.nautobot_contract_models.view_contract %} {% for contract in upcoming_renewals %}
{{ contract.name }} {{ contract.end_date|date:"SHORT_DATE_FORMAT" }}
{{ contract.provider.name }} {% if contract.recurring_cost %} · {{ contract.recurring_cost }} {{ contract.currency }} {% endif %}
{% if forloop.last %}
View all contracts
{% endif %} {% endfor %} {% elif perms.nautobot_contract_models.view_contract %}
No contracts expiring soon.
{% else %}
No permission
{% endif %}