Source

trato_hecho / trato_hecho / templates / tradeitem / item_detail_owner.html

{% extends 'tradeitem/item_detail.html' %}
{%load thumbnail %}
{%block content %}
<div class="row">
  <div class="panell span6 left">
    <h1>{{item.name|title}}</h1>
    {% thumbnail item.picture "140x140" as img %}
    <img src="{{img.url}}"/>
    {%endthumbnail%}
    <p>owned by you.</p>
    {{item.description}}
    <h3>Tags</h3>
    <ul id="item-tags">
      {% for tag in item.tags.all %}
          <li>{{tag}}</li>
      {% endfor %}
    </ul>
    {% if item.tradeable_for.count %}
    <h3>Willing to trade for</h3>
    <ul id="item-search-terms">
      {% for tag in item.tradeable_for.all %}
        <li>{{tag}}</li>
      {% endfor %}
    </ul>
    {% endif %}
  </div>
  <div class="span5 left panelr">
    <h3>Offers for this item</h3>
    <div id="item-offers" class="row">
      <ul>
        {% for offer in item.get_active_offers %}
        <li>

        <strong>
          <a href="{%url item_detail offer.offered.id%}">

           {{offer.offered.name|title}}

          </a>         </strong>
        <a href="{%url accept_offer offer.id %}" class="btn btn-active">Accept</a>
        </li>
        {% empty %}
        <li>No offers for your item yet.</li>
        {% endfor %}
      </ul>
    </div>
    <h3>Items offered</h3>
    <div id="item-offers" class="row">
      <ul>
        {% for offer in item.get_active_proposals %}
        <li>
        <strong>
          <a href="{%url item_detail offer.target.id%}">

           {{offer.target.name|title}}

          </a>         </strong>
        <a href="{%url withdraw_offer offer.id %}" class="btn btn-active">Withdraw</a>
        </li>
        {% empty %}
        <li>You have not offered this item.</li>
        {% endfor %}
      </ul>
    </div>
    {% if suggested %}
    <h3>Suggested items to trade</h3>
    <div id="item-suggestions" class="row">
      <ul>
        {% for suggested in suggestions %}
        <li><a href="{% url item_detail suggested.pk %}">
          {{suggested.name|title}}
        </a></li>
        {% empty %}
        <li>No items match your criteria.</li>
        {% endfor %}
      </ul>
    </div>
    {% endif %}
  </div>
    <div class="clearfix"></div>
</div>
{% endblock %}