mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2024-11-10 00:27:21 +01:00
Fixed template data piping
This commit is contained in:
parent
a33473fdc9
commit
bfa383ddbe
@ -45,7 +45,8 @@ impl Engine {
|
||||
let mut context = tera::Context::new();
|
||||
context.insert("view", &template_name);
|
||||
//intented for shared macros
|
||||
context.insert("format", &settings.format.to_string());
|
||||
context.insert("format", &settings.format.get_name());
|
||||
context.insert("mimetype", &settings.format.get_mime_type());
|
||||
context.insert("language", &settings.lang);
|
||||
context.insert("dns_resolvers", &settings.available_dns_resolvers);
|
||||
context.insert("dns_resolver_id", &settings.dns_resolver_id);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% macro place_dl(place, label="", iso_code_prefix="") -%}
|
||||
{%- if place -%}
|
||||
{%- if format=="text/html" %}
|
||||
{%- if format=="html" %}
|
||||
{% if label %}<dt>{{label}}</dt>{% endif %}
|
||||
<dd>{{place.name}} {% if place.iso_code%}({% if iso_code_prefix %}{{iso_code_prefix}}-{% endif %}{{place.iso_code}}){% endif %}</dd>
|
||||
{% else -%}
|
||||
|
Loading…
Reference in New Issue
Block a user