mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
66 lines
2.2 KiB
HTML
66 lines
2.2 KiB
HTML
{% extends "layout.html" %}
|
|
{% import 'utils.html' as utils %}
|
|
{% block title %}Following - {{ config.NAME }}{% endblock %}
|
|
{% block header %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div id="container">
|
|
{% include "header.html" %}
|
|
|
|
<div id="following">
|
|
{% for (follow_id, follow) in following_data %}
|
|
{% if session.logged_in %}
|
|
<div style="margin-left:90px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
|
|
<a class="bar-item" href="/admin/profile?actor_id={{follow.id}}">profile</a>
|
|
<form action="/api/undo" class="action-form" method="post">
|
|
<input type="hidden" name="redirect" value="{{ request.path }}"/>
|
|
<input type="hidden" name="id" value="{{ follow_id }}"/>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<button type="submit" class="bar-item">unfollow</button>
|
|
</form>
|
|
|
|
{% if lists %}
|
|
<form action="/api/add_to_list" class="action-form" method="post">
|
|
<input type="hidden" name="redirect" value="{{ request.path }}"/>
|
|
<input type="hidden" name="actor_id" value="{{ follow.id }}"/>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<select name="list_name" style="float:left;">
|
|
<option></option>
|
|
{% for l in lists %}
|
|
{% if follow.id not in l.members %}
|
|
<option value="{{l.name}}">{{l.name}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<button type="submit" class="bar-item">add to list</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% for l in lists %}
|
|
{% if follow.id in l.members %}
|
|
<form action="/api/remove_from_list" class="action-form" method="post">
|
|
<input type="hidden" name="redirect" value="{{ request.path }}"/>
|
|
<input type="hidden" name="actor_id" value="{{ follow.id }}"/>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<button type="submit" class="bar-item">remove from {{ l.name }}</button>
|
|
</form>
|
|
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
<div style="height: 100px;">
|
|
{{ utils.display_actor_inline(follow, size=80) }}
|
|
</div>
|
|
{% endfor %}
|
|
{{ utils.display_pagination(older_than, newer_than) }}
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %}
|
|
{% block links %}
|
|
<link rel="alternate" href="{{ config.BASE_URL }}/following" type="application/activity+json">
|
|
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}
|