diff --git a/bookwyrm/templates/snippets/status/status_header.html b/bookwyrm/templates/snippets/status/status_header.html index e9d10c25f..27bce0ca5 100644 --- a/bookwyrm/templates/snippets/status/status_header.html +++ b/bookwyrm/templates/snippets/status/status_header.html @@ -1,5 +1,6 @@ {% load bookwyrm_tags %} {% load i18n %} +{% load humanize %}
- {{ status.published_date | post_date }} +
+ + + {{ status.user.display_name }} + + + + {% if status.status_type == 'GeneratedNote' %} + {{ status.content | safe }} + {% elif status.status_type == 'Rating' %} + {% trans "rated" %} + {% elif status.status_type == 'Review' %} + {% trans "reviewed" %} + {% elif status.status_type == 'Comment' %} + {% trans "commented on" %} + {% elif status.status_type == 'Quotation' %} + {% trans "quoted" %} + {% elif status.reply_parent %} + {% with parent_status=status|parent %} + + {% if parent_status.status_type == 'Review' %} + {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s review{% endblocktrans %} + {% elif parent_status.status_type == 'Comment' %} + {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s comment{% endblocktrans %} + {% elif parent_status.status_type == 'Quotation' %} + {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s quote{% endblocktrans %} + {% else %} + {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s status{% endblocktrans %} + {% endif %} + + {% endwith %} + {% endif %} + + {% if status.book %} + {% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %} + {{ status.book.title }}{% if status.status_type == 'Rating' %}: + + + + + {# @todo Is it possible to not hard-code the value? #} + + + + {% include 'snippets/stars.html' with rating=status.rating %} + {% endif %} + {% else %} + {% include 'snippets/book_titleby.html' with book=status.book %} + {% endif %} + {% elif status.mention_books %} + + {{ status.mention_books.first.title }} + + {% endif %} +
++ {{ status.published_date|timesince }} + {% if status.progress %} + + {% spaceless %} + ({% if status.progress_mode == 'PG' %} + {% include 'snippets/page_text.html' with page=status.progress total_pages=status.book.pages %} + {% else %} + {{ status.progress }}% + {% endif %}) + {% endspaceless %} + + {% endif %} {% include 'snippets/privacy-icons.html' with item=status %}
- - - {{ status.user.display_name }} - - - - {% if status.status_type == 'GeneratedNote' %} - {{ status.content | safe }} - {% elif status.status_type == 'Rating' %} - {% trans "rated" %} - {% elif status.status_type == 'Review' %} - {% trans "reviewed" %} - {% elif status.status_type == 'Comment' %} - {% trans "commented on" %} - {% elif status.status_type == 'Quotation' %} - {% trans "quoted" %} - {% elif status.reply_parent %} - {% with parent_status=status|parent %} - - {% if parent_status.status_type == 'Review' %} - {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s review{% endblocktrans %} - {% elif parent_status.status_type == 'Comment' %} - {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s comment{% endblocktrans %} - {% elif parent_status.status_type == 'Quotation' %} - {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s quote{% endblocktrans %} - {% else %} - {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to {{ username}}'s status{% endblocktrans %} - {% endif %} - - {% endwith %} - {% endif %} - - {% if status.book %} - {% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %} - {{ status.book.title }}{% if status.status_type == 'Rating' %}: - - - - - {# @todo Is it possible to not hard-code the value? #} - - - - {% include 'snippets/stars.html' with rating=status.rating %} - {% endif %} - {% else %} - {% include 'snippets/book_titleby.html' with book=status.book %} - {% endif %} - {% elif status.mention_books %} - {{ status.mention_books.first.title }} - {% endif %} - - {% if status.progress %} -- ({% if status.progress_mode == 'PG' %} - {% include 'snippets/page_text.html' with page=status.progress total_pages=status.book.pages %} - {% else %} - {{ status.progress }}% - {% endif %}) -
- {% endif %}