mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 00:56:19 +01:00
Merged corpstats and membertracking. Added two new permissions, corp_apis and alliance_apis.
This commit is contained in:
@@ -125,17 +125,10 @@
|
||||
{% endif %}
|
||||
|
||||
{% if perms.auth.corp_stats %}
|
||||
<li>
|
||||
<a {% ifequal request.path "/corporation_stats/" %} class="active" {% endifequal %}
|
||||
href="{% url 'auth_corp_stats' %}"><i
|
||||
class="fa fa-share-alt fa-fw grayiconecolor"></i> Corporation Stats</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if perms.auth.corputils %}
|
||||
<li>
|
||||
<a {% ifequal request.path "/corputils/" %} class="active" {% endifequal %}
|
||||
href="{% url 'auth_corp_member_view' %}"><i
|
||||
class="fa fa-chain fa-fw grayiconecolor"></i> Member Tracking</a>
|
||||
href="{% url 'auth_corputils' %}"><i
|
||||
class="fa fa-share-alt fa-fw grayiconecolor"></i> Corporation Stats</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
{% block page_title %}Corporation Stats{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">Corporation Stats</h1>
|
||||
{% if perms.auth.member %}
|
||||
<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="">Name: {{ corp.corporation_name }}</h4>
|
||||
|
||||
<p>Ticker: {{ corp.corporation_ticker }}</p>
|
||||
|
||||
<p>Member: {{ corp.member_count }}</p>
|
||||
|
||||
<p>Total Authed Members: {{ currentCount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Registered Characters</div>
|
||||
<div class="panel-body">
|
||||
<div style="height: 200px;overflow:-moz-scrollbars-vertical;overflow-y:auto;">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th class="text-center">Character Name</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
{% for key,value in characters.items %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<p class="">{{ key }}</p>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ JACK_KNIFE_URL }}?usid={{ value.api_id }}&apik={{ value.api_key }}"
|
||||
target="_blank">
|
||||
<button type="button" class="btn btn-primary">API JackKnife
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if IS_CORP %}
|
||||
<div class="alert alert-danger" role="alert">You are not in the corporation.</div>
|
||||
{% else %}
|
||||
<div class="alert alert-danger" role="alert">You are not in the alliance.</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -34,8 +34,8 @@
|
||||
<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="{{characters_with_api|length}}" aria-valuemin="0" aria-valuemax="{{ corp.member_count }}" style="width: {% widthratio characters_with_api|length corp.member_count 100 %}%;">
|
||||
{{characters_with_api|length}}/{{ corp.member_count }}
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="{{ nwithapi }}" aria-valuemin="0" aria-valuemax="{{ corp.member_count }}" style="width: {% widthratio characters_with_api|length corp.member_count 100 %}%;">
|
||||
{{ncharacters_with_api}}/{{ corp.member_count }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,7 +90,10 @@
|
||||
<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-5">Killboard</th>
|
||||
<th class="col-md-3">Killboard</th>
|
||||
{% if sent_apis %}
|
||||
<th class="col-md-2">API JackKnife</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for maincharname, player in characters_with_api %}
|
||||
<tr >
|
||||
@@ -121,6 +124,19 @@
|
||||
<p><a href="https://zkillboard.com/character/{{ char.character_id }}/" class="label label-danger" target="_blank">Killboard</a></p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
{% if sent_apis %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{% if perms.auth.corputils %}
|
||||
<h1 class="page-header text-center">Member Search Results
|
||||
</h1>
|
||||
<h2 class="text-center"><a href="{% url 'auth_corp_member_view' %}{{ corp.corporation_id }}">{{ corp.corporation_name }}</a></h2>
|
||||
<h2 class="text-center"><a href="{% url 'auth_corputils' %}{{ corp.corporation_id }}">{{ corp.corporation_name }}</a></h2>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="panel panel-default">
|
||||
@@ -34,19 +34,42 @@
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-hover table-striped">
|
||||
<tr>
|
||||
<th>Character</th>
|
||||
<th>Main Character</th>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-2">Character</th>
|
||||
<th class="col-md-2">Main character</th>
|
||||
<th class="col-md-5">Killboard</th>
|
||||
{% if sent_apis %}
|
||||
<th class="col-md-2">API JackKnife</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for member in members %}
|
||||
<tr {% if not member.api_registered%} {% endif %} >
|
||||
<td>{{ member.name }}{{ member.id }}</td>
|
||||
{% for result in results %}
|
||||
<tr >
|
||||
<td>
|
||||
{% if member.api_registered%}
|
||||
{{ member.main }}
|
||||
<img src="http://image.eveonline.com/Character/{{ result.id }}_32.jpg" class="img-circle">
|
||||
</td>
|
||||
<td>{{ result.name }}</td>
|
||||
<td>
|
||||
{% if result.api_registered%}
|
||||
{{ result.main }}
|
||||
{% else %}
|
||||
<span class="label label-danger">No API registered!</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="https://zkillboard.com/character/{{ result.char.character_id }}/" class="label label-danger" target="_blank">Killboard</a></p>
|
||||
</td>
|
||||
|
||||
{% if sent_apis %}
|
||||
<td>
|
||||
{% if result.api_registered %}
|
||||
<a href="{{ JACK_KNIFE_URL }}?usid={{ result.apiinfo.api_id }}&apik={{ result.apiinfo.api_key }}"
|
||||
target="_blank">
|
||||
<button type="button" class="btn btn-primary">API JackKnife
|
||||
</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user