{% extends "base/headermenu.html" %}
{% load i18n %}
{% block contents %}

  <p><br></p>


<p><br></p>

  <div class="mainbox">
    <div class="inner">
      <div class="top"><span></span></div>
        <div class="content">
          <p>
            <h3>{% if is_complete %}{% trans "Watchlist (Sales End)" %}{% else %}{% trans "Watchlist (Selling)" %}{% endif %}</h3>

            <p>
            {% ifnotequal formset.management_form.initial.TOTAL_FORMS 0 %}
              <form action="{% url djanction.mypage.views.del_watch_item %}" method="post"/>
              <input type="submit" value="削除"/>
              {{ formset.management_form }}
              <table width="100%" border="0" collapse="0" cellspacing="10">
                  <th></th>
                  <th>{% trans "Item" %}</th>
                  <th>{% trans "Current Pirce" %}</th>
                  <th>{% trans "Highest Bidder" %}</th>
                  <th>{% trans "End Date" %}</th>
                  {% for form in formset.forms %}
                  <tr>
                    <td>
                      {{ form.selected }}{{ form.item }}{{ form.user }}{{ form.id }}
                    </td>
                    <td>
                      <a href="{% url djanction.item.views.info form.instance.item.id %}">{{ form.instance.item.item_name }}</a>
                    </td>
                    <td align="right">
                      {{ form.instance.item.current_price }}{% trans "$" %}
                    </td>
                    <td>
                      {{ form.instance.item.highest_bidder.username|escape }}
                    </td>
                    <td>
                      {{ form.instance.item.end_date }}
                    </td>
                  </tr>
                  {% endfor %}
              </table>
              </form>
              {% else %}
              該当の商品はありません。
              {% endifnotequal %}
              <br>
            </p>
          </p>
        </div>
        <div class="base"><span></span></div>
      </div>
    </div>
  </div>

{% endblock %}
