88 lines
3.4 KiB
HTML
88 lines
3.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}
|
|
{{ game.display_name }}
|
|
{% endblock title %}
|
|
{% block content %}
|
|
<h1>{{ game.display_name }}</h1>
|
|
{% if owner %}
|
|
<small><a href="{% url 'twitch:organization_detail' owner.id %}">{{ owner.name }}</a></small>
|
|
{% endif %}
|
|
{% if user.is_authenticated %}
|
|
<form method="post"
|
|
action="{% url 'twitch:subscribe_notifications' game_id=game.id %}">
|
|
{% csrf_token %}
|
|
<div>
|
|
<input type="checkbox"
|
|
id="found"
|
|
name="notify_found"
|
|
{% if subscription and subscription.notify_found %}checked{% endif %} />
|
|
<label for="found">🔔 Get notified as soon as a drop for {{ game.display_name }} appears on Twitch.</label>
|
|
</div>
|
|
<div>
|
|
<input type="checkbox"
|
|
id="live"
|
|
name="notify_live"
|
|
{% if subscription and subscription.notify_live %}checked{% endif %} />
|
|
<label for="live">🎮 Get notified when the drop is live and ready to be farmed.</label>
|
|
</div>
|
|
<button type="submit">Save notification preferences</button>
|
|
</form>
|
|
{% else %}
|
|
Login to subscribe!
|
|
{% endif %}
|
|
{% if active_campaigns %}
|
|
<h5>Active Campaigns</h5>
|
|
<table>
|
|
<tbody>
|
|
{% for campaign in active_campaigns %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'twitch:campaign_detail' campaign.id %}">{{ campaign.clean_name }}</a>
|
|
</td>
|
|
<td>
|
|
<span title="{{ campaign.end_at|date:'M d, Y H:i' }}">Ends in {{ campaign.end_at|timeuntil }}</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% if upcoming_campaigns %}
|
|
<h5>Upcoming Campaigns</h5>
|
|
<table>
|
|
<tbody>
|
|
{% for campaign in upcoming_campaigns %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'twitch:campaign_detail' campaign.id %}">{{ campaign.clean_name }}</a>
|
|
</td>
|
|
<td>
|
|
<span title="Starts on {{ campaign.start_at|date:'M d, Y H:i' }}">Starts in {{ campaign.start_at|timeuntil }}</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% if expired_campaigns %}
|
|
<h5>Past Campaigns</h5>
|
|
<table>
|
|
<tbody>
|
|
{% for campaign in expired_campaigns %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'twitch:campaign_detail' campaign.id %}">{{ campaign.clean_name }}</a>
|
|
</td>
|
|
<td>
|
|
<span title="Ended on {{ campaign.end_at|date:'M d, Y H:i' }}">{{ campaign.end_at|timesince }} ago</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% if not active_campaigns and not upcoming_campaigns and not expired_campaigns %}
|
|
No campaigns found for this game.
|
|
{% endif %}
|
|
<pre><code>{{ game_data }}</code></pre>
|
|
{% endblock content %}
|