{% extends "base.html" %}
{% load static %}
{% block content %}
<h2>Your subscriptions</h2>

<div class="row">
{% for object in object_list %}
<div class="subscription col s12">
  <h5>{{object.district}}</h5>
    <p><b>Pickup:</b> {{object.district.pickup_time}}</p>
    {% if object.subscription_type == 'SMS' %}
    <p><b>Sent to:</b> {{ object.phone_number }}</p>
    {% else %}
    <p><b>Sent to:</b> {{object.user.email}}</p>
    {% endif %}
    <p>
    {% if object.suspended %}
    <a class="btn waves-effect waves-light" href="#"><i class="material-icons right">play_circle_filled</i>activate</a>
    {% else %}
    <a class="btn waves-effect waves-light" href="#"><i class="material-icons right">pause_circle_filled</i>deactivate</a>
    {% endif %}
    <a class="btn waves-effect waves-light" href="#"><i class="material-icons right">delete</i>delete</a>
</div>
{% endfor %}
</div>
{% endblock %}
