From 1b9291616b6046acc1d0dce43dfa3d949c35af81 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 4 Dec 2021 16:08:47 +0100 Subject: [PATCH] Add EmbedList view template --- bookwyrm/templates/lists/embed-list.html | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 bookwyrm/templates/lists/embed-list.html diff --git a/bookwyrm/templates/lists/embed-list.html b/bookwyrm/templates/lists/embed-list.html new file mode 100644 index 000000000..54dc80ab2 --- /dev/null +++ b/bookwyrm/templates/lists/embed-list.html @@ -0,0 +1,59 @@ +{% extends 'embed-layout.html' %} +{% load i18n %} +{% load bookwyrm_tags %} +{% load bookwyrm_group_tags %} +{% load markdown %} + +{% block title %}{% blocktrans with list_name=list.name owner=list.user.display_name %}{{ list_name }}, a list by {{owner}}{% endblocktrans %}{% endblock title %} + +{% block content %} +
+

+ {{ list.name }} + {% include 'snippets/privacy-icons.html' with item=list %} +

+

+ {% include 'lists/created_text.html' with list=list %} + {% blocktrans with site_name=site.name %}on {{ site_name }}{% endblocktrans %} +

+ +
+ {% include 'snippets/trimmed_text.html' with full=list.description %} +
+ +
+ {% if not items.object_list.exists %} +

{% trans "This list is currently empty" %}

+ {% else %} +
    + {% for item in items %} + {% with book=item.book %} +
  1. +
    + + +
    +

    + {% include 'snippets/book_titleby.html' %} +

    +

    + {% include 'snippets/stars.html' with rating=item.book|rating:request.user %} +

    +
    + {{ book|book_description|to_markdown|default:""|safe|truncatewords_html:20 }} +
    +
    +
    +
  2. + {% endwith %} + {% endfor %} +
+ {% endif %} + {% include "snippets/pagination.html" with page=items %} +
+
+{% endblock %}