1<div data-role="content" data-inset="true">
2<?php
3
4if($this->data->MACRO['TITLE'])
5    echo "<strong>".$this->data->MACRO['TITLE']."</strong><p>\n";
6if($this->data->MACRO['COMMENT'])
7    echo $this->data->MACRO['COMMENT']."<p>\n";
8
9$last_view = -1;
10foreach($this->data->STRUCT as $d){
11    if($d['VIEW'] > $last_view){ # a new header begins
12        if($last_view != -1 ){   # close last div
13            print "</div>\n";
14        }
15        printf("<div class=\"timerange ui-bar-b ui-corner-top\">%s</div>\n", $d['TIMERANGE']['title']  );
16        printf("<div class=\"datasource ui-bar-c ui-corner-bottom\">%s\n", $d['ds_name']);
17        printf("<div><img style=\"max-width: 100%%\" src=\"".url::base(TRUE)."image?tpl=%s&view=%s&source=%s\"></div>\n",
18            $this->tpl,
19            $d['VIEW'],
20            $d['SOURCE']
21        );
22        $last_view++;
23    }else{
24        printf("<div>%s</div>\n", $d['ds_name']);
25        printf("<div><img style=\"max-width: 100%%\" src=\"".url::base(TRUE)."image?tpl=%s&view=%s&source=%s\"></div>\n",
26            $this->tpl,
27            $d['VIEW'],
28            $d['SOURCE']
29        );
30    }
31}
32?>
33</div>
34