WesternFriend/WF-website

View on GitHub
community/templates/community/online_worship_index_page.html

Summary

Maintainability
Test Coverage
{% extends "base.html" %}

{% load wagtailcore_tags wagtailimages_tags %}

{% block body_class %}template-community-resources{% endblock %}

{% block content %}
    <h1>
        {{ page.title }}
    </h1>

    {{ page.intro | richtext }}

    {% for online_worship in online_worship_meetings %}
        <div class="card mb-3">
            <div class="card-body">
                <div class="container">
                    <div class="row">
                        <div class="col-md-10">
                            <h2 class="card-title">
                                {{ online_worship.title }}
                            </h2>

                            {% if online_worship.times_of_worship %}
                                <p class="card-text">
                                    <strong>Times of worship:</strong>&nbsp;
                                    {{ online_worship.times_of_worship | richtext }}
                                </p>
                            {% endif %}

                            {% if online_worship.hosted_by %}
                                <p>
                                    <strong>Hosted by:</strong>&nbsp;
                                    {{ online_worship.hosted_by }}
                                </p>
                            {% endif %}

                            {% if online_worship.online_worship_day %}
                                <p>
                                    <strong>Online worship day:</strong>&nbsp;
                                    {{ online_worship.online_worship_day }}
                                </p>
                            {% endif %}

                            {% if online_worship.online_worship_time %}
                                <p>
                                    <strong>Online worship time:</strong>&nbsp;
                                    {{ online_worship.online_worship_time }}
                                    {% if online_worship.online_worship_timezone %}
                                        ({{ online_worship.online_worship_timezone }})
                                    {% endif %}
                                </p>
                            {% endif %}

                            {% if online_worship.online_worship_url %}
                                <p>
                                    <strong>Online worship URL:</strong>&nbsp;
                                    {{ online_worship.online_worship_url }}
                                </p>
                            {% endif %}

                            {% if online_worship.online_worship_notes %}
                                <p>
                                    <strong>Online worship notes:</strong>&nbsp;
                                    {{ online_worship.online_worship_notes }}
                                </p>
                            {% endif %}
                        </div>
                        <div class="col-md-2">
                            <a href="{{ online_worship.url }}" class="btn btn-outline-primary stretched-link">View details</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    {% endfor %}

{% endblock %}