Beispiel #1
0
 private function get_choose_track_html(igc_parser $track)
 {
     $parts = [];
     foreach ($track->get_split_parts() as $key => $part) {
         $parts[] = node::create('tr', ['style' => 'color:#' . get::kml_colour($key)], [node::create('td', [], 'Part: ' . $key), node::create('td', [], $part->duration . 's'), node::create('td', [], $part->points), node::create('td a.choose.button', ['data-ajax-click' => get_class($this) . ':do_choose_track', 'data-ajax-post' => '{"track":' . $track->id . ', "section": ' . $key . '}', 'data-ajax-shroud' => '#igc_upload_form_wrapper'], 'Choose')]);
     }
     $html = node::create('table', [], [node::create('thead tr', [], [node::create('th', [], 'Part'), node::create('th', [], 'Duration'), node::create('th', [], 'Points'), node::create('th', [], '')]), node::create('tbody', [], $parts)]);
     return $html;
 }