Skip to content

Commit

Permalink
Merge pull request #7918 from ckan/remove-recline-views
Browse files Browse the repository at this point in the history
Remove Recline view plugins
  • Loading branch information
pdelboca committed Nov 20, 2023
2 parents 56ebea0 + ab8fc28 commit dab1b46
Show file tree
Hide file tree
Showing 157 changed files with 12 additions and 77,254 deletions.
1 change: 1 addition & 0 deletions changes/7918.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Recline-based view plugins (``recline_view``, ``recline_grid_view``, ``recline_map_view``, etc) have been removed and are no longer available. Users are encouraged to use the DataTables-based view (``datatables_view``) or some of the `community maintained alternatives <https://docs.ckan.org/en/2.10/maintaining/data-viewer.html#other-view-plugins>`_
7 changes: 1 addition & 6 deletions ckan/cli/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,7 @@ def _add_default_filters(search_data_dict: dict[str, Any],
elif view_type == u"pdf_view":
filter_formats.extend([u"pdf", u"PDF"])

elif view_type in [
u"recline_view",
u"recline_grid_view",
u"recline_graph_view",
u"recline_map_view",
]:
elif view_type == "datatables_view":

if datapusher_formats[0] in filter_formats:
continue
Expand Down
9 changes: 0 additions & 9 deletions ckan/templates/package/new_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
{% endblock %}

{% block form %}
{% if resource_view.view_type == 'recline_view' and not datastore_available %}
<p class="text-info">
<i class="fa fa-info-circle"></i>
{% trans %}
Data Explorer views may be slow and unreliable unless the DataStore extension is enabled. For more information, please see the <a href='http://docs.ckan.org/en/latest/maintaining/data-viewer.html#viewing-structured-data-the-data-explorer' target='_blank'>Data Explorer documentation</a>.
{% endtrans %}
</p>
{% endif %}

<form method="post" data-module="basic-form resource-form">
{{ h.csrf_input() }}
{% include 'package/snippets/view_form.html' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ msgstr ""
#: ckan/templates/package/snippets/data_api_button.html:8
#: ckan/templates/tests/mock_json_resource_preview_template.html:7
#: ckan/templates/tests/mock_resource_preview_template.html:7
#: ckanext/reclineview/theme/templates/recline_view.html:12
#: ckanext/textview/theme/templates/text_view.html:9
msgid "Loading..."
msgstr ""
Expand Down
10 changes: 5 additions & 5 deletions ckanext/datapusher/tests/test_default_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from ckanext.datapusher.tests import get_api_token


@pytest.mark.ckan_config("ckan.views.default_views", "recline_grid_view")
@pytest.mark.ckan_config("ckan.views.default_views", "datatables_view")
@pytest.mark.ckan_config(
"ckan.plugins", "datapusher datastore recline_grid_view"
"ckan.plugins", "datapusher datastore datatables_view"
)
@pytest.mark.ckan_config("ckan.datapusher.api_token", get_api_token())
@pytest.mark.usefixtures("non_clean_db", "with_plugins")
Expand Down Expand Up @@ -54,12 +54,12 @@ def test_datapusher_creates_default_views_on_complete():
views = helpers.call_action("resource_view_list", id=resource["id"])

assert len(views) == 1
assert views[0]["view_type"] == "recline_grid_view"
assert views[0]["view_type"] == "datatables_view"


@pytest.mark.ckan_config("ckan.views.default_views", "recline_grid_view")
@pytest.mark.ckan_config("ckan.views.default_views", "datatables_view")
@pytest.mark.ckan_config(
"ckan.plugins", "datapusher datastore recline_grid_view"
"ckan.plugins", "datapusher datastore datatables_view"
)
@pytest.mark.ckan_config("ckan.datapusher.api_token", get_api_token())
@pytest.mark.usefixtures("non_clean_db", "with_plugins")
Expand Down
Empty file removed ckanext/reclineview/__init__.py
Empty file.

0 comments on commit dab1b46

Please sign in to comment.