<commit_before>{% set can_edit = h.check_access('package_update', {'id':pkg.id }) %}
{% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %}
{% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %}

<li class="resource-item" data-id="{{ res.id }}">
  {% block resource_item_title %}
  <a class="heading" href="{{ url }}" title="{{ res.name or res.description }}">
    {{ h.resource_display_name(res) | truncate(50) }}<span class="format-label" property="dc:format" data-format="{{ res.format.lower() or 'data' }}">{{ res.format }}</span>
    {{ h.popular('views', res.tracking_summary.total, min=10) }}
  </a>
  {% endblock %}
  {% block resource_item_description %}
    <p class="description">
      {% if res.description %}
        {{ h.markdown_extract(res.description, extract_length=80) }}
      {% endif %}
    </p>
  {% endblock %}
  {% block resource_item_explore %}
  {% if not url_is_edit %}
  <div class="dropdown btn-group">
    <a href="#" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
      <i class="icon-share-alt"></i>
      {{ _('Explore') }}
      <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      {% block resource_item_explore_links %}
      <li>
        <a href="{{ url }}">
          {% if res.has_views %}
            <i class="icon-bar-chart"></i>
            {{ _('Preview') }}
          {% else %}
            <i class="icon-info-sign"></i>
            {{ _('More information') }}
          {% endif %}
        </a>
      </li>
      {% if res.url and h.is_url(res.url) %}
        {% if res.url.lower().find('/querycontext')== 0 and res.url.lower().find('/contextentities/')== 0 %}
          <li>
            <a href="{{ res.url }}" class="resource-url-analytics" target="_blank">
              {% if res.has_views %}
                <i class="icon-download"></i>
                {{ _('Download') }}
              {% else %}
                <i class="icon-external-link"></i>
                {{ _('Go to resource') }}
              {% endif %}
            </a>
          </li>
        {% endif %}
      {% endif %}
      {% if can_edit %}
      <li>
        <a href="{{ h.url_for(controller='package', action='resource_edit', id=pkg.name, resource_id=res.id) }}">
          <i class="icon-edit"></i>
          {{ _('Edit') }}
        </a>
      </li>
      {% endif %}
      {% endblock %}
    </ul>
  </div>
  {% endif %}
  {% endblock %}
</li><commit_msg>css changes<commit_after>{% set can_edit = h.check_access('package_update', {'id':pkg.id }) %}
{% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %}
{% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %}

<li class="resource-item" data-id="{{ res.id }}">
  {% block resource_item_title %}
  <a class="heading" href="{{ url }}" title="{{ res.name or res.description }}">
    {{ h.resource_display_name(res) | truncate(50) }}<span class="format-label" property="dc:format" data-format="{{ res.format.lower() or 'data' }}">{{ res.format }}</span>
    {{ h.popular('views', res.tracking_summary.total, min=10) }}
  </a>
  {% endblock %}
  {% block resource_item_description %}
    <p class="description">
      {% if res.description %}
        {{ h.markdown_extract(res.description, extract_length=80) }}
      {% endif %}
    </p>
  {% endblock %}
  {% block resource_item_explore %}
  {% if not url_is_edit %}
  <div class="dropdown btn-group">
    <a href="#" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
      <i class="icon-share-alt"></i>
      {{ _('Explore') }}
      <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      {% block resource_item_explore_links %}
      <li>
        <a href="{{ url }}">
          {% if res.has_views %}
            <i class="icon-bar-chart"></i>
            {{ _('Preview') }}
          {% else %}
            <i class="icon-info-sign"></i>
            {{ _('More information') }}
          {% endif %}
        </a>
      </li>
      {% if res.url and h.is_url(res.url) %}
        {% if res.url.lower().find('/querycontext')== -1 and res.url.lower().find('/contextentities/')== -1 %}
          <li>
            <a href="{{ res.url }}" class="resource-url-analytics" target="_blank">
              {% if res.has_views %}
                <i class="icon-download"></i>
                {{ _('Download') }}
              {% else %}
                <i class="icon-external-link"></i>
                {{ _('Go to resource') }}
              {% endif %}
            </a>
          </li>
        {% endif %}
      {% endif %}
      {% if can_edit %}
      <li>
        <a href="{{ h.url_for(controller='package', action='resource_edit', id=pkg.name, resource_id=res.id) }}">
          <i class="icon-edit"></i>
          {{ _('Edit') }}
        </a>
      </li>
      {% endif %}
      {% endblock %}
    </ul>
  </div>
  {% endif %}
  {% endblock %}
</li>
{'fraction_non_alphanumeric': 0.20791683326669333, 'fraction_numerical': 0.003198720511795282, 'mean_word_length': 2.2656657963446474, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6036155', 'n_tokens_mistral': 1733, 'n_tokens_neox': 1588, 'n_words': 310}