{% extends "base.html" %}

{% block preTitle %}
  Admin: Projects -
{% endblock %}

{% block bodyContent %}
  <h3>Admin: Projects</h3>
  <table class="table-bordered table-striped table">
    <thead>
      <tr>
        <th></th>
        <th>Project</th>
        <th>Provider</th>
        <th>Created Date</th>
        <th>Users</th>
      </tr>
    </thead>
    <tbody>
    {% for project in projects %}
        <tr>
          <td>{% if not project.public %}<i class="fa fa-lock"></i>{% endif %}</td>
          <td>
            <h4><a href="/{{ project.name }}/">{{ project.name }}</a></h4>
          </td>
          <td>
            {% if project.display_url %}
            <a href="{{ project.display_url }}">{{ project.provider.id }}</a>
            {% endif %}
          </td>
          <td>{{ project.created_date }}</td>
          <td>
            <ul class="unstyled">
            {% for user in project.users %}
            <li>
              {{ user.email }}
              {% if user.access == 2 %}
              <i class="fa fa-key"></i>
              {% endif %}
            </li>
            {% endfor %}
            </ul>
          </td>
        </tr>
    {% endfor %}
    </tbody>
  </table>
{% endblock %}
