pyfedi/app/templates/domain/domain.html

82 lines
3.4 KiB
HTML
Raw Normal View History

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
2023-11-29 22:12:55 +13:00
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
<div class="row">
<div class="col-12 col-md-8 position-relative main_pane">
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/domains">{{ _('Domains') }}</a></li>
<li class="breadcrumb-item active">{{ domain.name|shorten }}</li>
</ol>
</nav>
<h1 class="mt-2">{{ domain.name }}</h1>
<div class="post_list">
{% for post in posts.items %}
{% include 'post/_post_teaser.html' %}
2023-11-29 22:12:55 +13:00
{% else %}
<p>{{ _('No posts in this domain yet.') }}</p>
{% endfor %}
</div>
2024-02-02 16:52:23 +13:00
<nav aria-label="Pagination" class="mt-4" role="navigation">
{% if prev_url %}
<a href="{{ prev_url }}" class="btn btn-primary" rel='nofollow'>
<span aria-hidden="true">&larr;</span> {{ _('Previous page') }}
</a>
{% endif %}
{% if next_url %}
<a href="{{ next_url }}" class="btn btn-primary" rel='nofollow'>
{{ _('Next page') }} <span aria-hidden="true">&rarr;</span>
</a>
{% endif %}
</nav>
2023-11-29 22:12:55 +13:00
</div>
2024-02-05 08:39:08 +13:00
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
2024-02-02 16:52:23 +13:00
{% if current_user.is_authenticated %}
<div class="card mt-3">
<div class="card-header">
<h2>{{ _('Domain management') }}</h2>
</div>
<div class="card-body">
<div class="row">
{% if domain.blocked_by(current_user) %}
<div class="col-4">
<a class="w-100 btn btn-primary" href="/d/{{ domain.id }}/unblock">{{ _('Unblock') }}</a>
</div>
{% else %}
<div class="col-4">
<a class="w-100 btn btn-primary" href="/d/{{ domain.id }}/block">{{ _('Block') }}</a>
</div>
{% endif %}
2024-02-02 17:05:12 +13:00
{% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}
{% if domain.banned %}
<div class="col-8">
<a class="w-100 btn btn-primary confirm_first" href="/d/{{ domain.id }}/unban">{{ _('Unban') }}</a>
</div>
{% else %}
<div class="col-8">
<a class="w-100 btn btn-primary confirm_first" href="/d/{{ domain.id }}/ban">{{ _('Ban instance-wide') }}</a>
</div>
{% endif %}
2024-02-02 16:52:23 +13:00
{% endif %}
</div>
</div>
</div>
{% endif %}
2023-11-29 22:12:55 +13:00
2024-02-02 16:52:23 +13:00
{% include "_inoculation_links.html" %}
</aside>
2023-11-29 22:12:55 +13:00
</div>
<div class="row">
</div>
{% endblock %}