diff --git a/ckanext/odsh/helpers_tpsh.py b/ckanext/odsh/helpers_tpsh.py index 927313ed03fa9623f92f4f7e2018ed425c918891..695d372ec5cd4b70f18cb4f2edc4534607ad0390 100644 --- a/ckanext/odsh/helpers_tpsh.py +++ b/ckanext/odsh/helpers_tpsh.py @@ -222,4 +222,13 @@ def git_commit_hash(): command = 'git log -n 1 --format=%H' except: return 'unknown' - return subprocess.check_output([command], shell=True, cwd=current_dir) \ No newline at end of file + return subprocess.check_output([command], shell=True, cwd=current_dir) + +def is_informationsgegenstand_gerichtsurteil_selected(fields): + try: + return "Gerichtsurteil" in fields["subject_text"] + except KeyError: + return False + except: + log.exception("this should not raise an exception, fix please") + return False diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index a2b0d4a5bd9737a75604619213bfaefa6693a6a2..800184e223445fe3c9fd829441518a58fb5efbcc 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -384,6 +384,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm 'tpsh_get_address_org':helpers_tpsh.get_address_org, 'tpsh_get_body_mail':helpers_tpsh.get_body_mail, 'tpsh_git_commit_hash': helpers_tpsh.git_commit_hash, + 'tpsh_is_informationsgegenstand_gerichtsurteil_selected': helpers_tpsh.is_informationsgegenstand_gerichtsurteil_selected, } @@ -413,7 +414,3 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm score = s if score > 0: dict_pkg['openness'] = OdshPlugin.scores[score-1] - - - - diff --git a/ckanext/odsh/public/odsh.css b/ckanext/odsh/public/odsh.css index d057098f3448afbdfb61594557ab0f95ca36ee4c..c987aaced54585315686bb938b4df5310528378e 100644 --- a/ckanext/odsh/public/odsh.css +++ b/ckanext/odsh/public/odsh.css @@ -2837,3 +2837,8 @@ body.filters-modal div.row > aside.secondary.span3 { .tpsh-collection-list { list-style-type: none; } + +.tpsh-hint-gerichtsurteile { + font-size: 18px; + padding-top: 20px; +} diff --git a/ckanext/odsh/templates/package/search.html b/ckanext/odsh/templates/package/search.html index bf0c5c8adbc9c3ca9b49c6ccd4d914214311982c..41704a012ef1f0ef174372d3db222ba94ad5841e 100644 --- a/ckanext/odsh/templates/package/search.html +++ b/ckanext/odsh/templates/package/search.html @@ -24,6 +24,12 @@ method="get" data-module="select-switch"> {{ super() }} {% endblock %} {% block package_search_results_list %} + {% if h.tpsh_is_informationsgegenstand_gerichtsurteil_selected(c.fields_grouped) %} + <p class="tpsh-hint-gerichtsurteile"> + Gerichtsurteile der Gerichte in Schleswig-Holstein werden nicht im Transparenzportal veröffentlicht sondern bei + <a href="https://www.juris.de">juris.de</a>. + </p> + {% endif %} {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} {% endblock %} </div> diff --git a/ckanext/odsh/templates/snippets/search_form.html b/ckanext/odsh/templates/snippets/search_form.html index 9e1ea9ed0bb4d3b4941c5f72d83dcbeca6e9521a..d14cbccc8cda4573b4e39675957478a7a2e4149f 100644 --- a/ckanext/odsh/templates/snippets/search_form.html +++ b/ckanext/odsh/templates/snippets/search_form.html @@ -69,7 +69,7 @@ </div> {% endif %} {% endblock %} - + {% block search_facets %} {% if facets %} <p class="filter-list">