<html py:extends="master.xhtml" py:strip="True">
  <py:block name="title">
    Select Group
  </py:block>
  <body py:block="body" py:strip="True">
    <div class="container">
      <py:if test="groups">
        <h1>Select Group</h1>
        <p>
          You are a member of multiple groups. Please select the group you
          would like to use.
        </p>
        <div class="list-group">
          <a py:for="group in groups"
             class="list-group-item"
             href="${tg.url('/group/{}'.format(group.id))}">
            <h4>
              ${group.competition.name}: ${group.name}
              <py:if test="group.incognito">
                (<i class="fas fa-user-admin" /> Incognito Team)
              </py:if>
            </h4>
            <span>${', '.join(map(repr, group.users))}</span>
          </a>
        </div>
      </py:if><py:else>
        <h1>No Groups</h1>
        <p>
          You are not a member of any active groups. Please contact
          <py:if test="asbool(tg.config['site.edu'])">
            your course instructor
          </py:if><py:else>
            the site administrator
          </py:else>
          if you believe this to be a mistake.
        </p>
      </py:else>
    </div>
  </body>
</html>
