{% 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 }}">
  <div class="container-fluid">
    <div class="row">
      <div class="col-xs-11">
        <a href="{{ url }}" title="{{ res.name or res.description }}">
          <div class="container-fluid">
            {% block resource_item_title %}
              {{ 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) }}
            {% endblock %}
            {% block resource_item_description %}
              <p class="description">
                {% if res.description %}
                  {{ h.markdown_extract(res.description, extract_length=80) }}
                {% endif %}
              </p>
            {% endblock %}
          </div>
        </a>
      </div>
      <div class="dropdown col-xs-1 hidden-xs">
        {% block resource_item_explore %}
        {% if not url_is_edit %}
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <div class="container-fluid">
              <span class="caret"></span>
            </div>
          </a>
          <ul class="dropdown-menu dropdown-menu-right">
            {% 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) %}
            <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 %}
            {% 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>
        {% endif %}
        {% endblock %}
      </div>
    </div>
  </div>
</li>

Rewrite Resource Item. Structural changes
Rewrite Resource Item. Structural changes
