diff --git a/tildes/tildes/templates/bookmarks.jinja2 b/tildes/tildes/templates/bookmarks.jinja2 index 24f552c..af645df 100644 --- a/tildes/tildes/templates/bookmarks.jinja2 +++ b/tildes/tildes/templates/bookmarks.jinja2 @@ -1,7 +1,7 @@ {% extends 'base_user_menu.jinja2' %} {% from 'macros/comments.jinja2' import render_single_comment with context %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% from 'macros/topics.jinja2' import render_topic_for_listing with context %} {% block title %}Bookmarks{% endblock %} @@ -28,7 +28,7 @@ {% if post is topic %} {{ render_topic_for_listing(post, show_group=True) }} {% elif post is comment %} -

Comment on {{ post.topic.title }} in {{ group_linked(post.topic.group.path) }}

+

Comment on {{ post.topic.title }} in {{ link_to_group(post.topic.group) }}

{{ render_single_comment(post) }} {% endif %} diff --git a/tildes/tildes/templates/error_group_not_found.jinja2 b/tildes/tildes/templates/error_group_not_found.jinja2 index 7ad5607..f852eaa 100644 --- a/tildes/tildes/templates/error_group_not_found.jinja2 +++ b/tildes/tildes/templates/error_group_not_found.jinja2 @@ -3,7 +3,7 @@ {% extends 'base_no_sidebar.jinja2' %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% block title %} Group not found @@ -17,7 +17,7 @@ Group not found

Did you mean one of these groups instead?

{% endif %} diff --git a/tildes/tildes/templates/groups.jinja2 b/tildes/tildes/templates/groups.jinja2 index 02cca0d..94eb418 100644 --- a/tildes/tildes/templates/groups.jinja2 +++ b/tildes/tildes/templates/groups.jinja2 @@ -4,7 +4,7 @@ {% extends 'base_no_sidebar.jinja2' %} {% from 'macros/groups.jinja2' import render_group_subscription_box with context %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% block title %}Browse groups{% endblock %} @@ -24,7 +24,7 @@ {% for group in groups %} - {{ group_linked(group.path) }} + {{ link_to_group(group) }} {% if group.short_description %}

{{ group.short_description }}

{% endif %} diff --git a/tildes/tildes/templates/macros/links.jinja2 b/tildes/tildes/templates/macros/links.jinja2 index 710dfa9..e583224 100644 --- a/tildes/tildes/templates/macros/links.jinja2 +++ b/tildes/tildes/templates/macros/links.jinja2 @@ -9,6 +9,6 @@ {% endif %} {%- endmacro %} -{% macro group_linked(group_path) -%} - ~{{ group_path }} +{% macro link_to_group(group) -%} + ~{{ group.path }} {%- endmacro %} diff --git a/tildes/tildes/templates/macros/topics.jinja2 b/tildes/tildes/templates/macros/topics.jinja2 index f950315..b05b95d 100644 --- a/tildes/tildes/templates/macros/topics.jinja2 +++ b/tildes/tildes/templates/macros/topics.jinja2 @@ -2,7 +2,7 @@ {# SPDX-License-Identifier: AGPL-3.0-or-later #} {% from 'macros/datetime.jinja2' import adaptive_date_responsive %} -{% from 'macros/links.jinja2' import group_linked, link_to_user %} +{% from 'macros/links.jinja2' import link_to_group, link_to_user %} {% from 'utils.jinja2' import pluralize %} {% macro render_topic_for_listing(topic, show_group=False, rank=None) %} @@ -31,7 +31,7 @@
{% if show_group %} - {{ group_linked(topic.group.path) }} + {{ link_to_group(topic.group) }} {% endif %} {% if topic.important_tags %} diff --git a/tildes/tildes/templates/notifications_unread.jinja2 b/tildes/tildes/templates/notifications_unread.jinja2 index bdb5f0b..8d6b925 100644 --- a/tildes/tildes/templates/notifications_unread.jinja2 +++ b/tildes/tildes/templates/notifications_unread.jinja2 @@ -4,7 +4,7 @@ {% extends 'base_user_menu.jinja2' %} {% from 'macros/comments.jinja2' import comment_label_options_template, comment_reply_template, render_single_comment with context %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% block title %}Unread notifications{% endblock %} @@ -29,12 +29,12 @@ {% for notification in notifications: %}
  • {% if notification.is_comment_reply %} -

    Reply to your comment on {{ notification.comment.topic.title }} in {{ group_linked(notification.comment.topic.group.path) }}

    +

    Reply to your comment on {{ notification.comment.topic.title }} in {{ link_to_group(notification.comment.topic.group) }}

    {% elif notification.is_topic_reply %} -

    Reply to your topic {{ notification.comment.topic.title }} in {{ group_linked(notification.comment.topic.group.path) }}

    +

    Reply to your topic {{ notification.comment.topic.title }} in {{ link_to_group(notification.comment.topic.group) }}

    {% elif notification.is_mention %}

    - You were mentioned in a comment on {{ notification.comment.topic.title }} in {{ group_linked(notification.comment.topic.group.path) }} + You were mentioned in a comment on {{ notification.comment.topic.title }} in {{ link_to_group(notification.comment.topic.group) }}

    {% endif %} diff --git a/tildes/tildes/templates/search.jinja2 b/tildes/tildes/templates/search.jinja2 index 988cd36..d6aa205 100644 --- a/tildes/tildes/templates/search.jinja2 +++ b/tildes/tildes/templates/search.jinja2 @@ -4,7 +4,7 @@ {% extends 'topic_listing.jinja2' %} {% from 'macros/forms.jinja2' import search_form %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% block title %}Search results for "{{ search }}"{% endblock %} @@ -22,7 +22,7 @@ {% block filter_info %} {% if group %}
    - Search results from inside {{ group_linked(group.path) }} only. + Search results from inside {{ link_to_group(group) }} only. Search all groups
    {% endif %} diff --git a/tildes/tildes/templates/topic.jinja2 b/tildes/tildes/templates/topic.jinja2 index c093ef1..fd07a7d 100644 --- a/tildes/tildes/templates/topic.jinja2 +++ b/tildes/tildes/templates/topic.jinja2 @@ -8,7 +8,7 @@ {% from 'macros/datetime.jinja2' import adaptive_date_responsive, time_ago %} {% from 'macros/forms.jinja2' import markdown_textarea %} {% from 'macros/groups.jinja2' import group_segmented_link %} -{% from 'macros/links.jinja2' import group_linked, link_to_user %} +{% from 'macros/links.jinja2' import link_to_user %} {% from 'macros/topics.jinja2' import topic_voting with context %} {% from 'macros/utils.jinja2' import pluralize %} diff --git a/tildes/tildes/templates/topic_listing.jinja2 b/tildes/tildes/templates/topic_listing.jinja2 index eecc501..6c3c60b 100644 --- a/tildes/tildes/templates/topic_listing.jinja2 +++ b/tildes/tildes/templates/topic_listing.jinja2 @@ -5,7 +5,7 @@ {% from 'macros/forms.jinja2' import search_form %} {% from 'macros/groups.jinja2' import group_segmented_link, render_group_subscription_box with context %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% from 'macros/topics.jinja2' import render_topic_for_listing with context %} {% block title %}Topics in ~{{ group.path }}{% endblock %} @@ -99,7 +99,7 @@
    {% if tag %} {% if is_single_group %} - Showing only topics in {{ group_linked(group.path) }} with the tag "{{ tag|replace('_', ' ') }}". + Showing only topics in {{ link_to_group(group) }} with the tag "{{ tag|replace('_', ' ') }}". Back to normal view / {% if request.user %} @@ -225,7 +225,7 @@
  • Subgroups
  • diff --git a/tildes/tildes/templates/user.jinja2 b/tildes/tildes/templates/user.jinja2 index 22bc3f8..3e13ba8 100644 --- a/tildes/tildes/templates/user.jinja2 +++ b/tildes/tildes/templates/user.jinja2 @@ -4,7 +4,7 @@ {% extends 'base_user_menu.jinja2' %} {% from 'macros/comments.jinja2' import comment_label_options_template, comment_reply_template, render_single_comment with context %} -{% from 'macros/links.jinja2' import group_linked %} +{% from 'macros/links.jinja2' import link_to_group %} {% from 'macros/topics.jinja2' import render_topic_for_listing with context %} {% block title %}User: {{ user.username }}{% endblock %} @@ -108,7 +108,7 @@ {% else %} {{ post.topic.title }} {% endif %} - in {{ group_linked(post.topic.group.path) }} + in {{ link_to_group(post.topic.group) }} {{ render_single_comment(post) }} {% endif %}