Added a corporation and member view to eve_api

This commit is contained in:
2011-01-13 16:24:31 +00:00
parent c2ea3f09b0
commit 0aa29b031e
6 changed files with 58 additions and 5 deletions

View File

@@ -8,7 +8,7 @@
<table>
<tr><th>Character Name</th><th>Corporation</th><th>Alliance</th></tr>
{% for char in characters %}
<tr><td><a href="{% url sso.views.characters char.id %}">{{ char.name }}</a></td>
<tr><td><a href="{% url eveapi-character char.id %}">{{ char.name }}</a></td>
<td>{{ char.corporation }}</td>
<td>{% if char.corporation.alliance %}{{ char.corporation.alliance }}{% endif %}</td>
</tr>

View File

@@ -0,0 +1,30 @@
{% extends "base.html" %}
{% load humanize %}
{% load naturaltimediff %}
{% load pagination_tags %}
{% block content %}
<div class="corporation_info">
<h1>{{ corporation.name }}</h1>
<ul>
<li><b>Member Count:</b> {{ corporation.member_count }}</li>
<li><b>Known Members:</b> {{ corporation.eveplayercharacter_set.all.count }}</li>
</ul>
{% if view_members %}
<table>
<tr><th>Name</th><th>Join Date</th></tr>
{% autopaginate members 10 %}
{% for char in members %}
<tr><td><a href="{% url eveapi-character char.id %}">{{ char.name }}</a></td><td>{{ char.corporation_date }}</td></tr>
{% endfor %}
</table>
{% paginate %}
{% endif %}
</div>
{% endblock %}