{% load extra_filters_jinja %} {%- macro share(site = None, site_label = None, icon = False) -%} {% if icon == False %}{% if site_label %}{{ site_label }}{% else %}{{ site }}{% endif %}{% endif %} {%- endmacro -%} {%- macro follow_toggle(follow, name, alias, id) -%} {# follow - boolean; name - object type name; alias - e.g. users name; id - object id #}
{{ user.get_anonymous_name() }}
{% else %} {{ gravatar(user, 32) }} {{ user.get_profile_link()}}{{ user_country_flag(user) }}{%- if post.post_type == 'question' -%} {%- trans %}asked{% endtrans %} {% elif post.post_type == 'answer' %} {%- trans %}answered{% endtrans %} {% else %} {%- trans %}posted{% endtrans %} {% endif %} {{post.added_at|diff_date}}
{% trans %}This post is a wiki. Anyone with karma >{{wiki_min_rep}} is welcome to improve it.{% endtrans %}
{% else %}{# todo: access to class names needs to be removed here #} {% if post.post_type == 'question' %} {% trans %}asked{% endtrans %} {% elif post.post_type == 'answer' %} {% trans %}answered{% endtrans %} {% else %} {% trans %}posted{% endtrans %} {% endif %} {% if post.__class__.__name__ == 'PostRevision' %} {{post.revised_at|diff_date}} {% else %} {{post.added_at|diff_date}} {% endif %}
{{ post_contributor_avatar_and_credentials(post, post.author) }} {% endif %}{% trans %}updated{% endtrans %} {{ last_edited_at|diff_date }}
{% if original_author != update_author or is_wiki %} {{ post_contributor_avatar_and_credentials(post, update_author) }} {% endif %}{% set id = "id_" ~ name ~ "_" ~ choice[0] %}
{% endfor %} {%- endmacro -%} {%- macro question_summary(thread, question, extra_class=None, search_state=None) -%} {%include "widgets/question_summary.html" %} {%- endmacro -%} {# Warning! Any changes to the comment markup here must be duplicated in post.js for the purposes of the AJAX comment editor #} {%- macro add_or_show_comments_button(post = None, max_comments = None, widget_id = None) -%} {% if post.comment_count > max_comments %} {% set remaining_comment_count = post.comment_count - max_comments %} {% else %} {% set remaining_comment_count = 0 %} {% endif %} {%- endmacro -%} {%- macro post_comments_widget( post=None, show_post = None, show_comment = None, show_comment_position = None, user=None, max_comments=None ) -%} {% spaceless %} {% if post.comment_count > 0 %}