<commit_before>{% extends "instance_base.html" %}
{% load i18n %}
{% load audit_extras %}

{% block page_title %} | {% trans "Planting Site" %} {{plot.pk}}{% endblock %}

{% block head_extra %}
{% endblock head_extra %}


{% block content %}
<div class="content tree-details">

  <!-- Left Column -->
  <div class="left">
    <img src="{{ STATIC_URL }}img/tree.png">
    <a class="btn btn-mini add-photos" href="javascript:;">{% trans "Add Photos" %}</a>
    <hr>
    <a class="btn add-favorite" href="javascript:;">{% trans "Add to Favorites" %}</a>
    <hr>
    <h3>{% trans "Latest Update" %}</h3>
    <p>{{ recent_activity.0.short_descr }}</p>
    <h5>20% {% trans "Complete" %}</h5>
    <div class="progress">
      <div class="bar" style="width: 20%;"></div>
    </div>
    <hr>
    <h3>{% trans "Your Turn" %}</h3>
    <p>{% trans "Our database of trees comes from public records and citizen foresters like you. Update the information for this tree and help us grow!" %}</p>
    <hr>
    <h3>{% trans "Recent Edits" %}</h3>
    <ul>
      {% for audit in recent_activity %}
      <li>{{ audit.short_descr }}</li>
      {% endfor %}
    </ul>
  </div>

  <!-- Center Column -->
  <div class="center">
    <h1>{{ plot.current_tree.species.common_name }}</h1>
    <h2>{{ plot.current_tree.species.scientific_name }}</h2>
    <h3>{{ plot.address_full }}</h3>

    <!-- General Tree Information -->
    <table class="table table-striped">
      <h5>{% trans "General Tree Information" %}</h5>
      <tbody>
        {% usercanread plot.current_tree "id" as value %}
        <tr>
          <td>{% trans "Tree Number" %}</td>
          <td>{{ value }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "species" as species %}
        <tr>
          <td>{% trans "Scientific Name" %}</td>
          <td><em>{{ species.scientific_name }}</em></td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "species" as species %}
        <tr>
          <td>{% trans "Common Name" %}</td>
          <td>{{ species.common_name }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "diameter" as diameter %}
        <tr>
          <td>{% trans "Trunk Diameter" %}</td>
          <td>{{ diameter|floatformat }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "height" as height %}
        <tr>
          <td>{% trans "Tree Height" %}</td>
          <td>{{ height }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "canopy_height" as canopy_height %}
        <tr>
          <td>{% trans "Canopy Height" %}</td>
          <td>{{ canopy_height }}</td>
        </tr>
        {% endusercanread %}
        {% for udf_field in plot.current_tree.udf_field_names %}
        {% usercanread plot.current_tree udf_field as udf_value %}
        <tr>
          <td>{{ udf_field }}</td>
          <td>{{ udf_value }}</td>
        </tr>
        {% endusercanread %}
        {% endfor %}
      </tbody>
    </table>
    <hr>

    <table class="table table-striped">
      <h5>{% trans "General Plot Information" %}</h5>
      <tbody>
        {% usercanread plot "width" as width %}
        <tr>
          <td>{% trans "Width" %}</td>
          <td>{{ width }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "length" as length %}
        <tr>
          <td>{% trans "Length" %}</td>
          <td>{{ length }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "address_street" as addr %}
        <tr>
          <td>{% trans "Adresss" %}</td>
          <td>{{ addr }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "city" as city %}
        <tr>
          <td>{% trans "City" %}</td>
          <td>{{ city }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "zip" as zip %}
        <tr>
          <td>{% trans "Zip Code" %}</td>
          <td>{{ zip }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "owner_orig_id" as oid %}
        <tr>
          <td>{% trans "Original Owner Id" %}</td>
          <td>{{ oid }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "readonly" as ro %}
        <tr>
          <td>{% trans "Read Only" %}</td>
          <td>{{ ro }}</td>
        </tr>
        {% endusercanread %}
        {% for udf_field in plot.udf_field_names %}
        {% usercanread plot udf_field as udf_value %}
        <tr>
          <td>{{ udf_field }}</td>
          <td>{{ udf_value }}</td>
        </tr>
        {% endusercanread %}
        {% endfor %}
      </tbody>
    </table>
    <hr>

    <!-- Yearly Ecosystem Services -->
    <table class="table table-striped">
      <h5>{% trans "Yearly Ecosystem Services" %}</h5>
      <tbody>
      {% for benefit in benefits %}
        <tr>
          <td>{{ benefit.label }}</td>
          <td>{{ benefit.value }} {{ benefit.unit}}</td>
          <td>{{ currency_symbol }}{{ benefit.currency_saved }}</td>
        </tr>
      {% endfor %}
      </tbody>
    </table>
    <hr>

  </div>

  <div class="right">
    <h3>{% trans "Commments" %}</h3>

    {% if request.user.username %}
      <form>
        <textarea rows=8></textarea><br>
        <button type="submit" class="btn">{% trans "Submit" %}</button>
      </form>
    {% else %}
      <p><a href="{% url 'registration_register' %}">{% trans "Sign Up" %}</a> {% trans "or" %} <a href="{% url 'auth_login' %}">{% trans "log in" %}</a> {% trans "to add comments" %}</p>
    {% endif %}
  </div>

</div>
{% endblock content %}<commit_msg>Don't show ecobenefits sections if there are no ecobenefits<commit_after>{% extends "instance_base.html" %}
{% load i18n %}
{% load audit_extras %}

{% block page_title %} | {% trans "Planting Site" %} {{plot.pk}}{% endblock %}

{% block head_extra %}
{% endblock head_extra %}


{% block content %}
<div class="content tree-details">

  <!-- Left Column -->
  <div class="left">
    <img src="{{ STATIC_URL }}img/tree.png">
    <a class="btn btn-mini add-photos" href="javascript:;">{% trans "Add Photos" %}</a>
    <hr>
    <a class="btn add-favorite" href="javascript:;">{% trans "Add to Favorites" %}</a>
    <hr>
    <h3>{% trans "Latest Update" %}</h3>
    <p>{{ recent_activity.0.short_descr }}</p>
    <h5>20% {% trans "Complete" %}</h5>
    <div class="progress">
      <div class="bar" style="width: 20%;"></div>
    </div>
    <hr>
    <h3>{% trans "Your Turn" %}</h3>
    <p>{% trans "Our database of trees comes from public records and citizen foresters like you. Update the information for this tree and help us grow!" %}</p>
    <hr>
    <h3>{% trans "Recent Edits" %}</h3>
    <ul>
      {% for audit in recent_activity %}
      <li>{{ audit.short_descr }}</li>
      {% endfor %}
    </ul>
  </div>

  <!-- Center Column -->
  <div class="center">
    <h1>{{ plot.current_tree.species.common_name }}</h1>
    <h2>{{ plot.current_tree.species.scientific_name }}</h2>
    <h3>{{ plot.address_full }}</h3>

    <!-- General Tree Information -->
    <table class="table table-striped">
      <h5>{% trans "General Tree Information" %}</h5>
      <tbody>
        {% usercanread plot.current_tree "id" as value %}
        <tr>
          <td>{% trans "Tree Number" %}</td>
          <td>{{ value }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "species" as species %}
        <tr>
          <td>{% trans "Scientific Name" %}</td>
          <td><em>{{ species.scientific_name }}</em></td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "species" as species %}
        <tr>
          <td>{% trans "Common Name" %}</td>
          <td>{{ species.common_name }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "diameter" as diameter %}
        <tr>
          <td>{% trans "Trunk Diameter" %}</td>
          <td>{{ diameter|floatformat }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "height" as height %}
        <tr>
          <td>{% trans "Tree Height" %}</td>
          <td>{{ height }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot.current_tree "canopy_height" as canopy_height %}
        <tr>
          <td>{% trans "Canopy Height" %}</td>
          <td>{{ canopy_height }}</td>
        </tr>
        {% endusercanread %}
        {% for udf_field in plot.current_tree.udf_field_names %}
        {% usercanread plot.current_tree udf_field as udf_value %}
        <tr>
          <td>{{ udf_field }}</td>
          <td>{{ udf_value }}</td>
        </tr>
        {% endusercanread %}
        {% endfor %}
      </tbody>
    </table>
    <hr>

    <table class="table table-striped">
      <h5>{% trans "General Plot Information" %}</h5>
      <tbody>
        {% usercanread plot "width" as width %}
        <tr>
          <td>{% trans "Width" %}</td>
          <td>{{ width }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "length" as length %}
        <tr>
          <td>{% trans "Length" %}</td>
          <td>{{ length }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "address_street" as addr %}
        <tr>
          <td>{% trans "Adresss" %}</td>
          <td>{{ addr }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "city" as city %}
        <tr>
          <td>{% trans "City" %}</td>
          <td>{{ city }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "zip" as zip %}
        <tr>
          <td>{% trans "Zip Code" %}</td>
          <td>{{ zip }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "owner_orig_id" as oid %}
        <tr>
          <td>{% trans "Original Owner Id" %}</td>
          <td>{{ oid }}</td>
        </tr>
        {% endusercanread %}
        {% usercanread plot "readonly" as ro %}
        <tr>
          <td>{% trans "Read Only" %}</td>
          <td>{{ ro }}</td>
        </tr>
        {% endusercanread %}
        {% for udf_field in plot.udf_field_names %}
        {% usercanread plot udf_field as udf_value %}
        <tr>
          <td>{{ udf_field }}</td>
          <td>{{ udf_value }}</td>
        </tr>
        {% endusercanread %}
        {% endfor %}
      </tbody>
    </table>
    <hr>

    <!-- Yearly Ecosystem Services -->
    {% if benefits %}
    <table class="table table-striped">
      <h5>{% trans "Yearly Ecosystem Services" %}</h5>
      <tbody>
      {% for benefit in benefits %}
        <tr>
          <td>{{ benefit.label }}</td>
          <td>{{ benefit.value }} {{ benefit.unit}}</td>
          <td>{{ currency_symbol }}{{ benefit.currency_saved }}</td>
        </tr>
      {% endfor %}
      </tbody>
    </table>
    <hr>
    {% endif %}

  </div>

  <div class="right">
    <h3>{% trans "Commments" %}</h3>

    {% if request.user.username %}
      <form>
        <textarea rows=8></textarea><br>
        <button type="submit" class="btn">{% trans "Submit" %}</button>
      </form>
    {% else %}
      <p><a href="{% url 'registration_register' %}">{% trans "Sign Up" %}</a> {% trans "or" %} <a href="{% url 'auth_login' %}">{% trans "log in" %}</a> {% trans "to add comments" %}</p>
    {% endif %}
  </div>

</div>
{% endblock content %}
{'fraction_non_alphanumeric': 0.196519153402134, 'fraction_numerical': 0.0052475074339688645, 'mean_word_length': 1.9997376705141658, 'pattern_counts': {'":': 0, '<': 369, '<?xml version=': 0, '>': 369, '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': '6536823', 'n_tokens_mistral': 4119, 'n_tokens_neox': 3808, 'n_words': 981}