/** * Display elevation correction */ protected function displayElevationCorrection() { $Fieldset = new FormularFieldset(__('Elevation correction')); if ($this->Context->route()->elevationsCorrected()) { $Fieldset->addSmallInfo(__('Elevation data have been corrected.')); } else { $Linker = new Runalyze\View\Activity\Linker($this->Context->activity()); // TODO: add link to "reload" if correction has been done via ajax $Fieldset->setHtmlCode('<p class="warning small block" id="gps-results"> ' . __('Elevation data has not been corrected.') . '<br> <br> <a class="ajax" target="gps-results" href="' . $Linker->urlToElevationCorrection() . '"><strong>» ' . __('correct now') . '</strong></a> </p>'); } $Fieldset->display(); }
/** * Display standard values */ protected function displayStandardValues() { if ($this->manualElevation != $this->calculatedElevation) { $Linker = new Runalyze\View\Activity\Linker($this->Context->activity()); $useCalculatedValueLink = Ajax::window('<a class="small as-input" href="' . $Linker->urlToElevationInfo('use-calculated-value=true') . '">» ' . __('apply data') . '</a>', 'normal'); } else { $useCalculatedValueLink = ''; } $Fieldset = new FormularFieldset(__('General data')); $Fieldset->setHtmlCode(' <div class="w50"> <label>' . Ajax::tooltip(__('manual value'), __('If you did not insert a value by hand, this value has been calculated.')) . '</label> <span class="as-input">' . Elevation::format($this->manualElevation) . '</span> </div> <div class="w50"> <label>' . __('Lowest point') . '</label> <span class="as-input">' . Elevation::format($this->lowestPoint) . '</span> </div> <div class="w50"> <label>' . Ajax::tooltip(__('calculated value'), __('This value is calculated with your current configuration. The saved value may be outdated.')) . '</label> <span class="as-input">' . Elevation::format($this->calculatedElevation) . '</span> ' . $useCalculatedValueLink . ' </div> <div class="w50"> <label>' . __('Highest point') . '</label> <span class="as-input">' . Elevation::format($this->highestPoint) . '</span> </div> <div class="w50"> <label>ø ' . __('Gradient') . '</label> <span class="as-input">' . $this->Context->dataview()->gradientInPercent() . '</span> </div> <div class="w50"> <label>' . __('Up/Down') . '</label> <span class="as-input">+' . Elevation::format($this->Context->route()->elevationUp()) . ' / -' . Elevation::format($this->Context->route()->elevationDown()) . '</span> </div> '); $Fieldset->display(); }