Skip to content

Commit

Permalink
Merge in changes from master of il2 stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGlazov committed Jun 10, 2021
1 parent 114d5c4 commit ef5d306
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 27 deletions.
64 changes: 60 additions & 4 deletions src/mod_rating_by_type/templates/pilot_sortie.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,66 @@
<div class="right">&nbsp;</div>
</div>

{% if sortie.killboard_pve.tank_heavy %}
{% if sortie.killboard_pvp.tank_heavy %}
<div class="sub_row">
<div class="left">
{% trans 'Heavy Tanks' context 'total' %}
<span>{{ sortie.killboard_pvp.tank_heavy }}</span>
</div>
<div class="right score">
{{ sortie.killboard_pvp.tank_heavy }}
&times;
{{ score_dict.tank_heavy.ai }}
</div>
</div>
{% endif %}

{% if sortie.killboard_pvp.tank_medium %}
<div class="sub_row">
<div class="left">
{% trans 'Medium Tanks' context 'total' %}
<span>{{ sortie.killboard_pvp.tank_medium }}</span>
</div>
<div class="right score">
{{ sortie.killboard_pvp.tank_medium }}
&times;
{{ score_dict.tank_medium.ai }}
</div>
</div>
{% endif %}

{% if sortie.killboard_pvp.tank_light %}
<div class="sub_row">
<div class="left">
{% trans 'Light Tanks' context 'total' %}
<span>{{ sortie.killboard_pvp.tank_light }}</span>
</div>
<div class="right score">
{{ sortie.killboard_pvp.tank_light }}
&times;
{{ score_dict.tank_light.ai }}
</div>
</div>
{% endif %}

{% if sortie.killboard_pvp.truck %}
<div class="sub_row">
<div class="left">
{% trans 'Trucks' context 'total' %}
<span>{{ sortie.killboard_pvp.truck }}</span>
</div>
<div class="right score">
{{ sortie.killboard_pvp.truck }}
&times;
{{ score_dict.truck.ai }}
</div>
</div>
{% endif %}

{% if sortie.killboard_pve.tank_heavy %}
<div class="sub_row">
<div class="left">
{% trans 'Heavy Tanks' context 'total' %} ({% trans 'AI' context 'total' %})
<span>{{ sortie.killboard_pve.tank_heavy }}</span>
</div>
<div class="right score">
Expand All @@ -296,7 +352,7 @@
{% if sortie.killboard_pve.tank_medium %}
<div class="sub_row">
<div class="left">
{% trans 'Medium Tanks' context 'total' %}
{% trans 'Medium Tanks' context 'total' %} ({% trans 'AI' context 'total' %})
<span>{{ sortie.killboard_pve.tank_medium }}</span>
</div>
<div class="right score">
Expand All @@ -310,7 +366,7 @@
{% if sortie.killboard_pve.tank_light %}
<div class="sub_row">
<div class="left">
{% trans 'Light Tanks' context 'total' %}
{% trans 'Light Tanks' context 'total' %} ({% trans 'AI' context 'total' %})
<span>{{ sortie.killboard_pve.tank_light }}</span>
</div>
<div class="right score">
Expand Down Expand Up @@ -353,7 +409,7 @@
<div class="sub_row">
<div class="left">
{% trans 'Trucks' context 'total' %}
<span>{{ sortie.killboard_pve.truck }}</span>
<span>{{ sortie.killboard_pve.truck }} ({% trans 'AI' context 'total' %})</span>
</div>
<div class="right score">
{{ sortie.killboard_pve.truck }}
Expand Down
66 changes: 47 additions & 19 deletions src/mod_rating_by_type/templates/pilot_vlife.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,54 @@
<div class="num">{{ vlife.gk_total }}</div>
</div>

{% if vlife.killboard_pve.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pve.tank_heavy }}</div>
</div>
{% endif %}
{% if vlife.killboard_pvp.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pvp.tank_heavy }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pve.tank_medium }}</div>
</div>
{% endif %}
{% if vlife.killboard_pvp.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pvp.tank_medium }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pve.tank_light }}</div>
</div>
{% endif %}
{% if vlife.killboard_pvp.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pvp.tank_light }}</div>
</div>
{% endif %}

{% if vlife.killboard_pvp.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="num">{{ vlife.killboard_pvp.truck }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ vlife.killboard_pve.tank_heavy }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ vlife.killboard_pve.tank_medium }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ vlife.killboard_pve.tank_light }}</div>
</div>
{% endif %}

{% if vlife.killboard_pve.armoured_vehicle %}
<div class="sub_item">
Expand All @@ -217,7 +245,7 @@

{% if vlife.killboard_pve.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="name">{% trans 'Trucks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ vlife.killboard_pve.truck }}</div>
</div>
{% endif %}
Expand Down
36 changes: 32 additions & 4 deletions src/mod_rating_by_type/templates/squad.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,51 @@
<div class="num">{{ squad.gk_total }}</div>
</div>

{% if squad.killboard_pve.tank_heavy %}
{% if squad.killboard_pvp.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %}</div>
<div class="num">{{ squad.killboard_pvp.tank_heavy }}</div>
</div>
{% endif %}

{% if squad.killboard_pvp.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="num">{{ squad.killboard_pvp.tank_medium }}</div>
</div>
{% endif %}

{% if squad.killboard_pvp.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="num">{{ squad.killboard_pvp.tank_light }}</div>
</div>
{% endif %}

{% if squad.killboard_pvp.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="num">{{ squad.killboard_pvp.truck }}</div>
</div>
{% endif %}

{% if squad.killboard_pve.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ squad.killboard_pve.tank_heavy }}</div>
</div>
{% endif %}

{% if squad.killboard_pve.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="name">{% trans 'Medium Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ squad.killboard_pve.tank_medium }}</div>
</div>
{% endif %}

{% if squad.killboard_pve.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="name">{% trans 'Light Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ squad.killboard_pve.tank_light }}</div>
</div>
{% endif %}
Expand All @@ -234,7 +262,7 @@

{% if squad.killboard_pve.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="name">{% trans 'Trucks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ squad.killboard_pve.truck }}</div>
</div>
{% endif %}
Expand Down

0 comments on commit ef5d306

Please sign in to comment.