{# Table for showing AuthAttempts with a variable set of columns #} {% load humanize %} {% load gameui %} {% load shortnaturaltime %}
When
{% if view_as_defender %} Attacker {% elif view_as_attacker %} Defender {% else %} {# Empty column just to sponge up space in self-attack table #} {% endif %}
Won
{% if not view_as_self %}
Gain
{% endif %}
{% for auth_attempt in auth_attempts %}
{{ auth_attempt.timestamp|shortnaturaltime }} ago
{% if view_as_defender %} {% pretty_account_link my_account=my_account target_account=auth_attempt.attacking_account %} {% elif view_as_attacker %} {% pretty_account_link my_account=my_account target_account=auth_attempt.defending_account %} {% elif view_as_self %} {# Also empty (sponge up space) #} {% endif %}
{{ auth_attempt.was_successful|yesno:"Yes,No" }}
{% if not view_as_self %}
{% include "pretty_money_delta.html" with money_delta=auth_attempt.net_transfer_amount %}
{% endif %}
{% if view_as_defender or view_as_self %} {% endif %} {% if not view_as_self %} {% endif %}
Opening defense {% include "text_or_empty.html" with text=auth_attempt.defense_pre_prompt %}
Access code {% include "text_or_empty.html" with text=auth_attempt.access_code %}
Closing defense {% include "text_or_empty.html" with text=auth_attempt.defense_post_prompt %}
Attack {% include "text_or_empty.html" with text=auth_attempt.attacker_input %}
AI output {% include "text_or_empty.html" with text=auth_attempt.llm_output %}
{% empty %}
No attacks to show.
{% endfor %}