{% load base_tags %} {% load perm_tags %} {% load corporate_memberships_tags %} {% load i18n %} {% has_perm user corporate_memberships.change_corpmembership as can_edit %} {% allow_edit_corp opt_object user as allow_edit %} {% has_perm user corporate_memberships.delete_corpmembership as can_delete %}
{% if can_edit or allow_edit %} {% if opt_object.real_time_status_detail == 'expired - in grace period' %} {{ opt_object.real_time_status_detail|capfirst }} {% else %} {% if opt_object.status_detail == 'paid - pending approval'%} {{ opt_object.real_time_status_detail|capfirst }} {% else %} {% if opt_object.status_detail == 'archive'%} {% trans "This is Archive" %} {% with opt_object.corp_profile.corp_membership as current_corp_membership %} {% if current_corp_membership %} View Current {% endif %} {% endwith %} {% else %} {{ opt_object.real_time_status_detail|capfirst }} {% endif %} {% endif %} {% endif %} {% else %} {% if opt_object.status_detail == 'archive'%} {% trans "This is Archive" %} View Current {% endif %} {% endif %} {% if opt_object.status and opt_object.status_detail != 'archive' %} {% if allow_edit %} Edit {% endif %} {% if can_edit or allow_edit %} {% if request.user.is_authenticated %} {% trans "Roster" %} {% endif %} {% if can_delete %} {% trans "Delete" %} {% endif %} {% endif %} {% endif %}
{% if opt_object.is_renewal_pending %}
{% blocktrans with opt_object.renew_dt|date:"d-M-Y" as renewal %} Renewed on {{ renewal }} {% endblocktrans %}
{% trans "Status of Renewal: " %}{{ opt_object.status_detail }}
{% if request.user.is_superuser %} {% trans "Admin" %}: {% trans "Approve / Disapprove" %} {% endif %}
{% else %} {% if request.user.is_superuser and opt_object.is_join_pending %}
{% trans "Admin" %}: {% trans "Approve / Disapprove" %}
{% endif %} {% if opt_object.can_renew %} {% trans "Renew" %} {% else %} {% if opt_object.is_expired and request.user.is_superuser %} {% trans "Admin: Renew" %} {% endif %} {% endif %} {% endif %} {% if request.user.is_superuser and opt_object.status_detail == 'disapproved' %}
{% trans "Admin" %}: {% trans "approve it" %}
{% endif %}