2021-09-08 21:05:08 +00:00
{% extends 'settings/layout.html' %}
2021-03-28 19:34:55 +00:00
{% load i18n %}
2021-05-11 22:14:42 +00:00
{% load markdown %}
{% block title %}{{ server.server_name }}{% endblock %}
2021-03-28 19:34:55 +00:00
{% block header %}
{{ server.server_name }}
2021-04-05 22:38:32 +00:00
{% if server.status == "blocked" %}< span class = "icon icon-x has-text-danger is-size-5" title = "{% trans 'Blocked' %}" > < span class = "is-sr-only" > {% trans "Blocked" %}< / span > < / span >
{% endif %}
2022-02-28 20:24:45 +00:00
{% endblock %}
2021-04-05 22:38:32 +00:00
2022-02-28 21:09:43 +00:00
{% block edit-button %}
< form name = "reload" method = "POST" action = "{% url 'settings-federated-server-refresh' server.id %}" >
{% csrf_token %}
< button class = "button" type = "submit" > {% trans "Refresh data" %}< / button >
< / form >
{% endblock %}
2022-02-28 20:24:45 +00:00
{% block breadcrumbs %}
< nav class = "breadcrumb subtitle" aria-label = "breadcrumbs" >
< ul >
< li > < a href = "{% url 'settings-federation' %}" > {% trans "Federated Instances" %}< / a > < / li >
< li class = "is-active" >
< a href = "#" aria-current = "page" >
{{ server.server_name }}
< / a >
< / li >
< / ul >
< / nav >
2021-03-28 19:34:55 +00:00
{% endblock %}
{% block panel %}
2021-04-07 20:21:46 +00:00
< div class = "columns" >
2021-05-18 17:45:51 +00:00
< section class = "column is-half is-flex is-flex-direction-column" >
2021-04-07 20:21:46 +00:00
< h2 class = "title is-4" > {% trans "Details" %}< / h2 >
2021-05-18 17:45:51 +00:00
< div class = "box is-flex-grow-1 content" >
< dl >
2021-09-28 21:38:58 +00:00
< dt class = "is-pulled-left mr-5" > {% trans "Software:" %}< / dt >
< dd > {{ server.application_type }}< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Version:" %}< / dt >
< dd > {{ server.application_version }}< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Status:" %}< / dt >
< dd > {{ server.get_status_display }}< / dd >
2021-05-18 17:45:51 +00:00
< / dl >
< / div >
2021-04-07 20:21:46 +00:00
< / section >
2021-05-18 17:45:51 +00:00
< section class = "column is-half is-flex is-flex-direction-column" >
2021-04-07 20:21:46 +00:00
< h2 class = "title is-4" > {% trans "Activity" %}< / h2 >
2021-05-18 17:45:51 +00:00
< div class = "box is-flex-grow-1 content" >
< dl >
2021-09-28 21:38:58 +00:00
< dt class = "is-pulled-left mr-5" > {% trans "Users:" %}< / dt >
< dd >
{{ users.count }}
{% if server.user_set.count %}(< a href = "{% url 'settings-users' %}?server={{ server.server_name }}" > {% trans "View all" %}< / a > ){% endif %}
< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Reports:" %}< / dt >
< dd >
{{ reports.count }}
{% if reports.count %}(< a href = "{% url 'settings-reports' %}?server={{ server.server_name }}" > {% trans "View all" %}< / a > ){% endif %}
< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Followed by us:" %}< / dt >
< dd >
{{ followed_by_us.count }}
< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Followed by them:" %}< / dt >
< dd >
{{ followed_by_them.count }}
< / dd >
< dt class = "is-pulled-left mr-5" > {% trans "Blocked by us:" %}< / dt >
< dd >
{{ blocked_by_us.count }}
< / dd >
2021-05-18 17:45:51 +00:00
< / dl >
< / div >
2021-04-07 20:21:46 +00:00
< / section >
< / div >
2021-03-28 19:34:55 +00:00
< section class = "block content" >
2021-04-11 17:36:40 +00:00
< header class = "columns is-mobile" >
< div class = "column" >
< h2 class = "title is-4 mb-0" > {% trans "Notes" %}< / h2 >
< / div >
< div class = "column is-narrow" >
{% trans "Edit" as button_text %}
2021-08-09 01:40:47 +00:00
{% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_notes" %}
2021-04-11 17:36:40 +00:00
< / div >
< / header >
2021-09-28 21:38:58 +00:00
{% trans "< em > No notes< / em > " as null_text %}
< div class = "box" id = "hide_edit_notes" > {{ server.notes|to_markdown|default:null_text|safe }}< / div >
2021-08-09 01:40:47 +00:00
< form class = "box is-hidden" method = "POST" action = "{% url 'settings-federated-server' server.id %}" id = "edit_notes" >
2021-04-11 17:36:40 +00:00
{% csrf_token %}
< p >
< label class = "is-sr-only" for = "id_notes" > Notes:< / label >
2021-09-28 21:38:58 +00:00
< textarea name = "notes" cols = "40" rows = "5" class = "textarea" id = "id_notes" > {{ server.notes|default:"" }}< / textarea >
2021-04-11 17:36:40 +00:00
< / p >
< button type = "submit" class = "button is-primary" > {% trans "Save" %}< / button >
{% trans "Cancel" as button_text %}
2021-08-09 01:40:47 +00:00
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="edit_notes" %}
2021-04-11 17:36:40 +00:00
< / form >
2021-03-28 19:34:55 +00:00
< / section >
2021-04-05 22:38:32 +00:00
< section class = "block content" >
< h2 class = "title is-4" > {% trans "Actions" %}< / h2 >
2021-04-10 17:37:28 +00:00
{% if server.status != 'blocked' %}
2021-04-11 17:36:40 +00:00
< form class = "block" method = "post" action = "{% url 'settings-federated-server-block' server.id %}" >
2021-04-05 22:38:32 +00:00
{% csrf_token %}
< button class = "button is-danger" > {% trans "Block" %}< / button >
2021-04-07 23:50:12 +00:00
< p class = "help" > {% trans "All users from this instance will be deactivated." %}< / p >
2021-04-10 17:37:28 +00:00
< / form >
{% else %}
< form class = "block" method = "post" action = "{% url 'settings-federated-server-unblock' server.id %}" >
2021-04-10 18:06:28 +00:00
{% csrf_token %}
2021-04-05 22:38:32 +00:00
< button class = "button" > {% trans "Un-block" %}< / button >
2021-04-07 23:50:12 +00:00
< p class = "help" > {% trans "All users from this instance will be re-activated." %}< / p >
2021-04-05 22:38:32 +00:00
< / form >
2021-04-10 17:37:28 +00:00
{% endif %}
2021-04-05 22:38:32 +00:00
< / section >
2021-03-28 19:34:55 +00:00
{% endblock %}