mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 08:36:23 +01:00
Move templates and urls to apps.
Implement url hooks. Many apps are now removable. Default to assuming services have been migrated.
This commit is contained in:
55
srp/templates/srp/add.html
Normal file
55
srp/templates/srp/add.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth - SRP Fleet Create{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "SRP Fleet Create" %}{% endblock page_title %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create SRP Fleet" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if completed == False %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create SRP Fleet" %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">{% blocktrans %}Give this link to the line members{% endblocktrans %}.</div>
|
||||
<div class="alert alert-info" role="alert">
|
||||
http://{{ request.get_host }}{% url 'srp:request' completed_srp_code %}</div>
|
||||
<div class="text-center">
|
||||
<a href="{% url 'srp:management' %}" class="btn btn-primary btn-lg">{% trans "Continue" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
$('#id_fleet_time').datetimepicker({
|
||||
maskInput: true,
|
||||
format: 'Y-m-d H:i'
|
||||
});
|
||||
|
||||
{% endblock extra_script %}
|
||||
208
srp/templates/srp/data.html
Normal file
208
srp/templates/srp/data.html
Normal file
@@ -0,0 +1,208 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load humanize %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Srp Fleet Data{% endblock page_title %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/x-editable.css.html' %}
|
||||
<link href="{% static 'css/checkbox.css' %}" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
.radio label, .checkbox label {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.editable {
|
||||
width:150px;
|
||||
text-align: center;
|
||||
}
|
||||
.editableform .form-control {
|
||||
width: 95%;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.editable-input {
|
||||
width: 95%;
|
||||
}
|
||||
.radio, .checkbox {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.editable-error-block {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.editable-click, a.editable-click, a.editable-click:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
.tooltip-inner {
|
||||
white-space:pre;
|
||||
max-width: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% trans "SRP Fleet Data" %}
|
||||
<div class="text-right">
|
||||
{% if perms.auth.srp_management %}
|
||||
{% if fleet_status == "Completed" %}
|
||||
<a href="{% url 'srp:mark_uncompleted' fleet_id %}" class="btn btn-warning">
|
||||
{% trans "Mark Incomplete" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'srp:mark_completed' fleet_id %}" class="btn btn-success">
|
||||
{% trans "Mark Completed" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
{% if srpfleetrequests %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b><span style="padding-right:2.5em">{% trans "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'srp:request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'srp:request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% trans "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'srp:request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Pilot Name" %}</th>
|
||||
<th class="text-center">{% trans "Killboard Link" %}</th>
|
||||
<th class="text-center">{% trans "Additional Info" %}</th>
|
||||
<th class="text-center">{% trans "Ship Type" %}</th>
|
||||
<th class="text-center">{% trans "Killboard Loss Amt" %}</th>
|
||||
<th class="text-center">{% trans "SRP ISK Cost" %}
|
||||
{% blocktrans %}<i class="glyphicon glyphicon-question-sign" rel="tooltip" title="Click value to edit
|
||||
Enter to save&next
|
||||
ESC to cancel"
|
||||
id="blah"></i></th>{% endblocktrans %}
|
||||
<th class="text-center">{% trans "Post Time" %}</th>
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
{% if perms.auth.srp_management %}
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for srpfleetrequest in srpfleetrequests %}
|
||||
<tr>
|
||||
<td class="text-center">{{ srpfleetrequest.character.character_name }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ srpfleetrequest.killboard_link }}"
|
||||
target="_blank" class="label label-warning">Link</a>
|
||||
</td>
|
||||
<td class="text-center">{{ srpfleetrequest.additional_info }}</td>
|
||||
<td class="text-center">{{ srpfleetrequest.srp_ship_name }}</td>
|
||||
<td class="text-center">{{ srpfleetrequest.kb_total_loss | intcomma }} ISK</td>
|
||||
<td class="srp" data-name="srp_total_amount" data-type="number" data-pk="{{srpfleetrequest.id}}" data-url="{% url 'srp:request_update_amount' srpfleetrequest.id %}" data-params="{csrfmiddlewaretoken:'{{csrf_token}}'}" class="text-center">{{ srpfleetrequest.srp_total_amount | intcomma }} ISK</td>
|
||||
<td class="text-center">{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }}</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleetrequest.srp_status == "Approved" %}
|
||||
<div class="label label-success">
|
||||
{% trans "Approved" %}
|
||||
</div>
|
||||
{% elif srpfleetrequest.srp_status == "Rejected" %}
|
||||
<div class="label label-danger">
|
||||
{% trans "Rejected" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="label label-warning">
|
||||
{% trans "Pending" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if perms.auth.srp_management %}
|
||||
<td class="text-center">
|
||||
<div class="checkbox">
|
||||
<label style="font-size: 1.5em">
|
||||
<input type="checkbox" name="{{srpfleetrequest.id}}">
|
||||
<span class="cr"><i class="cr-icon fa fa-check"></i></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b><span style="padding-right:2.5em">{% trans "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'srp:request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'srp:request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% trans "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'srp:request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No SRP requests for this fleet." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/x-editable-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function() {
|
||||
$.fn.editable.defaults.mode = 'inline';
|
||||
$.fn.editable.defaults.showbuttons = false;
|
||||
$.fn.editable.defaults.highlight = "#AAFF80";
|
||||
|
||||
|
||||
$('.srp').editable({
|
||||
display: function(value, response) {
|
||||
return false;
|
||||
},
|
||||
success: function(response, newValue) {
|
||||
newValue = parseInt(newValue);
|
||||
newvalue = newValue.toLocaleString() + " ISK";
|
||||
$(this).html(newvalue.bold());
|
||||
},
|
||||
validate: function(value) {
|
||||
if (value === null || value === '') {
|
||||
return 'Empty values not allowed';
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.srp').on('hidden', function(e, reason){
|
||||
if(reason === 'save' || reason === 'nochange') {
|
||||
var $next = $(this).closest('tr').next().find('.editable');
|
||||
setTimeout(function() {
|
||||
$next.editable('show');
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$("[rel=tooltip]").tooltip({ placement: 'top'});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
125
srp/templates/srp/management.html
Normal file
125
srp/templates/srp/management.html
Normal file
@@ -0,0 +1,125 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load humanize %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Srp Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% trans "SRP Management" %}
|
||||
<div class="text-right">
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'srp:all' %}" class="btn btn-primary">
|
||||
{% trans "View All" %}
|
||||
</a>
|
||||
<a href="{% url 'srp:add' %}" class="btn btn-success">
|
||||
{% trans "Add SRP Fleet" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b>{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</b>
|
||||
</div>
|
||||
</div>
|
||||
{% if srpfleets %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Fleet Name" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Time" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Doctrine" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Commander" %}</th>
|
||||
<th class="text-center">{% trans "Fleet AAR" %}</th>
|
||||
<th class="text-center">{% trans "Fleet SRP Code" %}</th>
|
||||
<th class="text-center">{% trans "Fleet ISK Cost" %}</th>
|
||||
<th class="text-center">{% trans "SRP Status" %}</th>
|
||||
<th class="text-center">{% trans "Pending Requests" %}</th>
|
||||
<th width="100px" class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for srpfleet in srpfleets %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<div class="label label-info">
|
||||
{{ srpfleet.fleet_name }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">{{ srpfleet.fleet_time | date:"Y-m-d H:i" }}</td>
|
||||
<td class="text-center">{{ srpfleet.fleet_doctrine }}</td>
|
||||
<td class="text-center">
|
||||
<div class="label label-success">
|
||||
{{ srpfleet.fleet_commander.character_name }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_aar_link %}
|
||||
<a href="{{ srpfleet.fleet_srp_aar_link }}" target="_blank" class="label label-primary">{% trans 'Link' %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a class="label label-warning" href="{% url 'srp:request' srpfleet.fleet_srp_code %}">{{ srpfleet.fleet_srp_code }}</a>
|
||||
{% else %}
|
||||
<div class="label label-danger">
|
||||
{% trans "Disabled" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">ISK: {{ srpfleet.total_cost | intcomma }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_status == "" %}
|
||||
<div class="label label-warning">
|
||||
{% trans "Pending" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="label label-success">
|
||||
{% trans "Completed" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="label label-warning">{{ srpfleet.pending_requests }}</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
|
||||
<a href="{% url 'srp:fleet' srpfleet.id %}" class="btn btn-primary" title="View">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'srp:edit' srpfleet.id %}" class="btn btn-info" title="Edit">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
|
||||
<a href="{% url 'srp:remove' srpfleet.id %}" onclick="return confirm('{% trans "Are you sure you want to delete this SRP code and its contents?" %}')" class="btn btn-danger" title="Remove">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a href="{% url 'srp:disable' srpfleet.id %}" class="btn btn-warning" title="Disable">
|
||||
<span class="glyphicon glyphicon-remove-sign"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'srp:enable' srpfleet.id %}" class="btn btn-success" title="Enable">
|
||||
<span class="glyphicon glyphicon-ok-sign"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No SRP fleets created." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
31
srp/templates/srp/request.html
Normal file
31
srp/templates/srp/request.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}SRP Request{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "SRP Request" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create SRP Request" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create SRP Request" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
35
srp/templates/srp/update.html
Normal file
35
srp/templates/srp/update.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth - Update AAR Link{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Update AAR Link" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Update AAR Link" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if no_fleet_id %}
|
||||
<div class="alert alert-danger" role="alert">{% trans "SRP Fleet Does Not Exist" %}</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Update AAR Link" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user