{% extends "chats/base_detail.html" %} {% load community_utils %} {% load bootstrap_helpers %} {% load django_bootstrap5 %} {% load chats %} {% block headline %}{{ channel }}{% endblock %} {% block title %}Subscribe to {{ channel }}{% endblock %} {% block subtitle %} {% if form.instance.pk %} Edit subscription {% else %} Subscribe {% endif %} {% endblock %} {% block breadcrumbs %} {% url "chats:channel-list" as channels_url %} {% breadcrumbs "Channels"|combine:channels_url channel|name_for:user|combine:channel.get_absolute_url "Edit subscription"|combine:request.path %} {% endblock %} {% block content %}
{% channel_item channel %}
{% if not form.instance.pk %}

You are currently not subscribed to this channel. If you want to receive notifications on new comments, please subscribe.

{% else %}

You are currently subscribed to this channel. If you want to stop receiving any notifications, please disable following or remove this subscription using the below.

If you only want to edit how you want to receive notifications for this channel, checkout your notification settings for this channel .
{% endif %}
{% csrf_token %} {% bootstrap_switch form.following %} {% bootstrap_switch form.favorite %}
{% bootstrap_form form exclude="following,favorite" %}
{% bootstrap_button form.instance.pk|ifthenelse:",OK,Subscribe" button_type="submit" extra_classes="me-2" %} {% bootstrap_button "Reset" button_type="reset" extra_classes="me-auto me-2" %} {% if form.instance.pk %} {% url "chats:channel-list" as channels_url %} {% with next=next_url|default:channels_url %} {% bootstrap_button ''|safe button_type="link" href=form.instance.get_delete_url|add:"?next="|add:next extra_classes="me-2" %} {% endwith %} {% endif %} {% bootstrap_button content="Cancel" button_type="link" href=next_url|default:channel.get_absolute_url %}
{% endblock %}