2021-07-28 20:21:42 +00:00
|
|
|
{% extends 'feed/layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-05-11 22:14:42 +00:00
|
|
|
|
2021-01-29 18:25:31 +00:00
|
|
|
{% block panel %}
|
|
|
|
|
2021-03-23 01:42:12 +00:00
|
|
|
<h1 class="title">
|
2021-08-05 00:53:44 +00:00
|
|
|
{{ tab.name }}
|
2021-03-23 01:42:12 +00:00
|
|
|
</h1>
|
2021-01-29 18:25:31 +00:00
|
|
|
<div class="tabs">
|
|
|
|
<ul>
|
2021-08-05 00:53:44 +00:00
|
|
|
{% for stream in streams %}
|
|
|
|
<li class="{% if tab.key == stream.key %}is-active{% endif %}"{% if tab.key == stream.key %} aria-current="page"{% endif %}>
|
|
|
|
<a href="/{{ stream.key }}#feed">{{ stream.shortname }}</a>
|
2021-01-29 18:25:31 +00:00
|
|
|
</li>
|
2021-08-05 00:53:44 +00:00
|
|
|
{% endfor %}
|
2021-01-29 18:25:31 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2021-11-22 17:52:57 +00:00
|
|
|
{# feed settings #}
|
2021-11-21 23:25:47 +00:00
|
|
|
<details class="mb-5" {% if settings_saved %}open{% endif %}>
|
|
|
|
<summary>
|
2021-11-22 17:52:57 +00:00
|
|
|
<span class="has-text-weight-bold">
|
|
|
|
{{ _("Feed settings") }}
|
|
|
|
</span>
|
2021-11-21 23:25:47 +00:00
|
|
|
{% if settings_saved %}
|
2021-11-22 17:52:57 +00:00
|
|
|
<span class="tag is-success is-light ml-2">{{ _("Saved!") }}</span>
|
2021-11-21 23:25:47 +00:00
|
|
|
{% endif %}
|
|
|
|
</summary>
|
2021-11-22 17:52:57 +00:00
|
|
|
<form class="level is-align-items-flex-end" method="post" action="/{{ tab.key }}#feed">
|
2021-11-21 23:25:47 +00:00
|
|
|
{% csrf_token %}
|
2021-11-22 17:52:57 +00:00
|
|
|
|
2021-11-21 23:25:47 +00:00
|
|
|
<div class="level-left">
|
2021-11-22 17:52:57 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="control">
|
|
|
|
<label class="label mt-2 mb-1">Status types</label>
|
|
|
|
{% for name, value in feed_status_types_options %}
|
|
|
|
<label class="mr-2">
|
|
|
|
<input type="checkbox" name="feed_status_types" value="{{ name }}" {% if name in user.feed_status_types %}checked=""{% endif %}/>
|
|
|
|
{{ value }}
|
|
|
|
</label>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-21 23:25:47 +00:00
|
|
|
</div>
|
2021-11-24 10:59:45 +00:00
|
|
|
<div class="level-right control">
|
2021-11-21 23:25:47 +00:00
|
|
|
<button class="button is-small is-primary is-outlined" type="submit">
|
2021-11-22 17:52:57 +00:00
|
|
|
{{ _("Save settings") }}
|
2021-11-21 23:25:47 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</details>
|
|
|
|
|
2021-03-23 19:54:49 +00:00
|
|
|
{# announcements and system messages #}
|
|
|
|
{% if not activities.number > 1 %}
|
2021-04-07 15:31:00 +00:00
|
|
|
<a href="{{ request.path }}" class="transition-y is-hidden notification is-primary is-block" data-poll-wrapper>
|
2021-08-11 16:19:25 +00:00
|
|
|
{% blocktrans with tab_key=tab.key %}load <span data-poll="stream/{{ tab_key }}">0</span> unread status(es){% endblocktrans %}
|
2021-11-24 18:00:30 +00:00
|
|
|
{{ allowed_status_types|json_script:"unread-notifications-wrapper" }}
|
2021-03-23 19:52:38 +00:00
|
|
|
</a>
|
|
|
|
|
2021-09-08 16:38:36 +00:00
|
|
|
{% if request.user.show_goal and not goal and tab.key == 'home' %}
|
2021-01-29 18:25:31 +00:00
|
|
|
{% now 'Y' as year %}
|
2021-03-18 16:08:19 +00:00
|
|
|
<section class="block">
|
2021-09-29 16:24:51 +00:00
|
|
|
{% include 'feed/goal_card.html' with year=year %}
|
2021-01-29 18:25:31 +00:00
|
|
|
<hr>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-03-23 19:54:49 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-01-29 18:25:31 +00:00
|
|
|
{# activity feed #}
|
|
|
|
{% if not activities %}
|
2021-05-22 18:20:39 +00:00
|
|
|
<div class="block content">
|
2021-11-24 10:59:45 +00:00
|
|
|
<p>{% trans "There aren't any activities right now! Try following a user to get started" %}</p>
|
|
|
|
<p>{% if user.feed_status_types|length < 4 %}{% trans "Alternatively, you can try enabling more status types" %}{% endif %}</p>
|
2021-05-22 18:20:39 +00:00
|
|
|
|
2021-09-08 17:02:06 +00:00
|
|
|
{% if request.user.show_suggested_users and suggested_users %}
|
2021-05-22 18:20:39 +00:00
|
|
|
{# suggested users for when things are very lonely #}
|
|
|
|
{% include 'feed/suggested_users.html' with suggested_users=suggested_users %}
|
2021-08-21 17:30:44 +00:00
|
|
|
{% endif %}
|
2021-05-22 18:20:39 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-01-29 18:25:31 +00:00
|
|
|
{% for activity in activities %}
|
2021-03-26 17:32:42 +00:00
|
|
|
|
2021-09-08 17:02:06 +00:00
|
|
|
{% if request.user.show_suggested_users and not activities.number > 1 and forloop.counter0 == 2 and suggested_users %}
|
2021-03-26 17:32:42 +00:00
|
|
|
{# suggested users on the first page, two statuses down #}
|
2021-05-22 18:20:39 +00:00
|
|
|
{% include 'feed/suggested_users.html' with suggested_users=suggested_users %}
|
2021-03-26 17:32:42 +00:00
|
|
|
{% endif %}
|
2021-01-29 18:25:31 +00:00
|
|
|
<div class="block">
|
2021-03-22 15:50:41 +00:00
|
|
|
{% include 'snippets/status/status.html' with status=activity %}
|
2021-01-29 18:25:31 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% endblock %}
|