mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-07 23:56:23 +01:00
Added search functionality to member list.
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
</li>
|
||||
{% if IS_CORP %}
|
||||
<li>
|
||||
<a {% ifequal request.path "/corp_utils/" %} class="active" {% endifequal %}
|
||||
<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>
|
||||
</li>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
{% block page_title %}Corporation Stats{% endblock page_title %}
|
||||
{% load bootstrap %}
|
||||
{% load corputils_extras %}
|
||||
|
||||
{% 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>
|
||||
{% if perms.auth.member %}
|
||||
{% if perms.auth.corp_stats %}
|
||||
<div class="col-lg-12 container" id="example">
|
||||
{% if corp %}
|
||||
<div class="row">
|
||||
@@ -32,6 +34,13 @@
|
||||
|
||||
<p>Unregistered characters: {{characters_without_api|length}}</p>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
Search Members
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,4 +102,31 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.corp_stats %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Member Search</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_corputils_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
71
stock/templates/registered/corputilssearchview.html
Normal file
71
stock/templates/registered/corputilssearchview.html
Normal file
@@ -0,0 +1,71 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load corputils_extras %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Corporation Member Tracking{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
{% if perms.auth.corp_stats %}
|
||||
<h1 class="page-header text-center">Member Search Results
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
Search Members
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">Character</th>
|
||||
<th class="text-center">Main Character</th>
|
||||
</tr>
|
||||
{% for member in members %}
|
||||
<tr {% if not member.api_registered%} bgcolor="#DD5500" {% endif %} >
|
||||
<td class="text-center">{{ member.name }}</td>
|
||||
<td class="text-center">
|
||||
{% if member.api_registered%}
|
||||
{{ member.main }}
|
||||
{% else %}
|
||||
No API registered!
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.corp_stats %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Member Search</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_corputils_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user