Skip to content

Commit

Permalink
use theme instead of main_css in CKAN >=2.9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Dec 4, 2022
1 parent 9ddc29c commit 97036fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions ckanext/geoview/templates/geoview/snippets/geojson_asset.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %}
{# strip '/base/' prefix and '.css' suffix #}
{% asset main_css[6:-4] %}
{% if h.ckan_version().split('.') | map('int')| list >= [2, 9, 6] %}
{% set theme = h.get_rtl_theme() if h.is_rtl_language() else g.theme %}
{% asset theme %}
{% else %}
{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %}
{# strip '/base/' prefix and '.css' suffix #}
{% asset main_css[6:-4] %}
{% endif %}

{% asset 'ckanext-geoview/geojson_js' %}
{% asset 'ckanext-geoview/geojson_css' %}
11 changes: 8 additions & 3 deletions ckanext/geoview/templates/geoview/snippets/shp_asset.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %}
{# strip '/base/' prefix and '.css' suffix #}
{% asset main_css[6:-4] %}
{% if h.ckan_version().split('.') | map('int')| list >= [2, 9, 6] %}
{% set theme = h.get_rtl_theme() if h.is_rtl_language() else g.theme %}
{% asset theme %}
{% else %}
{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %}
{# strip '/base/' prefix and '.css' suffix #}
{% asset main_css[6:-4] %}
{% endif %}

{% asset 'ckanext-geoview/shp_js' %}
{% asset 'ckanext-geoview/shp_css' %}

0 comments on commit 97036fa

Please sign in to comment.