setting up subscrption management for creators
parent
856490cf50
commit
3da8c9951d
@ -0,0 +1,49 @@
|
||||
{% extends 'includes/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Platform Subscriptions</h2>
|
||||
<ul>
|
||||
{% for s in platform_subs %}
|
||||
<li>
|
||||
Platform Subscription ID: {{ s.id }} <br>
|
||||
Created: {{ s.create_date }} <br>
|
||||
TX ID: {{ s.tx.tx_id }} <br>
|
||||
Paid: {{ s.tx.atomic_xmr | from_atomic }} XMR <br>
|
||||
Term Length: {{ s.term_hours }} hours ({{ s.hours_until_content_hidden }} hours) <br>
|
||||
Hide Content: {{ s.hours_until_content_hidden }} hours <br>
|
||||
Archive Content: {{ s.hours_until_content_archived }} hours <br>
|
||||
Active Subscription: <strong>{{ s.is_active }}</strong> <br>
|
||||
<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2>Content Subscriptions</h2>
|
||||
{% if not content_subs %}
|
||||
<p>No subscriptions to your content yet.</p>
|
||||
{% include 'includes/form.html' %}
|
||||
{% else %}
|
||||
<ul>
|
||||
{% for s in content_subs %}
|
||||
<li>
|
||||
Content Subscription ID: {{ s.id }} <br>
|
||||
Created: {{ s.create_date }} <br>
|
||||
Price: {{ s.atomic_xmr | from_atomic }} XMR <br>
|
||||
Term Length: {{ s.number_hours }} hours <br>
|
||||
Active Subscriptions: {{ s.get_active_subscriptions().count() }} <br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h2>Subscribers</h2>
|
||||
{% if not subscribers %}
|
||||
<p>No subscribers yet.</p>
|
||||
{% else %}
|
||||
{% for subscriber in subscribers %}
|
||||
{{ subscriber }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
@ -0,0 +1,11 @@
|
||||
<hr>
|
||||
|
||||
{% if config.DEBUG and current_user.is_authenticated %}
|
||||
<h2>Debug</h2>
|
||||
<p>
|
||||
Authenticated: {{ current_user.is_authenticated }} <br>
|
||||
Username: {{ current_user.handle }} <br>
|
||||
Email: {{ current_user.email }} <br>
|
||||
Wallet Address: {{ current_user.wallet_address }} <br>
|
||||
</p>
|
||||
{% endif %}
|
@ -0,0 +1,18 @@
|
||||
<form method="POST" action="">
|
||||
{% for f in form %}
|
||||
{% if f.name == 'csrf_token' %}
|
||||
{{ f }}
|
||||
{% else %}
|
||||
<div class="form-group">
|
||||
{{ f.label }}
|
||||
{{ f }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<ul>
|
||||
{% for field, errors in form.errors.items() %}
|
||||
<li>{{ form[field].label }}: {{ ', '.join(errors) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="submit" value="Confirm" class="btn btn-link btn-outline btn-xl">
|
||||
</form>
|
@ -1,45 +1,35 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
{% include 'includes/head.html' %}
|
||||
|
||||
<body class="is-preload landing">
|
||||
<div id="page-wrapper">
|
||||
|
||||
{% include 'includes/header.html' %}
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{% if 2 not in current_user.roles %}
|
||||
<a href="{{ url_for('creator.join') }}">Become a Creator</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if feed %}
|
||||
{% if feed['new_creators'] %}
|
||||
<h2>New Creators</h2>
|
||||
{% for c in feed['new_creators'] %}
|
||||
<p><a href="{{ url_for('creator.show', handle=c.handle) }}">{{ c.handle }}</a></p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if feed['new_posts'] %}
|
||||
<h2>New Posts</h2>
|
||||
{% for p in feed['new_posts'] %}
|
||||
<p>{{ p.id }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if feed['active_subscriptions'] %}
|
||||
<h2>Active Subscriptions</h2>
|
||||
{% for s in feed['active_subscriptions'] %}
|
||||
<p>{{ s.id }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'includes/footer.html' %}
|
||||
|
||||
</div>
|
||||
|
||||
{% include 'includes/scripts.html' %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% extends 'includes/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{% if 2 not in current_user.roles %}
|
||||
<a href="{{ url_for('creator.join') }}">Become a Creator</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('creator.manage_subscriptions') }}">Manage Subscriptions</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if feed %}
|
||||
<h1>Feed</h1>
|
||||
{% if feed['new_creators'] %}
|
||||
<h2>New Creators</h2>
|
||||
{% for c in feed['new_creators'] %}
|
||||
<p><a href="{{ url_for('creator.show', handle=c.handle) }}">{{ c.handle }}</a></p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if feed['new_posts'] %}
|
||||
<h2>New Posts</h2>
|
||||
{% for p in feed['new_posts'] %}
|
||||
<p>{{ p.id }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if feed['active_subscriptions'] %}
|
||||
<h2>Active Subscriptions</h2>
|
||||
{% for s in feed['active_subscriptions'] %}
|
||||
<p>{{ s.id }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue