pyfedi/app/templates/instance/list_instances.html

80 lines
3.8 KiB
HTML
Raw Normal View History

2024-10-11 21:13:22 -07:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
2024-12-10 03:16:52 -08:00
{% endif %}
2024-10-11 21:13:22 -07: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">
{% if search == '' %}
<h1>{{ title }}</h1>
{% else %}
<h1>{{ title }}</h1>
{% endif %}
<form method="get">
<input type="search" name="search" value="{{ search }}"> <input type="submit" name="submit" value="{{ _('Search') }}">
</form>
<a href="{{ url_for('instance.list_instances', filter='online') }}" rel="nofollow noindex">{{ _('Online') }}</a> |
<a href="{{ url_for('instance.list_instances', filter='dormant') }}" rel="nofollow noindex">{{ _('Dormant') }}</a> |
<a href="{{ url_for('instance.list_instances', filter='gone_forever') }}" rel="nofollow noindex">{{ _('Gone forever') }}</a> |
<a href="{{ url_for('instance.list_instances', filter='trusted') }}" rel="nofollow noindex">{{ _('Trusted') }}</a>
{% if instances -%}
<div class="table-responsive-sm pt-4">
<table class="table table-striped">
<tr>
<th>{{ _('Instance') }}</th>
<th>{{ _('More details') }}</th>
<th>{{ _('Software') }}</th>
<th>{{ _('Version') }}</th>
<th>{{ _('Heard from') }}</th>
<th>{{ _('Sent to') }}</th>
<th>{{ _('Online') }}</th>
</tr>
{% for instance in instances %}
<tr>
<td><a href="{{ url_for('instance.instance_overview', instance_domain=instance.domain) }}">{{ instance.domain }}</a></td>
<td><a href="{{ url_for('instance.instance_people', instance_domain=instance.domain) }}">{{ _('People') }}</a>
<a href="{{ url_for('instance.instance_posts', instance_domain=instance.domain) }}">{{ _('Posts') }}</a>
</td>
<td>{{ instance.software }}</td>
<td>{{ instance.version if instance.version }}</td>
<td>{{ arrow.get(instance.last_seen).humanize(locale=locale) if instance.last_seen }}</td>
<td>{{ arrow.get(instance.last_successful_send).humanize(locale=locale) if instance.last_successful_send }}</td>
<td>{% if instance.dormant and instance.gone_forever -%}
{{ _('Gone') }}
{% elif instance.dormant -%}
{{ _('Dormant') }}
{% else -%}
{{ _('Online') }}
{% endif -%}
</td>
</tr>
{% endfor %}
</table>
</div>
<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>
{% else -%}
<p>{{ _('No results to show.') }}</p>
{% endif %}
</div>
</div>
{% endblock %}