{% extends "profiles/base.html" %} {% load i18n %} {% load account_tags %} {% load avatar_tags %} {% load uni_form_tags %} {% load group_tags %} {% load microblogging_tags %} {% load blog_tags %} {% load tagging_tags %} {% load photo_tags %} {% load threadedcommentstags %} {% block head_title %}{% user_display other_user as other_user_display %}{% blocktrans %}Profile for {{ other_user_display }}{% endblocktrans %}{% endblock %} {% block body %} {% user_display other_user as other_user_display %}
{% include "profiles/profile_right_panel.html" %}
Photo of {{ other_user }}
{% if is_me %} (replace) {% endif %}
{% if other_user.get_profile.name %}

{% blocktrans %}Profile for {{ other_user_display }}{% endblocktrans %}

{% else %}

{% blocktrans %}Profile for {{ other_user_display }}{% endblocktrans %}

{% endif %}
{% if other_user.get_profile.name %}

{% trans "Name" %}: {{ other_user.get_profile.name }}

{% endif %} {% if other_user.get_profile.about %}

{% trans "About" %}: {{ other_user.get_profile.about }}

{% endif %} {% if other_user.get_profile.location%}

{% trans "Location" %}: {{ other_user.get_profile.location }}

{% endif %} {% if other_user.get_profile.website %}

{% trans "Website" %}: {{ other_user.get_profile.website }}

{% endif %}
{% if is_me %}

Edit profile

{% endif %} {% if user.is_authenticated %}

{% trans "Followers" %}: {% follower_count other_user %} {% trans "Following" %}: {% following_count other_user %}

{% if is_me %} {% else %} {# @@@ this could be done with ajax, or at the very least turned into an inclusion tag #}
{% csrf_token %} {% if is_following %} {% else %} {% endif %}
{# @@@ this should be an inclusion tag #} {% if is_friend %}

{% blocktrans %}You are friends with {{ other_user_display }}.{% endblocktrans %} {% trans "Send a message" %}.

{% csrf_token %}
{% else %} {% if previous_invitations_from %}

{% blocktrans %}{{ other_user_display }} has requested friendship.{% endblocktrans %}

{% for invitation in previous_invitations_from %}

From {% user_display invitation.from_user %} ({{ invitation.sent }}):

{{ invitation.message }}

{% csrf_token %}
{% endfor %} {% else %} {% if previous_invitations_to %}

{% trans "Friendship request sent." %}

{% else %}

{% trans "Add As Friend" %}

{% csrf_token %}
{{ invite_form|as_uni_form }}
{% blocktrans %}{{ other_user_display }} to be a friend.{% endblocktrans %}
{% endif %} {# previous_invitations_to #} {% endif %} {# previous_invitations_from #} {% endif %} {# is_friend #} {% endif %} {# is me #}

{% trans "Wiki Articles" %}

{% if other_user.article_set.all %} {% for article in other_user.article_set.all %} {% endfor %}
{{ article.created_at|date }}

{{ article.title }}

{{ article.content|truncatewords:25 }}
{% else %}

{% trans "No wiki articles yet." %}

{% endif %}

{% trans "Bookmarks" %}

{% if other_user.saved_bookmarks.all %} {% for bookmark_instance in other_user.saved_bookmarks.all.select_related %} {% endfor %}
{{ bookmark_instance.saved|date }} {# add who originally added it and when #}

{{ bookmark_instance.description }}

{% if bookmark_instance.bookmark.get_favicon_url %} {% endif %}{{ bookmark_instance.bookmark.url }}
{{ bookmark_instance.note|linebreaks }}
{% else %} {% url add_bookmark as add_bookmark_url %}

{% blocktrans %}You haven't added any bookmarks yet.{% endblocktrans %}

{% endif %}

{% trans "Blog Posts" %}

{% if other_user.added_posts.all %} {% for blog_post in other_user.added_posts.all %} {% show_blog_post blog_post %} {% endfor %} {% else %} {% trans "No blog posts yet." %} {% endif %}

{% trans "Tweets" %}

{% if user.is_authenticated and is_me %} {% sent_tweet_listing user 0 is_me %} {% else %} {% sent_tweet_listing other_user 0 is_me %} {% endif %}

{% trans "Photos" %}

{% public_photos for other_user as photos %} {% if photos %}
{% for photo in photos %} {% endfor %}
{% else %} {% trans "No photos uploaded yet." %} {% endif %} {% else %} {# not user.is_authenticated #} {% url acct_signup as signup_url %} {% url acct_login as login_url %}

{% blocktrans %}Sign up and log in to add this person as a friend and see their tweets and blog posts.{% endblocktrans %}

{% endif %}
{% endblock %} {% block extra_body %} {% endblock %}