Add Reward Campaigns

This commit is contained in:
Joakim Hellsén 2026-01-14 22:29:15 +01:00
commit 1a71809460
No known key found for this signature in database
14 changed files with 1188 additions and 20 deletions

View file

@ -5,7 +5,7 @@
{% block content %}
<div class="container" id="search-results-container">
<h1 id="page-title">Search Results for "{{ query }}"</h1>
{% if not results.organizations and not results.games and not results.campaigns and not results.drops and not results.benefits %}
{% if not results.organizations and not results.games and not results.campaigns and not results.drops and not results.benefits and not results.reward_campaigns %}
<p id="no-results">No results found.</p>
{% else %}
{% if results.organizations %}
@ -68,6 +68,20 @@
{% endfor %}
</ul>
{% endif %}
{% if results.reward_campaigns %}
<h2 id="reward-campaigns-header">Reward Campaigns</h2>
<ul id="reward-campaigns-list">
{% for campaign in results.reward_campaigns %}
<li id="reward-campaign-{{ campaign.twitch_id }}">
{% if campaign.brand %}
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">{{ campaign.brand }}: {{ campaign.name }}</a>
{% else %}
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">{{ campaign.name }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
{% endblock content %}