"url()" dicenta "url_for()"
This commit is contained in:
parent
678e378483
commit
265cd14a42
|
@ -172,7 +172,7 @@
|
|||
</head>
|
||||
|
||||
{# Allows custom attributes to be added to the <body> tag #}
|
||||
<body{% block bodytag %} data-site-root="{{ h.url('/', locale='default', qualified=true) }}" data-locale-root="{{ h.url('/', qualified=true) }}" {% endblock %}>
|
||||
<body {% block bodytag %} data-site-root="{{ h.url_for('/', locale='default', qualified=true) }}" data-locale-root="{{ h.url_for('/', qualified=true) }}" {% endblock %}>
|
||||
<div id="ckan-page-loading"></div>
|
||||
{#
|
||||
The page block allows you to add content to the page. Most of the time it is
|
||||
|
|
|
@ -95,10 +95,10 @@
|
|||
|
||||
{% block header_logo %}
|
||||
{% if g.site_logo %}
|
||||
<a class="logo" href="{{ h.url('home') }}"><img src="{{ h.url_for_static_or_external(g.site_logo) }}" alt="{{ g.site_title }}" title="{{ g.site_title }}" /></a>
|
||||
<a class="logo" href="{{ h.url_for('home') }}"><img src="{{ h.url_for_static_or_external(g.site_logo) }}" alt="{{ g.site_title }}" title="{{ g.site_title }}" /></a>
|
||||
{% else %}
|
||||
<h1>
|
||||
<a href="{{ h.url('home') }}">{{ g.site_title }}</a>
|
||||
<a href="{{ h.url_for('home') }}">{{ g.site_title }}</a>
|
||||
</h1>
|
||||
{% if g.site_description %}<h2>{{ g.site_description }}</h2>{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{% block secondary_content %}
|
||||
{% snippet 'snippets/organization.html', organization=c.group_dict, show_nums=true %}
|
||||
{# ADDED BY FRANCESCO MANGIACRAPA SEE #12651 #}
|
||||
{% set alternative_url = h.url(controller='organization', action='read', id=c.group_dict.name) %}
|
||||
{% set alternative_url = h.url_for(controller='organization', action='read', id=c.group_dict.name) %}
|
||||
{% snippet 'spatial/snippets/spatial_query.html', alternative_url=alternative_url %}
|
||||
{# END #}
|
||||
{% block organization_facets %}{% endblock %}
|
||||
|
|
|
@ -79,7 +79,7 @@ if(window.addEventListener){
|
|||
<div class="module info alert alert-info">
|
||||
<p class="module-content">
|
||||
{% set timestamp = h.render_datetime(c.revision_date, with_hours=True) %}
|
||||
{% set url = h.url(controller='package', action='read', id=pkg.name) %}
|
||||
{% set url = h.url_for(controller='package', action='read', id=pkg.name) %}
|
||||
|
||||
{% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the <a href="{{ url }}">current revision</a>.{% endtrans %}
|
||||
</p>
|
||||
|
|
|
@ -49,16 +49,16 @@
|
|||
{#Added by Francesco Mangiacrapa; see: 8964 #}
|
||||
<script type="text/javascript" >
|
||||
|
||||
checkTheBreadcrumb = function () {
|
||||
CKAN_D4S_Breadcrumb_Manager.checkBreadcrumbShow();
|
||||
}
|
||||
|
||||
if(window.addEventListener){
|
||||
window.addEventListener('load', checkTheBreadcrumb)
|
||||
}else{
|
||||
window.attachEvent('onload',checkTheBreadcrumb)
|
||||
}
|
||||
</script>
|
||||
checkTheBreadcrumb = function () {
|
||||
CKAN_D4S_Breadcrumb_Manager.checkBreadcrumbShow();
|
||||
}
|
||||
|
||||
if(window.addEventListener){
|
||||
window.addEventListener('load', checkTheBreadcrumb)
|
||||
}else{
|
||||
window.attachEvent('onload',checkTheBreadcrumb)
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -136,9 +136,9 @@
|
|||
{% endblock -%}
|
||||
|
||||
{#
|
||||
Override the footer on a page by page basis by extending this block. If
|
||||
making sitewide header changes it is preferable to override the footer.html-u
|
||||
file.
|
||||
Override the footer on a page by page basis by extending this block. If
|
||||
making sitewide header changes it is preferable to override the footer.html-u
|
||||
file.
|
||||
#}
|
||||
{%- block footer %}
|
||||
{% include "footer.html" %}
|
||||
|
@ -148,8 +148,8 @@
|
|||
{%- block scripts %}
|
||||
{% asset 'base/main' %}
|
||||
{% asset 'base/ckan' %}
|
||||
{% if g.tracking_enabled %}
|
||||
{% if g.tracking_enabled %}
|
||||
{% asset 'base/tracking.js' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
{% endblock -%}
|
||||
|
|
Loading…
Reference in New Issue