mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added a corporation and member view to eve_api
This commit is contained in:
@@ -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>
|
||||
|
||||
30
templates/eve_api/corporation.html
Normal file
30
templates/eve_api/corporation.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user