<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>{{ title_text }}</title>
    <style>
      table,
      th,
      td {
        border: 1px solid black;
        border-collapse: collapse;
      }
    </style>
  </head>
  <body>
    <table style="text-align: center">
      {% if recruit_results|length > 0 %}
      <tr>
        <th>位置</th>
        <th>标签</th>
        <th>预计干员</th>
      </tr>
      {% for pos,value in recruit_results.items() %}
      <tr>
        <td>{{ pos }}</td>

        <td>
            {% if value.tags|length > 0 %}
                {% for tag in value.tags %}{{ tag }}{% endfor %}
            {% else %}
                 未选择
            {% endif %}

        </td>
        <td>
            {% for agent in value.result %}
            {{ agent.name }}
            {% endfor %}
        </td>

      </tr>
      {% endfor %} {% endif %} {% if recruit_get_agent|length > 0 %}
      <tr>
        <th colspan="3">上次公招干员</th>
      </tr>
      {% for pos,value in recruit_get_agent.items() %}
      <tr>
        <td>{{ pos }}</td>
        <td colspan="2">{{ value }}</td>
      </tr>
      {% endfor %} {% endif %}

      <tr>
          {% if permit_count is defined%}
              <th colspan="2">剩余招募券数量</th>
              <th>{{permit_count}}</th>
          {% endif %}

      </tr>

    </table>
  </body>
</html>
