{%- 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(question, extra_class=None) -%} {%include "widgets/question_summary.html" %} {%- endmacro -%} {%- macro comment_votes(comment = None) -%}
{% 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) -%}
{% 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 -%}