Пример #1
0
 /**
  * @covers UserData::getMuscles
  * @todo Implement testGetMuscles().
  */
 public function testGetMuscles()
 {
     $this->assertEquals($this->object->getMuscles(), 43.2);
 }
    /**
     * Display the content (old design)
     */
    protected function displayContentInOldDesign()
    {
        $Weight = '';
        $Pulse = '';
        $Analyse = '';
        $UserData = new UserData(DataObject::$LAST_OBJECT);
        if ($this->Configuration()->value('use_weight')) {
            $Weight = __('Weight') . ': <strong>' . Helper::Unknown($UserData->getWeight(), '-') . ' kg</strong><br>';
        }
        if ($this->Configuration()->value('use_pulse')) {
            $Pulse = Helper::Unknown($UserData->getPulseRest(), '-') . ' bpm / ' . Helper::Unknown($UserData->getPulseMax()) . ' bpm';
        } else {
            $Pulse = Helper::Unknown($UserData->getPulseMax(), '-') . ' bpm';
        }
        if ($this->Configuration()->value('use_body_fat')) {
            $Analyse = __('Fat') . ': ' . Helper::Unknown($UserData->getBodyFat(), '-') . ' &#37;, ' . __('Water') . ': ' . Helper::Unknown($UserData->getWater(), '-') . ' &#37;, ' . __('Muscles') . ': ' . Helper::Unknown($UserData->getMuscles(), '-') . ' &#37;';
        }
        $AnalyseIsHidden = $this->Configuration()->value('use_weight') || $this->Configuration()->value('use_pulse');
        if (!$AnalyseIsHidden && !$this->Configuration()->value('use_body_fat')) {
            return;
        }
        echo '
			<div id="sportler-content">
				<span class="right">' . $Pulse . '</span>
				' . Ajax::flotChange($Weight, 'sportler_flots', 'sportler_weights') . '
				' . Ajax::flotChange($Analyse, 'sportler_flots', 'sportler_analyse', !$AnalyseIsHidden) . '

				<div id="sportler_flots" class="flot-changeable" style="position:relative;width:320px;height:150px;margin:0 auto;">
					<div class="flot ' . Ajax::$IMG_WAIT . '" id="sportler_weights" style="width:320px;height:150px;position:absolute;"></div>
					<div class="flot ' . Ajax::$IMG_WAIT . ($AnalyseIsHidden ? ' flot-hide' : '') . '" id="sportler_analyse" style="width:320px;height:150px;position:absolute;"></div>
				</div>
			</div>';
        include FRONTEND_PATH . '../plugin/' . $this->key() . '/Plot.gewicht.php';
        include FRONTEND_PATH . '../plugin/' . $this->key() . '/Plot.analyse.php';
    }