Unify profile tiles

This commit is contained in:
Trever Fischer
2012-04-21 12:09:50 -04:00
parent 43a7d8c66f
commit 9dc7d548ae
7 changed files with 85 additions and 46 deletions

View File

@@ -9,7 +9,7 @@
<h2>{{group}}</h2>
<ul class='profile-list'>
{% for user in group.user_set.all %}
<li><a href="{% url local.views.profile username=user.username %}">{% avatar user %}<p>{{user}}</p></a></li>
<li>{% include '_profile_tile.html' with user=user %}</li>
{% endfor %}
</ul>
<br style="clear:both"/>
@@ -17,7 +17,7 @@
<h2>All Players</h2>
<ul class='profile-list'>
{% for user in profiles %}
<li><a href="{% url local.views.profile username=user.username %}">{% avatar user %}<p>{{user}}</p></a></li>
<li>{% include '_profile_tile.html' with user=user %}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@@ -1,5 +1,14 @@
{% extends "profile_base.html" %}
{% extends "base_with_nav.html" %}
{% load minecraft %}
{% block localnav %}
{% if user == profile %}
<ul>
<li><a href="{%url local.views.edit %}">Edit profile</a></li>
</ul>
{% endif %}
{% endblock%}
{%block title%}{{profile}}{%endblock%}
{% block sectiontitle %}{{profile}}{%endblock%}
@@ -7,9 +16,6 @@
{%block content %}
<div class="item">
<div class="avatar">{% avatar profile 128 %}</div>
{% if user == profile %}
<a href="{%url local.views.edit %}">Edit profile</a>
{% endif %}
<ul>
<li>Member Since: {{profile.date_joined|date:"SHORT_DATE_FORMAT"}}</li>
<li>Last seen: {{profile.last_login|date:"SHORT_DATE_FORMAT"}}</li>