mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-20 09:42:29 +02:00
* Initial testing of paplink functionality. More fancy interfaces coming. * Removed a invalid view reference. * Added a link on the front page. * Fixed some bad references and incorrect in game browser header usages. * Started work on statistics-pages. * Added an initial modify-paplink page where the pap itself can be deleted and characters removed. * Added a very simple statistics page. Also some name change for ~reasons~. * Small but crucial fix of syntax. * Added personal statistics page. * Corputils page now include fatlinkstats. * Added link to the personal statistics page. Moved other buttons for clarity. * Removed some unused code and imports * Added more statistics, and all corps in alliance are now visible even if no paps are registered. * Now requesting trust for the right domain. And some redundant imports and commented lines are removed.
218 lines
14 KiB
HTML
218 lines
14 KiB
HTML
{% extends "public/base.html" %}
|
|
{% load bootstrap %}
|
|
{% load staticfiles %}
|
|
|
|
{% block title %}Alliance Auth{% endblock %}
|
|
{% block page_title %}Corporation Member Tracking{% endblock page_title %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="col-lg-12">
|
|
<h1 class="page-header text-center">Corporation Member Data</h1>
|
|
<div class="col-lg-12 container" id="example">
|
|
{% if corp %}
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Corporation</div>
|
|
<div class="panel-body">
|
|
<div class="col-lg-5 col-sm-2">
|
|
<img class="ra-avatar img-responsive" src="https://image.eveonline.com/Corporation/{{ corp.corporation_id }}_128.png">
|
|
</div>
|
|
<div class="col-lg-7 col-sm-2">
|
|
<h4 class="">{{ corp.corporation_name }}</h4>
|
|
|
|
<p>Ticker: {{ corp.corporation_ticker }}</p>
|
|
|
|
<p>Member count: {{ corp.member_count }}</p>
|
|
|
|
<p>Player count: {{characters_with_api|length}}</p>
|
|
|
|
<p>Unregistered characters: {{characters_without_api|length|add:n_unacounted}}</p>
|
|
</div>
|
|
<div class="col-lg-12 col-sm-5">
|
|
<b>API Index:</b>
|
|
<div class="progress">
|
|
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="{{ n_registered }}" aria-valuemin="0" aria-valuemax="{{ corp.member_count }}" style="width: {% widthratio characters_with_api|length corp.member_count 100 %}%;">
|
|
{{n_registered}}/{{ corp.member_count }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<nav class="navbar navbar-default">
|
|
<div class="container-fluid">
|
|
<ul class="nav navbar-nav navbar-wide">
|
|
{% if membercorplist and perms.auth.alliance_apis %}
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Alliance corporations <span class="caret"></span></a>
|
|
<ul class="dropdown-menu scrollable">
|
|
{% for membercorpid, membercorpname in membercorplist %}
|
|
<li>
|
|
<a href="/corputils/{{ membercorpid }}">{{ membercorpname }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
<li style="float: right">
|
|
<p class="navbar-form">
|
|
Statistics for:
|
|
<a href="{% url 'auth_corputils_month' corp.corporation_id previous_month|date:"Y" previous_month|date:"m" %}">
|
|
<i class="fa fa-arrow-circle-left fa-fw grayiconecolor"></i>
|
|
</a>
|
|
{{ this_month|date:"M" }}, {{ this_month|date:"Y" }}
|
|
{% if next_month %}
|
|
<a href="{% url 'auth_corputils_month' corp.corporation_id next_month|date:"Y" next_month|date:"m" %}" >
|
|
<i class="fa fa-arrow-circle-right fa-fw grayiconecolor"></i>
|
|
</a>
|
|
<a href="{% url 'auth_corputils' %}" >
|
|
<i class="fa fa-angle-double-right fa-fw grayiconecolor"></i>
|
|
</a>
|
|
{% endif %}
|
|
</p>
|
|
</li>
|
|
<li style="float: right">
|
|
<p class="navbar-btn">
|
|
<a href="https://zkillboard.com/corporation/{{ corp.corporation_id }}/" class="btn btn-default" target="_blank">{{ corp.corporation_name }} Killboard</a>
|
|
</p>
|
|
</li>
|
|
<li style="float: right">
|
|
<form class="navbar-form navbar-left" role="search" action={% url 'auth_corputils_search' %}{{ corp.corporation_id }}/ method="POST">
|
|
<div class="form-group">
|
|
{% csrf_token %}
|
|
{{ search_form.as_table }}
|
|
</div>
|
|
<button class="btn btn-default" type="submit">Search</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<ul class="nav nav-tabs">
|
|
<li class="active"><a data-toggle="tab" href="#gotapi">Registered Main Characters <b>({{characters_with_api|length}})</b></a></li>
|
|
<li><a data-toggle="tab" href="#noapi">Characters without API <b>({{characters_without_api|length|add:n_unacounted}})</b></a></li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="gotapi" class="tab-pane fade in active">
|
|
{% if characters_with_api %}
|
|
<div class="panel-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-condensed table-hover table-striped">
|
|
<tr>
|
|
<th class="col-md-1"></th>
|
|
<th class="col-md-2">Main character</th>
|
|
<th class="col-md-2">Main corporation</th>
|
|
<th class="col-md-2">Character list</th>
|
|
<th class="col-md-1">Fats</th>
|
|
<th class="col-md-3">Killboard</th>
|
|
<th class="col-md-2">API JackKnife</th>
|
|
</tr>
|
|
{% for maincharname, player in characters_with_api %}
|
|
<tr >
|
|
<td>
|
|
<img src="http://image.eveonline.com/Character/{{ player.main.character_id }}_32.jpg" class="img-circle">
|
|
</td>
|
|
<td>
|
|
<p>{{ maincharname }}</p>
|
|
</td>
|
|
<td>
|
|
{% if not corp.corporation_name == player.maincorp%}
|
|
<span class="label label-danger">
|
|
{{ player.maincorp }}
|
|
</span>
|
|
{% else %}
|
|
<span class="label label-success">
|
|
{{ player.maincorp }}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% for char in player.altlist %}
|
|
<p>{{ char.character_name }}</p>
|
|
{% endfor %}
|
|
</td>
|
|
<td>
|
|
{{ player.n_fats }}
|
|
</td>
|
|
<td>
|
|
{% for char in player.altlist %}
|
|
<p><a href="https://zkillboard.com/character/{{ char.character_id }}/" class="label label-danger" target="_blank">Killboard</a></p>
|
|
{% endfor %}
|
|
</td>
|
|
<td>
|
|
{% for apiinfo in player.apilist %}
|
|
<p>
|
|
<a href="{{ JACK_KNIFE_URL }}?usid={{ apiinfo.api_id }}&apik={{ apiinfo.api_key }}"
|
|
target="_blank">
|
|
<button type="button" class="btn btn-primary">API JackKnife
|
|
</button>
|
|
</a>
|
|
</p>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-danger" role="alert">
|
|
<h3>Seems there are no characters in {{ corp.corporation_name }} tied to a registered API!</h3>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div id="noapi" class="tab-pane fade">
|
|
{% if characters_without_api %}
|
|
<div class="panel-body">
|
|
<div class="table-responsive">
|
|
{% if 0 < n_unacounted %}
|
|
<div class="alert alert-danger" role="alert">
|
|
<h3>There are atleast {{ n_unacounted }} characters not accounted for in EveWho.</h3>
|
|
</div>
|
|
{% endif %}
|
|
<table class="table table-condensed table-hover table-striped">
|
|
<tr>
|
|
<th class="col-md-1"></th>
|
|
<th class="col-md-2">Character</th>
|
|
<th class="col-md-5">Killboard</th>
|
|
</tr>
|
|
{% for character_name, character_id in characters_without_api %}
|
|
<tr>
|
|
<td>
|
|
<img src="http://image.eveonline.com/Character/{{ character_id }}_32.jpg" class="img-circle">
|
|
</td>
|
|
<td>
|
|
<p>{{ character_name }}</p>
|
|
</td>
|
|
<td>
|
|
<a href="https://zkillboard.com/character/{{ character_id }}/" class="label label-danger" target="_blank">Killboard</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-success" role="alert">
|
|
<h3>Good job! Every character in {{ corp.corporation_name }} seem to be tied to an API!</h3>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="container-fluid">
|
|
<div class="col-md-4 col-md-offset-4">
|
|
<div class="row">
|
|
<div class="alert alert-danger text-center" role="alert">No corporation model found. Contact your admin.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|