diff --git a/subscribie/blueprints/admin/templates/admin/subscribers.html b/subscribie/blueprints/admin/templates/admin/subscribers.html
index 9953cc5e..14b90135 100644
--- a/subscribie/blueprints/admin/templates/admin/subscribers.html
+++ b/subscribie/blueprints/admin/templates/admin/subscribers.html
@@ -1,7 +1,8 @@
-{% extends "admin/layout.html" %}
+{% extends "admin/layout.html" %}
{% block title %} Subscribers {% endblock %}
{% block body %}
+{% from 'macros/subscriber_subscription_plan_card.html' import subscriber_subscription_plan_card %}
My Subscribers
@@ -82,128 +83,7 @@ Search...
{% for subscription in person.subscriptions %}
-
-
-
- - Title:
- {{ subscription.plan.title }}
-
- -
- Interval:
- {% if subscription.plan is not sameas None and subscription.plan.interval_unit is not sameas None %}
- {{ subscription.plan.interval_unit.capitalize() }}
- {% else %}
- {{ subscription.plan.interval_unit }}
- {% endif %}
-
- {% if subscription.chosen_options %}
- -
-
- Chosen Options
-
- {% for choice in subscription.chosen_options %}
- - {{ choice.choice_group_title }}: {{ choice.option_title }}
- {% endfor %}
-
-
-
- {% endif %}
- - Subscription ID: {{ subscription.uuid }}
- - Date started: {{ subscription.created_at.strftime('%Y-%m-%d') }}
- -
- {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
- Price:
- {{ subscription.showIntervalAmount() }}
- {% else %}
- (One-off. Not a subscription)
- {% endif %}
-
- - Sell price:
-
- {% if subscription.plan.requirements and subscription.plan.requirements.instant_payment %}
- {{ subscription.showSellPrice() }}
- {% else %}
- (No up-front fee)
- {% endif %}
-
- - Status:
- {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
- {% if subscription.stripe_pause_collection == "void" %}
- Paused
- {% else %}
- {{ subscription.stripe_status }}
- {% endif %}
- {% else %}
- Paid
- {% endif %}
-
- {% if subscription.stripe_cancel_at %}
- Automatically Cancels at:
- {{ subscription.stripe_cancel_at | timestampToDate }}
- {% endif %}
- -
-
- -
- {% if subscription.plan.requirements and subscription.plan.requirements.note_to_seller_required %}
-
- Order Note
- {% if subscription.note %}
- {{ subscription.note.note }}
- {% else %}
- No note was given.
- {% endif %}
-
- {% endif %}
-
- - Actions:
- {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
- {% if subscription.stripe_status|lower in ['active', 'trialing', 'past_due', 'unpaid'] %}
- {% if subscription.stripe_status|lower != 'trialing' and subscription.stripe_pause_collection != 'void' %}
-
- Pause
- |
-
- Cancel
- |
- {% endif %}
- {% endif %}
- {% if subscription.stripe_pause_collection|lower == 'void' %}
-
- Resume
- |
-
- Cancel
- |
- {% endif %}
- {% endif %}
- - History:
- View Transactions
-
-
- - Documents:
- {% if subscription.documents|length == 0 %}
- None
- {% else %}
-
- {% for document in subscription.documents %}
- {# Show documents assocated with subscription (if any) #}
- -
- {{ document.name }} |
- {{ document.created_at.strftime('%Y-%m-%d') }}
- {% endfor %}
-
- {% endif %}
-
-
-
+ {{ subscriber_subscription_plan_card(subscription) }}
{% endfor %}
diff --git a/subscribie/blueprints/admin/templates/macros/subscriber_subscription_plan_card.html b/subscribie/blueprints/admin/templates/macros/subscriber_subscription_plan_card.html
new file mode 100644
index 00000000..eac916d7
--- /dev/null
+++ b/subscribie/blueprints/admin/templates/macros/subscriber_subscription_plan_card.html
@@ -0,0 +1,124 @@
+{% macro subscriber_subscription_plan_card(subscription) -%}
+
+
+ - Title:
+ {{ subscription.plan.title }}
+
+ -
+ Interval:
+ {% if subscription.plan is not sameas None and subscription.plan.interval_unit is not sameas None %}
+ {{ subscription.plan.interval_unit.capitalize() }}
+ {% else %}
+ {{ subscription.plan.interval_unit }}
+ {% endif %}
+
+ {% if subscription.chosen_options %}
+ -
+
+ Chosen Options
+
+ {% for choice in subscription.chosen_options %}
+ - {{ choice.choice_group_title }}: {{ choice.option_title }}
+ {% endfor %}
+
+
+
+ {% endif %}
+ - Subscription ID: {{ subscription.uuid }}
+ - Date started: {{ subscription.created_at.strftime('%Y-%m-%d') }}
+ -
+ {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
+ Price:
+ {{ subscription.showIntervalAmount() }}
+ {% else %}
+ (One-off. Not a subscription)
+ {% endif %}
+
+ - Sell price:
+
+ {% if subscription.plan.requirements and subscription.plan.requirements.instant_payment %}
+ {{ subscription.showSellPrice() }}
+ {% else %}
+ (No up-front fee)
+ {% endif %}
+
+ - Status:
+ {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
+ {% if subscription.stripe_pause_collection == "void" %}
+ Paused
+ {% else %}
+ {{ subscription.stripe_status }}
+ {% endif %}
+ {% else %}
+ Paid
+ {% endif %}
+
+ {% if subscription.stripe_cancel_at %}
+ Automatically Cancels at:
+ {{ subscription.stripe_cancel_at | timestampToDate }}
+ {% endif %}
+ -
+
+ -
+ {% if subscription.plan.requirements and subscription.plan.requirements.note_to_seller_required %}
+
+ Order Note
+ {% if subscription.note %}
+ {{ subscription.note.note }}
+ {% else %}
+ No note was given.
+ {% endif %}
+
+ {% endif %}
+
+ - Actions:
+ {% if subscription.plan.requirements and subscription.plan.requirements.subscription %}
+ {% if subscription.stripe_status|lower in ['active', 'trialing', 'past_due', 'unpaid'] %}
+ {% if subscription.stripe_status|lower != 'trialing' and subscription.stripe_pause_collection != 'void' %}
+
+ Pause
+ |
+
+ Cancel
+ |
+ {% endif %}
+ {% endif %}
+ {% if subscription.stripe_pause_collection|lower == 'void' %}
+
+ Resume
+ |
+
+ Cancel
+ |
+ {% endif %}
+ {% endif %}
+ - History:
+ View Transactions
+
+
+ - Documents:
+ {% if subscription.documents|length == 0 %}
+ None
+ {% else %}
+
+ {% for document in subscription.documents %}
+ {# Show documents assocated with subscription (if any) #}
+ -
+ {{ document.name }} |
+ {{ document.created_at.strftime('%Y-%m-%d') }}
+ {% endfor %}
+
+ {% endif %}
+
+
+
+{%- endmacro %}
\ No newline at end of file