{% if inbox_section != 'flags' %} {{ response.response_snippet }} {% endif %} {% if inbox_section == 'flags' %}
{% 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 inbox_post_snippet(response, inbox_section) -%}
{{ 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 %} {{ timeago(post.added_at) }}
{% 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' %} {{ timeago(post.revised_at) }} {% else %} {{ timeago(post.added_at) }} {% endif %}
{{ post_contributor_avatar_and_credentials( post, post.author, karma_mode = karma_mode, badges_mode = badges_mode ) }} {% endif %}{% trans %}updated{% endtrans %} {{ timeago(last_edited_at) }}
{% if original_author != update_author or is_wiki %} {{ post_contributor_avatar_and_credentials( post, update_author, karma_mode = karma_mode, badges_mode = badges_mode ) }} {% endif %}{% set id = "id_" ~ name ~ "_" ~ choice[0] %}
{% endfor %} {%- endmacro -%} {%- macro question_summary(thread, question, extra_class=None, search_state=None, visitor = 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 %}
{%- endmacro -%}
{%- macro user_country_flag(user) -%}
{% if user.country and user.show_country %}
{% endif %}
{%- endmacro -%}
{%- macro user_country_name_and_flag(user) -%}
{% if user.country and user.show_country %}
{{ user.country.name }}
{{ user_country_flag(user) }}
{% endif %}
{%- endmacro -%}
{%- macro user_full_location(user) -%}
{% if user.location %}
{{ user.location }},
{% endif %}
{{ user_country_name_and_flag(user) }}
{%- endmacro -%}
{%- macro user_list(
users, profile_section = None, karma_mode = None, badges_mode = None
)
-%}
{% include "widgets/user_list.html"%}
{%- endmacro -%}
{#todo: rename this to avatar #}
{%- macro gravatar(user, size) -%}
{% spaceless %}
0 %}
alt="{% trans new=moderation_items['new_count'], seen=moderation_items['seen_count']%}{{new}} new flagged posts and {{seen}} previous{% endtrans %}"
title="{% trans new=moderation_items['new_count'], seen=moderation_items['seen_count']%}{{new}} new flagged posts and {{seen}} previous{% endtrans %}"
{% else %}
alt="{% trans new=moderation_items['new_count'] %}{{new}} new flagged posts{% endtrans %}"
title="{% trans new=moderation_items['new_count'] %}{{new}} new flagged posts{% endtrans %}"
{% endif %}
/>
{% elif moderation_items['seen_count'] > 0 %}
{% endif %}
{% endif %}
{%- endmacro -%}
{%- macro timeago(datetime_object) -%}
{{datetime_object.replace(microsecond=0)|add_tz_offset}}
{%- endmacro -%}
{% macro one_shot_form_js(form=None, submit_button=None) %}
{% endmacro %}