{% verbatim %}
  <article ng-repeat="item in results" resource_id="{{ item.id }}" ng-cloak class="ng-cloak">
  	<div class="row items-list">
  	  <div class="col-xs-4 thumb">
  	    <a href="{{ item.detail_url }}"><img ng-src="{{ item.thumbnail_url }}" /></a>
  	  </div>
      <div class="col-xs-8 item-info">
        {% endverbatim %}{% if request.user.is_authenticated %}
        <button class="btn btn-default btn-xs pull-right" ng-click="feature_select($event)">Select</button>
        {% endif %}{% verbatim %}
        <h4><a href="{{ item.detail_url }}">{{ item.title }}</a></h4>
        <p>{{ item.category__gn_description }} <span class="owner">by <a href="/people/profile/{{ item.owner__username }}">{{ item.owner__username }}</a></span></p>
        <p class="abstract">{{ item.abstract }}</p>
        <p class="actions">
          <a href="{{ item.detail_url }}#info"><i class="fa fa-calendar-o"></i>{{ item.date|date:'d MMM y' }}</a> |
          <a href="{{ item.detail_url }}"><i class="fa fa-eye"></i>{{ item.popular_count }}</a> |
          <a href="{{ item.detail_url }}#share"><i class="fa fa-share"></i>{{ item.share_count }}</a> |
          <a href="{{ item.detail_url }}#rate"><i class="fa fa-star"></i>{{ item.rating }}</a> 
          <a ng-if="item.detail_url.indexOf('/layers/') > -1" 
            class="pull-right" href="{% endverbatim %}{% url "new_map" %}?layer={% verbatim %}{{ item.detail_url.substring(8) }}">
            <i class="fa fa-map-marker"></i>Create a Map</a>
          <a ng-if="item.detail_url.indexOf('/maps/') > -1" 
            class="pull-right" href="/maps/{{item.id}}/view">
            <i class="fa fa-map-marker"></i>View Map</a>
          </p>
      </div>
    </div>
  </article>
{% endverbatim %}
