Skip to content

Commit

Permalink
[Fixes #6914] Remove "add to basket" tool for documents and maps (#6915)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Fabiani committed Feb 2, 2021
1 parent 8335ed4 commit c23d9c1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
15 changes: 7 additions & 8 deletions geonode/base/templates/base/_resourcebase_snippet.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,36 @@ <h4>
<a href="{{ item.detail_url }}">{{ item.title }}</a>
</h4>
</div>
{% endverbatim %}

{% if facet_type == 'layers' %}
<div class="col-xs-2">
<h4>{% endverbatim %}
<h4>
<button
class="btn btn-default btn-xs pull-right"
ng-if="cart"
ng-click="cart.toggleItem(item)"
data-toggle="tooltip"
data-placement="bottom"
title="{% trans "Select" %}"><i ng-class="cart.getFaClass(item.id)" class="fa fa-lg"></i></button>{% verbatim %}
title="{% trans "Select" %}"><i ng-class="cart.getFaClass(item.id)" class="fa fa-lg"></i></button>
</h4>
</div>
{% endif %}
</div>
<em ng-if="item.store_type == 'remoteStore'">
{% endverbatim %}
<span ng-if="item.online == true"><i class="fa fa-power-off text-success"></i> {% trans "Service is" %} {% trans "online" %}</span>
<span ng-if="item.online == false"><i class="fa fa-power-off text-danger"></i> {% trans "Service is" %} {% trans "offline" %}</span>
{% verbatim %}
</em>
<em ng-if="item.processed == false">
{% endverbatim %}
<i class="fa fa-cog fa-spin fa-fw"></i>{% trans "Layer not ready yet. Still finalizing layer ingestion..." %}
{% verbatim %}
</em>
{% endverbatim %}
<div class="alert alert-danger" ng-if="item.dirty_state == true">{% trans "SECURITY NOT YET SYNCHRONIZED" %}
{% verbatim %}<a href="{{ item.detail_url }}" class="btn btn-primary btn-block" data-dismiss="modal" ng-click="securityRefreshButton($event)">{% endverbatim %}{% trans "Sync permissions immediately" %}</a>
</div>
<div class="alert alert-warning" ng-if="item.dirty_state == false && item.is_approved == false">{% trans "PENDING APPROVAL" %}</div>
<div class="alert alert-danger" ng-if="item.dirty_state == false && item.is_approved == true && item.is_published == false">{% trans "UNPUBLISHED" %}</div>
{% verbatim %}

{% verbatim %}
<div class="abstract" ng-bind-html="item.abstract | limitTo: 300"></div>
<p class="abstract">{{ item.abstract.length > 300 ? '...' : ''}}</p>
<div class="row">
Expand Down
23 changes: 14 additions & 9 deletions geonode/templates/search/_search_content.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{% load i18n %}
<div class="row" ng-controller="CartList">
<div class="col-md-3">
<resource-cart data-facet-type="{{ facet_type }}" selectedString='{% trans "Selection" %}' emptyString="{% trans "No list items selected. Use the selection fields to add." %}" ></resource-cart>

{% if facet_type == 'layers' %}
<resource-cart data-facet-type="{{ facet_type }}" selectedString='{% trans "Selection" %}' emptyString="{% trans "No list items selected. Use the selection fields to add." %}" >
</resource-cart>
{% endif %}
<div class="row">
<div class="col-xs-12">
{% block bulk_perms_button %}
<div class="btn-group btn-group-justified" role="group" aria-label="tools">
{% if facet_type == 'layers' %}
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" ng-disabled="!cart.getCart().items.length" ng-click="newMap()">{% trans "Create a Map" %}</button>

{% if facet_type == 'layers' %}
{% block bulk_perms_button %}
<div class="btn-group btn-group-justified" role="group" aria-label="tools">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" ng-disabled="!cart.getCart().items.length" ng-click="newMap()">{% trans "Create a Map" %}</button>
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% endblock %}
{% endif %}

<div class="selections">
{% trans "Filters" %}
Expand Down

0 comments on commit c23d9c1

Please sign in to comment.