ckan 2.10 globals

This commit is contained in:
Elia Bellavista 2024-05-02 17:03:46 +02:00
parent 265cd14a42
commit 4316c96c80
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,9 @@
from flask import Flask, g
from ckan.lib.app_globals import app_globals
app = Flask(__name__)
# Aggiungi main_css al contesto globale di Flask
@app.before_request
def before_request():
g.main_css = app_globals.main_css

View File

@ -124,7 +124,8 @@
{% endblock %}
{% block header_site_search %}
<form class="section site-search simple-input" action="{% url_for controller='package', action='search' %}" method="get">
<!-- ho cambiato 'package' to 'dataset'-->
<form class="section site-search simple-input" action="{% url_for controller='dataset', action='search' %}" method="get">
<div class="field">
<label for="field-sitewide-search">{% block header_site_search_label %}{{ _('Search Datasets') }}{% endblock %}</label>
<input id="field-sitewide-search" type="text" name="q" placeholder="{{ _('Search') }}" />