<commit_before>{% extends "base.html" %}

{% block title %}TradyFit - Item{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>{{ item.name.capitalize() }}</h1>
</div>
<div class="row item-view">
  <div class="col-md-6" id="item-{{item.id}}">
    <div id="item-location">
      <p><i class="fa fa-map-marker"></i> {{ item.address }}</p>
    </div>
	  <div id="item-description">
      <p>{{ item.description|default('No description provided', true) }}</p>
    </div>
    <div id="item-price">
      <h5><b>Price:</b> {{ item.price }}$
      <span class="pull-right">
      <i class="fa fa-tags"></i> {{ item.category.name.capitalize() }}</h5>
      </span>
    </div>
    <hr>
    <div class="row">
      <div class="col-md-2" id="owner-avatar">
        <img class="img-circle" src="{{ item.user.avatar() }}" height="50"
        width="50">
      </div>
      <div class="col-md-5" id="owner-info">
        {% if item.modified %}
          <h5>Modified {{ moment(item.modified).fromNow(refresh=True) }}
        {% else %}
          <h5>Created {{ moment(item.timestamp).fromNow(refresh=True) }}
        {% endif %}
          by {{ item.user.username }}</h5>
      </div>
    </div>
    <hr>
    {% if current_user.is_authenticated() and current_user.id != item.user_id %}
      <p><a href="{{ url_for('msg.create', id=item.id) }}" class="btn btn-primary">Contact seller</a></p>
    {% endif %}
    {% if current_user.is_authenticated() and current_user.id == item.user_id %}
      <p><a href="{{ url_for('main.edit', id=item.id) }}">Edit</a> |
      <a href="{{ url_for('main.delete', id=item.id) }}">Delete</a></p>
    {% endif %}
  </div>
  <div class="col-md-5 pull-right" id="item-image">
    <img class="img-thumbnail" src="{{ item.image() }}">
  </div>
</div>
{% endblock %}<commit_msg>display item on a panel<commit_after>{% extends "base.html" %}

{% block title %}TradyFit - Item{% endblock %}

{% block page_content %}
<div class="row item-view">
<br><br>
  <div class="col-xs-11 col-sm-6 col-md-6" id="item-{{item.id}}">
    <div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title">
          {{ item.name.capitalize() }}
        </h3>
      </div>
      <ul class="list-group">
        <li class="list-group-item">
          <i class="fa fa-map-marker"></i> {{ item.address }}
          <span class="pull-right">
            <i class="fa fa-tags"></i>
            <a href="{{ url_for('main.category', id=item.category_id) }}">
              {{ item.category.name.capitalize() }}
            </a>
          </span>
          <br><b>Price: </b>{{ item.price }}$
        </li>
      </ul>
      <div class="panel-body">
        {{ item.description|default('No description provided', true) }}
      </div>
      <div class="panel-footer">
        <div class="row">
          <div class="col-xs-2 col-sm-3 col-md-2" id="owner-avatar">
            <img class="img-circle" src="{{ item.user.avatar() }}" height="50"
            width="50">
          </div>
          <div class="col-xs-8 col-sm-7 col-md-6" id="owner-info">
            {% if item.modified %}
              <h5>Modified {{ moment(item.modified).fromNow(refresh=True) }}
            {% else %}
              <h5>Created {{ moment(item.timestamp).fromNow(refresh=True) }}
            {% endif %}
              by <i>@{{ item.user.username }}</i></h5>
          </div>
        </div>
      </div>
    </div>
    {% if current_user.is_authenticated() and current_user.id != item.user_id %}
      <p><a href="{{ url_for('msg.create', id=item.id) }}" class="btn btn-primary">Contact seller</a></p>
    {% endif %}
    {% if current_user.is_authenticated() and current_user.id == item.user_id %}
      <p><a href="{{ url_for('main.edit', id=item.id) }}">Edit</a> |
      <a href="{{ url_for('main.delete', id=item.id) }}">Delete</a></p>
    {% endif %}
    <br>
  </div>
  <div class="col-xs-12 col-sm-6 col-md-5 pull-right" id="item-image">
    <img class="img-thumbnail" src="{{ item.image() }}">
  </div>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.22572695909314933, 'fraction_numerical': 0.009364218827008379, 'mean_word_length': 2.496124031007752, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3391960', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1406, 'n_words': 269}