Added new features to srp app, including the total amounts for everything

This commit is contained in:
Raynaldo Rivera
2014-11-27 23:41:42 -07:00
parent ab8efdb2c1
commit 6c991dfce5
8 changed files with 146 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load humanize %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}Srp Fleet Data{% endblock page_title %}
@@ -25,11 +25,19 @@
{% endif %}
</div>
</h1>
<div class="alert alert-info" role="alert">
<div class="text-right">
<b>Total Losses: {{ srpfleetrequests.count }}</b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b>Total ISK Cost: {{ totalcost | intcomma }}</b>
</div>
</div>
<table class="table table-bordered">
<tr>
<th class="text-center">Pilot Name</th>
<th class="text-center">Killboard Link</th>
<th class="text-center">Additional Info</th>
<th class="text-center">SRP ISK Cost</th>
<th class="text-center">Status</th>
{% if perms.auth.srp_management %}
<th class="text-center">Actions</th>
@@ -47,6 +55,7 @@
target="_blank">{{ srpfleetrequest.killboard_link }}</a>
</td>
<td class="text-center">{{ srpfleetrequest.additional_info }}</td>
<td class="text-center">ISK: {{ srpfleetrequest.srp_total_amount | intcomma }}</td>
<td class="text-center">
{% if srpfleetrequest.srp_status == "Approved" %}
<div class="label label-success">
@@ -65,6 +74,10 @@
{% if perms.auth.srp_management %}
<td class="text-center">
<a href="/srp_request_amount_update/{{ srpfleetrequest.id }}">
<button type="button" class="btn btn-info"><span
class="glyphicon glyphicon-pencil"></span></button>
</a>
<a href="/srp_request_approve/{{ srpfleetrequest.id }}">
<button type="button" class="btn btn-success"><span
class="glyphicon glyphicon-ok"></span></button>

View File

@@ -0,0 +1,45 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% block title %}Alliance Auth - Update SRP Amount{% endblock %}
{% block page_title %}Update SRP Amount{% endblock page_title %}
{% block extra_css %}
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">Update SRP Amount</h1>
<div class="container-fluid">
<div class="col-md-4 col-md-offset-4">
<div class="row">
{% if no_srp_code %}
<div class="alert alert-danger" role="alert">SRP Code 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">Update SRP Request Amount
</button>
</form>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock content %}
{% block extra_script %}
$('#id_fleet_time').datetimepicker({
maskInput: true,
format: 'Y-m-d H:i',minDate:0
});
{% endblock extra_script %}

View File

@@ -1,7 +1,7 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load humanize %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}Srp Management{% endblock page_title %}
@@ -17,11 +17,16 @@
<button type="button" class="btn btn-primary">View All</button>
</a>
<a href="{% url 'auth_srp_fleet_add_view' %}">
<button type="button" class="btn btn-success">Add SRP Fleet</button>
<button type="button" class="btn btn-success">Add SRP Fleet</button>
</a>
{% endif %}
</div>
</h1>
<div class="alert alert-info" role="alert">
<div class="text-right">
<b>Total ISK Cost: {{ totalcost | intcomma }}</b>
</div>
</div>
<table class="table table-bordered">
<tr>
<th class="text-center">Fleet Name</th>
@@ -29,6 +34,7 @@
<th class="text-center">Fleet Doctrine</th>
<th class="text-center">Fleet Commander</th>
<th class="text-center">Fleet SRP Code</th>
<th class="text-center">Fleet ISK Cost</th>
<th class="text-center">SRP Status</th>
<th class="text-center">Actions</th>
</tr>
@@ -53,6 +59,17 @@
target="_blank">{{ srpfleet.fleet_srp_code }}</a>
</div>
</th>
<td class="text-center">
{% for key,value in price_pair.items %}
{% if key == srpfleet.id %}
ISK: {{ value | intcomma }}
{% endif %}
{% endfor %}
</td>
<td class="text-center">
{% if srpfleet.fleet_srp_status == "" %}
<div class="label label-warning">