Implementation a microservice architecture with JSON-RPC 2.0 communication between backend and frontend https://www.jsonrpc.org/specification
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

66 lines
2.8 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
{% block javascripts %}{% endblock %}
</head>
<body>
{% block body %}
{% if weatherForm is defined and weatherForm %}
<h3>Погода за день</h3>
{{ form_errors(weatherForm) }}
{{ form_start(weatherForm) }}
{{ form_widget(weatherForm) }}
{{ form_end(weatherForm) }}
{% if weather.error.code is defined and weather.error.code
and weather.error.message is defined and weather.error.message
%}
<p> {{ weather.error.code }} {{ weather.error.message }}.</p>
{% else %}
{% if weather.result.temp is defined and weather.result.temp %}
<p>Температура {{ weather.result.temp }} градусов</p>
{% else %}
<p>Температура за указанный день не указана</p>
{% endif %}
{% endif %}
{% endif %}
{% if history is defined and history %}
<h3>Погода за последние 30 дней</h3>
{% if history.error.code is defined and history.error.code
and history.error.message is defined and history.error.message
%}
<p>{{ history.error.code }} {{ history.error.message }}</p>
{% else %}
{% if history.result is defined and history.result %}
<table border="1">
<tr>
<th>Дата</th>
<th>Температура</th>
</tr>
{% for element in history.result %}
<tr>
<td>
{% if element.date_at is defined and element.date_at %}
{{ element.date_at }}
{% endif %}
</td>
<td>
{% if element.temp is defined and element.temp %}
{{ element.temp }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}
</body>
</html>