{% load i18n admin_extras favorites %} {% if ct_id %}
{% csrf_token %} {% if fav %} {% else %} {% endif %}
{% endif %} {% if model.admin_url %} {{ fav.custom_label|default:model.name }} {% else %} {{ fav.custom_label|default:model.name }} {% endif %} {% if show_model_badges %} {% if model.object_name == 'RFID' %} {% rfid_release_stats as rfid_stats %} {% if rfid_stats %} {% blocktranslate with released_allowed=rfid_stats.released_allowed registered=rfid_stats.total asvar rfid_badge_label trimmed %} {{ released_allowed }} released and allowed RFIDs out of {{ registered }} registered RFIDs {% endblocktranslate %} {{ rfid_stats.released_allowed }} / {{ rfid_stats.total }} {% endif %} {% endif %} {% if model.object_name == 'Charger' %} {% charger_availability_stats as charger_stats %} {% if charger_stats %} {% if charger_stats.available_missing_cp_number %} {% blocktranslate with available=charger_stats.available_with_cp_number total=charger_stats.available_total missing=charger_stats.available_missing_cp_number asvar charger_badge_label trimmed %} {{ available }} chargers reporting Available status with a CP number, out of {{ total }} total Available chargers. {{ missing }} Available chargers are missing a connector letter. {% endblocktranslate %} {% else %} {% blocktranslate with available=charger_stats.available_with_cp_number total=charger_stats.available_total asvar charger_badge_label trimmed %} {{ available }} chargers reporting Available status with a CP number. {% endblocktranslate %} {% endif %} {{ charger_stats.available_with_cp_number }} / {{ charger_stats.available_total }} {% endif %} {% endif %} {% lead_open_count app_label model.object_name as lead_open_count %} {% if lead_open_count is not None %} {% blocktranslate count open_count=lead_open_count asvar lead_open_label trimmed %} {{ open_count }} open lead {% plural %} {{ open_count }} open leads {% endblocktranslate %} {{ lead_open_count }} {% endif %} {% if model.object_name == 'Node' %} {% node_known_count as node_known_total %} {% if node_known_total is not None %} {% blocktranslate count node_total=node_known_total asvar node_known_label trimmed %} {{ node_total }} node known to this deployment {% plural %} {{ node_total }} nodes known to this deployment {% endblocktranslate %} {{ node_known_total }} {% endif %} {% endif %} {% model_rule_status app_label model.object_name as model_rule %} {% if model_rule %} {{ model_rule.message }} {% endif %} {% endif %} {% if model.admin_url and show_changelinks %} {% model_admin_actions app_label model.object_name as extra_actions %} {% for action in extra_actions %} {{ action.label }}{% if not forloop.last %} {% endif %} {% endfor %} {% else %} {% endif %} {% if model.add_url %} {% translate 'Add' %} {% else %} {% endif %} {% if model.admin_url and show_changelinks %} {% if model.view_only %} {% translate 'View' %} {% else %} {% translate 'Change' %} {% endif %} {% elif show_changelinks %} {% endif %}