{% load bloomerp %}
{% load static %}

<div class="d-flex justify-content-between">
  <h5 class="card-title">Overview</h5>
  <div>
    <a 
      hx-get="{% url 'users_my_profile_detail_view_preference' %}?content_type_id={{content_type_id}}&return_to={{request.path}}"
      hx-target="#main-content"
      hx-swap="innerHTML"
      hx-trigger="click"
      hx-push-url="true"
      class="pointer"
    >
      <img src="{% static 'bloomerp/icons/settings.svg' %}" alt="Settings" style="width: 20px;">
    </a>
  </div>
</div>

{% if no_preferences%}

<p>You currently have no list view preferences set for this model. You can your view preferences 
  <a 
  hx-get="{% url 'users_my_profile_detail_view_preference' %}?content_type_id={{content_type_id}}&return_to={{request.path}}"
  hx-target="#main-content"
  hx-swap="innerHTML"
  hx-trigger="click"
  hx-push-url="true">here.</a>
</p>


{% endif %}



<div class="row">

  {% if left_column %}
  <div class="col-12 col-sm-{{col_span}}">
    {% for attribute in left_column %}
    <div class="row mt-2">
        <p><span class="fw-bold mb-1 pe-3">{{ attribute.application_field.title }}:   </span>
          
          {% field_value object attribute.application_field request.user %}
          
      </p>
    </div>

    {% endfor %}
  </div>  
  {% endif %}

  {% if center_column %}
  <div class="col-12 col-sm-{{col_span}}">
    {% for attribute in center_column %}
    <div class="row mt-2">
        <p><span class="fw-bold mb-1 pe-3">{{ attribute.application_field.title }}:</span>
          
          {% field_value object attribute.application_field request.user %}
          
      </p>
    </div>

    {% endfor %}
  </div>  
  {% endif %}

  {% if right_column %}
  <div class="col-12 col-sm-{{col_span}}">
    {% for attribute in right_column %}
    <div class="row mt-2">
        <p><span class="fw-bold mb-1 pe-3">{{ attribute.application_field.title }}:   </span>
          
          {% field_value object attribute.application_field request.user %}
          
      </p>
    </div>

    {% endfor %}
  </div>  
  {% endif %}



</div>



