{% extends "mygame/company.html" %} {% block content %}
<h1
  class="text-center font-weight-bold border-bottom border-2 border-primary p-3 m-3 shadow rounded"
>
  Model: {{engineeringmodel.name}}
</h1>
<form
  class="row g-0 justify-content-evenly m-2"
  action="{% url 'companyEventSetModel' gameid=game.id username=user.username eventid=eventid modelnumber=modelnumber%}"
  method="post"
>
  {% csrf_token %}
  <div class="col-md-6">
    <div class="d-grid gap-2">
      <input
        class="btn btn-primary btn-block m-2"
        type="submit"
        value="previous"
        id="previous"
        name="action"
      />
    </div>
  </div>
  <div class="col-md-6">
    <div class="d-grid gap-2">
      <input
        class="btn btn-primary btn-block m-2"
        type="submit"
        value="next"
        id="next"
        name="action"
      />
    </div>
  </div>
</form>
<h2
  class="col-md-4 border-bottom border-1 border-primary p-2 m-2 mt-4 shadow rounded text-center"
>
  Description
</h2>
<div class="row g-0 justify-content-center m-2 mt-4 mb-4">
  <div class="d-grid gap-2">
    <button
      class="btn btn-info"
      type="button"
      data-bs-toggle="collapse"
      data-bs-target="#collapseDescription"
      aria-expanded="false"
      aria-controls="collapseDescription"
    >
      View Description
    </button>
  </div>
  <div class="collapse col-md-9 m-2" id="collapseDescription">
    <div class="card card-body">{{engineeringmodel.description}}</div>
  </div>
</div>

<div class="m-2">
  <table class="table">
    <thead>
      <tr class="justify-content-center">
        <th scope="col" class="text-success text-center fs-2">Positives</th>
        <th scope="col" class="text-danger text-center fs-2">Negatives</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          {%for pro in engineeringmodel.getPros%}
          <div class="border border-success-subtle rounded p-2 m-2">
            {{pro}}
          </div>
          {%endfor%}
        </td>
        <td>
          {%for con in engineeringmodel.getCons%}
          <div class="border border-danger-subtle rounded p-2 m-2">{{con}}</div>
          {%endfor%}
        </td>
      </tr>
    </tbody>
  </table>
</div>

<form
  class="row g-0 justify-content-evenly m-2"
  action="{% url 'companyEventSetModel' gameid=game.id username=user.username eventid=eventid modelnumber=modelnumber%}"
  method="post"
>
  {% csrf_token %}
  <div class="d-grid gap-2">
    <input
      class="btn btn-warning"
      type="submit"
      value="set model"
      id="set model"
      name="action"
    />
  </div>
</form>

{% endblock %}
