def description(self):
return self.data.get("description")
+ @property
+ def archive_url(self):
+ return "https://lists.ipfire.org/hyperkitty/list/%s/" % self.list_id
+
async def subscribe(self, account):
pass # XXX TODO
{% for list in sorted(lists) %}
<div class="block">
<div class="box">
- <h5 class="title is-5">
+ <h4 class="title is-4">
{{ list }}
+ </h4>
- {# Show if subscribed #}
- {% if list in subscribed_lists %}
- <span class="tag is-success is-pulled-right">
- {{ _("Subscribed") }}
- </span>
- {% else %}
- <span class="tag is-pulled-right">
- {{ _("Not Subscribed") }}
+ <h6 class="subtitle is-6">
+ {{ list.description }}
+ </h6>
+
+ <div class="buttons">
+ <a class="button is-light" href="{{ list.archive_url }}">
+ <span class="icon-text">
+ <span class="icon">
+ <i class="fa-solid fa-inbox"></i>
+ </span>
+ <span>{{ _("Archive") }}</span>
</span>
- {% end %}
- </h5>
+ </a>
- {% if list.description %}
- <h6 class="subtitle is-6">{{ list.description }}</h6>
- {% end %}
+ {% if current_user %}
+ {% if list in subscribed_lists %}
+ <a class="button is-success is-outlined" href="/lists/{{ list.list_id }}/unsubscribe">
+ {{ _("Subscribed") }}
+ </a>
+ {% else %}
+ <a class="button is-success" href="/lists/{{ list.list_id }}/subscribe">
+ {{ _("Subscribe") }}
+ </a>
+ {% end %}
+ {% end %}
+ </div>
</div>
</div>
{% end %}