Skip to content

Commit

Permalink
[Fixes #10171] Dynamic rendering of document_detail view template (#1…
Browse files Browse the repository at this point in the history
…0172) (#10173)

* add preview mode to document metadata page

* Remove Return to button inside metadata detail page

Co-authored-by: Giovanni Allegri <giohappy@gmail.com>
  • Loading branch information
github-actions[bot] and giohappy committed Oct 19, 2022
1 parent 3d9c94a commit df73651
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
{% extends "metadata_detail.html" %}
{% extends "metadata_detail.html" %}

{% block header %}
{% if 'preview' not in request.GET %}
{% include 'geonode-mapstore-client/snippets/header.html' %}
{% endif %}
{% endblock %}

{% block footer %}
{% if 'preview' not in request.GET %}
{% include 'geonode-mapstore-client/snippets/footer.html' %}
{% endif %}
{% endblock %}
11 changes: 0 additions & 11 deletions geonode/templates/metadata_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@


<div class="page-header">
{% if resource.class_name == "Document" %}
{% if "download_resourcebase" in perms %}
<a href="{% document_detail_url resource %}" class="btn btn-primary pull-right">{% trans "Return to Document" %}</a>
{% endif %}
{% elif resource.class_name == "Layer" %}
<a href="{% dataset_detail_url resource %}" class="btn btn-primary pull-right">{% trans "Return to Layer" %}</a>
{% elif resource.class_name == "Map" %}
<a href="{% map_detail_url resource %}" class="btn btn-primary pull-right">{% trans "Return to Map" %}</a>
{% elif resource.class_name == "GeoApp" %}
<a href="{% geoapp_detail_url resource %}" class="btn btn-primary pull-right">{% trans "Return to" %} {{ resource.type }}</a>
{% endif %}
<h2 class="page-title">{% trans "Metadata" %} : {{ resource.title }}</h2>
</div>

Expand Down

0 comments on commit df73651

Please sign in to comment.