{% extends 'base.html' %} {% load custom_tags_and_filters %} {% block title %}Accounts and projects{% endblock %} {% block content %}
Accounts and projects
{% button type="add" value="New project" url="create_project" %} {% button type="add" value="New account" url="create_account" %}
{% if account %}
{% if not selected_project %}

{{ account }}
{% csrf_token %} {# Using an 'input submit' element would be preferable to an anchor on the following line, but Bootstrap can't style a 'submit' as a label so you have to use an anchor. #} {% if account.active %} Active {% else %} Inactive {% endif %}

{% endif %} {% for project in account.project_set.all %} {% if not selected_project or project == selected_project %}
{{ project }}
{% csrf_token %} {# Using an 'input submit' element would be preferable to an anchor on the following line, but Bootstrap can't style a 'submit' as a label so you have to use an anchor. #} {% if project.active %} Active {% else %} Inactive {% endif %}
{% if selected_project %} {{ project.account }} {% endif %} {% if project.manager_set.all %}
PIs: {{ project.manager_set.all|join:", " }}
{% endif %}
{{ "projects_and_accounts"|customization:"project_application_identifier_name" }}: {{ project.application_identifier }}
{% if project.discipline %}
Discipline: {{ project.discipline }}
{% endif %} {% if project.start_date %}
Start Date: {{ project.start_date }}
{% endif %}
{% include 'accounts_and_projects/users_for_project.html' with users=project.user_set.all %}
{% if allow_document_upload or project.project_documents.all %}
{% include 'accounts_and_projects/documents_for_project.html' with documents=project.project_documents.all %}
{% endif %}
{% endif %} {% empty %}

This account does not have any projects

{% endfor %}
{% endif %} {% endblock %}