{#

Creates single item in a section.

item - The request that needs to be shown.

Example usage:
  {% snippet 'requestdata/snippets/section_item_new.html', item=item %}

#}

{% resource 'requestdata/modal-form.js' %}

{# {% set sender_profile = h.url_for(controller='user', action='read', id=item.sender_user_id) %} #}
{% set package_url = h.url_for(controller='package', action='read', id=item.package_id) %}

<div class="my-requested-data-container__content-item">
  <p>{{item}}</p>
</div>

{#

Creates single item in a section.

item - The request that needs to be shown.

Example usage:
  {% snippet 'requestdata/snippets/section_item_archive.html', item=item %}

#}

{% set sender_profile = h.url_for(controller='user', action='read', id=item.sender_user_id) %}
{% set package_url = h.url_for(controller='package', action='read', id=item.package_id) %}

<div class="my-requested-data-container__content-item">
  <p class="my-requested-data-container__content-item-info">Data request from <a href="{{ sender_profile }}" title="{{ _('View profile') }}">{{ item.sender_name }}</a> for dataset <a href="{{ package_url }}" title="{{ _('View dataset') }}">{{ h.requestdata_get_package_title(item.package_id) }}</a>.</p>

  <p class="my-requested-data-container__date" title="{{ h.render_datetime(item.modified_at, with_hours=True) }}">{{ h.requestdata_time_ago_from_datetime(item.modified_at) }}</p>

  <div class="my-requested-data-container__status">
    {% if item.rejected %}
      <i class="icon-remove-circle"></i>
      <p class="my-requested-data-container__status-text">Rejected</p>
    {% elif item.data_shared %}
      <i class="icon-thumbs-up"></i>
      <p class="my-requested-data-container__status-text">Shared</p>
    {% elif not item.data_shared %}
       <i class="icon-thumbs-down"></i>
      <p class="my-requested-data-container__status-text">Not shared</p>
    {% endif %}
  </div>
</div>

Add additional info for archived request
Add additional info for archived request
