|
302 | 302 | </p> |
303 | 303 | <?php |
304 | 304 | echo $editor->display('description', $description, '100%', '200px', null, null, false, null); |
305 | | - echo HTMLHelper::_('bootstrap.startAccordion', 'calcVals'); |
306 | | - echo HTMLHelper::_('bootstrap.addSlide', 'calcVals', '<div class="jtg-header">'.JText::_('COM_JTG_CALCULATED_VALUES').'</div>', 'collapse1'); |
| 305 | + if (isset($this->id) && isset($this->gpsTrack)) |
| 306 | + { |
| 307 | + echo HTMLHelper::_('bootstrap.startAccordion', 'calcVals'); |
| 308 | + echo HTMLHelper::_('bootstrap.addSlide', 'calcVals', '<div class="jtg-header">'.JText::_('COM_JTG_CALCULATED_VALUES').'</div>', 'collapse1'); |
307 | 309 | ?> |
308 | 310 | <table class="table"> |
309 | 311 | <tbody> |
310 | 312 | <tr> |
311 | 313 | <td><?php echo JText::_('COM_JTG_DISTANCE'); ?></td> |
312 | 314 | <td><input id="distance" type="text" name="distance" class="form-control" value="<?php echo $this->track->distance; ?>" /> <?php echo JText::_('COM_JTG_DISTANCE_UNIT_'.strtoupper($this->cfg->unit)); |
313 | | - if (isset($this->gpsTrack)) echo ' <font color="grey">( '.JtgHelper::getFormattedDistance($this->gpsTrack->distance, '',$this->cfg->unit).' )</font>'; ?> </td> |
| 315 | + echo ' <font color="grey">( '.JtgHelper::getFormattedDistance($this->gpsTrack->distance, '',$this->cfg->unit).' )</font>'; ?> </td> |
314 | 316 | </tr> |
315 | 317 | <tr> |
316 | 318 | <td><?php echo JText::_('COM_JTG_ELEVATION_UP') ?></td> |
317 | 319 | <td><input id="ascent" type="text" name="ascent" class="form-control" value="<?php echo $this->track->ele_asc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT'); |
318 | | - if (isset($this->gpsTrack)) echo ' <font color="grey">( '.$this->gpsTrack->totalAscent.' ) </font>'; ?> </td> |
| 320 | + echo ' <font color="grey">( '.$this->gpsTrack->totalAscent.' ) </font>'; ?> </td> |
319 | 321 | </tr> |
320 | 322 | <tr> |
321 | 323 | <td><?php echo JText::_('COM_JTG_ELEVATION_DOWN') ?></td> |
322 | 324 | <td><input id="descent" type="text" name="descent" class="form-control" value="<?php echo $this->track->ele_desc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT'); |
323 | | - if (isset($this->gpsTrack)) echo ' <font color="grey">( '.$this->gpsTrack->totalDescent.' )</font>'; ?> </td> |
| 325 | + echo ' <font color="grey">( '.$this->gpsTrack->totalDescent.' )</font>'; ?> </td> |
324 | 326 | </tr> |
325 | 327 | </tbody> |
326 | 328 | </table> |
327 | 329 | </div> |
328 | 330 | <?php |
329 | 331 | echo HTMLHelper::_('bootstrap.endSlide'); |
330 | 332 | echo HTMLHelper::_('bootstrap.endAccordion'); |
| 333 | + } |
331 | 334 | $max_images = $this->cfg->max_images; |
332 | 335 |
|
333 | 336 | if (!empty($this->imageList)) |
|
0 commit comments