Allow subscribe to orgs
This commit is contained in:
parent
fabc9d23f6
commit
4af2b02a01
10 changed files with 190 additions and 14 deletions
37
templates/twitch/organization_detail.html
Normal file
37
templates/twitch/organization_detail.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
{{ organization.name }}
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h1>{{ organization.name }}</h1>
|
||||
{% if user.is_authenticated %}
|
||||
<form method="post"
|
||||
action="{% url 'twitch:subscribe_org_notifications' org_id=organization.id %}">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<input type="checkbox"
|
||||
id="found"
|
||||
name="notify_found"
|
||||
{% if subscription and subscription.notify_found %}checked{% endif %} />
|
||||
<label for="found">🔔 Notify me when a drop for {{ organization.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">🎮 Notify me when the drop is live and ready to be farmed.</label>
|
||||
</div>
|
||||
<button type="submit">Save preferences</button>
|
||||
</form>
|
||||
{% else %}
|
||||
Login to subscribe!
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for game in games %}
|
||||
<li>
|
||||
<a href="{% url 'twitch:game_detail' pk=game.id %}">{{ game }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue