/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->condition()->isUnknown() && ($context->hasSport() || $context->sport()->isOutside())) { return $context->activity()->weather()->condition()->icon()->code(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->temperature()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return \Runalyze\Activity\Temperature::format($context->activity()->weather()->temperature()->value(), true, false); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->activity()->get(Activity\Entity::ROUTEID) > 0) { return \Helper::Cut($context->factory()->route($context->activity()->get(Activity\Entity::ROUTEID))->name(), self::DEFAULT_CUT); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->pressure()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return $context->activity()->weather()->pressure()->string(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->temperature()->isUnknown() && !$context->activity()->weather()->windSpeed()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return $context->dataview()->windChillFactor()->string(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->splits()->isEmpty()) { if ($context->activity()->splits()->hasActiveAndInactiveLaps() || round($context->activity()->splits()->totalDistance()) != round($context->activity()->distance()) || $context->hasType() && $context->type()->id() == Configuration::General()->competitionType()) { $Icon = new Icon(Icon::CLOCK); $Icon->setTooltip($this->stringForActiveLaps($context->activity()->splits())); return $Icon->code(); } } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->activity()->distance() > 0) { if ($context->hasData(self::DURATION_SUM_WITH_DISTANCE_KEY)) { if ($context->data(self::DURATION_SUM_WITH_DISTANCE_KEY) > 0) { $Pace = new Activity\Pace($context->data(self::DURATION_SUM_WITH_DISTANCE_KEY), $context->activity()->distance(), $context->hasSport() ? $context->sport()->paceUnitEnum() : Activity\Pace::STANDARD); return $Pace->valueWithAppendix(); } return ''; } return $context->dataview()->pace()->valueWithAppendix(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->activity()->hrAvg() > 0) { return $context->dataview()->hrAvg()->string(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->activity()->isPublic()) { return '<a href="' . $context->linker()->publicUrl() . '" target="_blank">' . Icon::$ATTACH . '</a>'; } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->hasData(self::KEY_DISTANCE_COMPARISON)) { return $context->dataview()->distance() . $this->distanceComparison($context->activity()->distance(), $context->data(self::KEY_DISTANCE_COMPARISON)); } return $context->dataview()->distance(); }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { $weather = $context->activity()->weather(); if ((!$weather->windSpeed()->isUnknown() || !$weather->windDegree()->isUnknown()) && !($context->hasSport() && !$context->sport()->isOutside())) { return (new WindIcon($weather->windSpeed(), $weather->windDegree()))->code(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->isRunning() && $context->dataview()->usedVdot() > 0) { if (!$context->activity()->usesVDOT()) { return '<span class="unimportant">' . $context->dataview()->vdot()->value() . '</span>'; } return $context->dataview()->vdot()->value(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { return $context->activity()->totalStrokes(); }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { return \Helper::Cut($context->activity()->partner()->asString(), 20); }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { return \Helper::Cut($context->activity()->comment(), 20); }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { return $context->activity()->swolf(); }
/** * @param \Runalyze\Dataset\Context $context * @return string */ protected function privacyIconAndLabel(Context $context) { if ($context->activity()->isPublic()) { $privacyLabel = __('Make private'); $privacyIcon = 'fa-lock'; } else { $privacyLabel = __('Make public'); $privacyIcon = 'fa-unlock'; } return '<i class="fa fa-fw ' . $privacyIcon . '"></i> ' . $privacyLabel; }
/** * @param \Runalyze\Dataset\Context $context * @return string */ public function codeForPublicIcon(Context $context) { if ($context->activity()->isPublic()) { return \HTML::td(\Icon::$ADD_SMALL_GREEN, 'link'); } return '<td></td>'; }