/**
     * Get fieldset for paces
     * @return \FormularFieldset
     */
    public function getFieldsetPaces()
    {
        $Table = '<table class="fullwidth zebra-style">
				<thead>
					<tr>
						<th>' . __('Name') . '</th>
						<th class="small">' . __('Pace') . '</th>
						<th class="small">' . __('Description') . '</th>
					</tr>
				</thead>
				<tbody>';
        $VDOT = new VDOT(Configuration::Data()->vdot());
        $PaceObject = new Runalyze\Activity\Pace(0, 1, SportFactory::getSpeedUnitFor(Configuration::General()->runningSport()));
        foreach ($this->getArrayForPaces() as $Pace) {
            $Table .= '<tr>
						<td class="b">' . $Pace['short'] . '</td>
						<td class=""><em>' . $PaceObject->setTime($VDOT->paceAt($Pace['limit-high'] / 100))->value() . '</em> - <em>' . $PaceObject->setTime($VDOT->paceAt($Pace['limit-low'] / 100))->value() . '</em>' . $PaceObject->appendix() . '</td>
						<td class="">' . $Pace['description'] . '</td>
					</tr>';
        }
        $Table .= '
				</tbody>
			</table>';
        $Fieldset = new FormularFieldset(__('Training paces'));
        $Fieldset->addBlock($Table);
        $Fieldset->addInfo(__('These paces are based on Jack Daniels\' recommendation.'));
        return $Fieldset;
    }
    /**
     * Get fieldset for paces
     * @return \FormularFieldset
     */
    public function getFieldsetPaces()
    {
        $Table = '<table class="fullwidth zebra-style">
				<thead>
					<tr>
						<th>' . __('Name') . '</th>
						<th class="small">' . __('Pace') . '</th>
						<th class="small">' . __('Description') . '</th>
					</tr>
				</thead>
				<tbody>';
        $VDOT = new VDOT(Configuration::Data()->vdot());
        foreach ($this->getArrayForPaces() as $Pace) {
            $Table .= '<tr>
						<td class="b">' . $Pace['short'] . '</td>
						<td class=""><em>' . Duration::format($VDOT->paceAt($Pace['limit-low'] / 100)) . '</em>&nbsp;-&nbsp;<em>' . Duration::format($VDOT->paceAt($Pace['limit-high'] / 100)) . '</em>/km</td>
						<td class="">' . $Pace['description'] . '</td>
					</tr>';
        }
        $Table .= '
				</tbody>
			</table>';
        $Fieldset = new FormularFieldset(__('Training paces'));
        $Fieldset->addBlock($Table);
        $Fieldset->addInfo(__('These paces are based on Jack Daniels\' recommendation.'));
        return $Fieldset;
    }
示例#3
0
		<?php 
foreach ($this->Range as $value) {
    ?>
		<?php 
    $VDOT->setValue($value);
    ?>
		<tr>
			<td class="b"><?php 
    echo $value;
    ?>
</td>
			<?php 
    foreach ($this->Paces as $data) {
        ?>
			<td><?php 
        echo Duration::format($VDOT->paceAt($data['percent'] / 100));
        ?>
</td>
			<?php 
    }
    ?>
		</tr>
		<?php 
}
?>
	</tbody>
</table>

<?php 
echo Ajax::wrapJS('$("#jd-tables-prognosis td.b").each(function(){ if ($(this).text() == \'' . round(Configuration::Data()->vdot()) . '\') $(this).parent().addClass("highlight"); });');
?>