Ejemplo n.º 1
0
 /**
  * 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 '';
 }
Ejemplo n.º 2
0
 /**
  * @param \Runalyze\Dataset\Context $context
  * @return string
  * @codeCoverageIgnore
  */
 protected function inlineDropdownWithRealLinks(Context $context)
 {
     $id = $context->activity()->id();
     $html = '<li>' . \Ajax::window('<a href="' . $context->linker()->editUrl() . '">' . \Icon::$EDIT . ' ' . __('Edit') . '</a> ', 'small') . '</li>';
     $html .= '<li><span class="link" data-action="privacy" data-activityid="' . $id . '">' . $this->privacyIconAndLabel($context) . '</span></li>';
     $html .= '<li><span class="link" data-action="delete" data-activityid="' . $id . '" data-confirm="' . __('Do you really want to delete this activity?') . '"><i class="fa fa-fw fa-trash"></i> ' . __('Delete activity') . '</span></li>';
     $html .= $context->activity()->isPublic() ? '<li><a href="' . $context->linker()->publicUrl() . '" target="_blank" onclick="(arguments[0] || window.event).stopPropagation();">' . \Icon::$ATTACH . ' ' . __('Public link') . '</a></li>' : '';
     return $html;
 }
Ejemplo n.º 3
0
 /**
  * @param \Runalyze\Dataset\Context $context
  * @return string
  */
 public function codeForShortLink(Context $context)
 {
     return $context->linker()->linkWithSportIcon(Tooltip::POSITION_RIGHT);
 }