wired up 'member actions' (un/follow, message OR edit profile) for project lead

This commit is contained in:
theinterned 2011-01-12 17:43:20 -05:00
Родитель 05052b256f
Коммит 2825250043
1 изменённых файлов: 17 добавлений и 3 удалений

Просмотреть файл

@ -103,8 +103,22 @@
</h3>
<div class="member-actions">
<a class="button" href="#">{{ _('Follow User') }}</a>
<a class="button" href="#">{{ _('Message') }}</a>
{% if project.created_by == user.get_profile %}
<a class="button" href="{% locale_url users_profile_edit %}">{{ _('Edit Profile') }}</a>
{% else %}
{% if project.created_by in user.get_profile.following %}
<form action="{% locale_url relationships_unfollow object_type='user' slug=project.created_by.username %}" method="post">
{% csrf_token %}
<button id="unfollow-user" >Unfollow User</button>
</form>
{% else %}
<form action="{% locale_url relationships_follow object_type='user' slug=project.created_by.username %}" method="post">
{% csrf_token %}
<button id="follow-user">Follow User</button>
</form>
{% endif %}
<a class="button" href="{% locale_url drumbeatmail_compose_to username=project.created_by.username %}">{{ _('Private Message')}}</a>
{% endif %}
</div>
</div> <!-- /.member-details -->