-
Notifications
You must be signed in to change notification settings - Fork 1
/
weather.pt
39 lines (33 loc) · 1.56 KB
/
weather.pt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<dl class="portlet portletWeather"
i18n:domain="collective.weather"
tal:define="portal context/@@plone_portal_state/portal;
current_city view/current_city|nothing"
tal:condition="current_city">
<dt class="portletHeader">
<span tal:content="view/data/header">Weather</span>
</dt>
<dd i18n:domain="collective.weather"
tal:condition="current_city">
<span tal:define="city_name current_city/name|nothing"
tal:content="city_name">Cordoba, Argentina
</span>
<div class="current-weather"
tal:define="weather_info view/weather_info|nothing">
<div tal:condition="weather_info">
<tal:block tal:define="current_weather python:weather_info['weather']">
<img class="weather-icon"
tal:attributes="src python:current_weather['icon'];
title python:current_weather['conditions'];
alt python:current_weather['conditions']"
i18n:attributes="alt; title" />
<span class="weather-temp" tal:content="python:current_weather['temp']" />
</tal:block>
</div>
<div tal:condition="not:weather_info">
<img class="weather-icon" title="No weather information" alt="No weather information"
tal:attributes="src string:++resource++collective.weather.icons/NA.png"
i18n:attributes="alt; title" />
</div>
</div>
</dd>
</dl>