/** * Display navigation */ protected function displayNavigation() { $Links = array(); foreach ($this->Tabs as $Tab) { $Links[] = array('tag' => Ajax::link($Tab->getTitle(), self::$TABS_ID, $Tab->getUrl())); } echo Ajax::toolbarNavigation($Links); }
/** * Get a ajax-link to a specified DataBrowser * @param string $name Name to be displayed as link * @param int $start Timestamp for first date in browser * @param int $end Timestamp for last date in browser * @param string $title title for the link * @param string $rel * @return string HTML-link */ static function link($name, $start, $end, $title = '', $rel = '') { if (FrontendShared::$IS_SHOWN) { return DataBrowserShared::getLink($name, $start, $end, $title = ''); } $href = 'call/call.DataBrowser.display.php?start=' . $start . '&end=' . $end; return Ajax::link($name, DATA_BROWSER_ID, $href, $rel, $title); }
/** * Method for getting the right symbol(s) */ protected function getRightSymbol() { $Links = ''; $Links .= '<li class="with-submenu">' . Ajax::link(__('Type'), 'panel-' . $this->id(), Plugin::$DISPLAY_URL . '?id=' . $this->id()); $Links .= '<ul class="submenu">'; foreach ($this->AllTypes as $Type) { $active = $Type['id'] == (int) $this->Configuration()->value('type'); $Links .= '<li' . ($active ? ' class="active"' : '') . '>' . Ajax::link($Type['name'], 'panel-' . $this->id(), Plugin::$DISPLAY_URL . '?id=' . $this->id() . '&type=' . $Type['id']) . '</li>'; } $Links .= '</ul>'; $Links .= '</li>'; $Links .= '<li>' . Ajax::window('<a href="' . ConfigTabs::$CONFIG_URL . '?key=config_tab_equipment" ' . Ajax::tooltip('', __('Add/Edit equipment'), true, true) . '>' . Icon::$ADD . '</a>') . '</li>'; $Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.equipment.table.php" ' . Ajax::tooltip('', __('Show all equipment'), true, true) . '>' . Icon::$TABLE . '</a>') . '</li>'; return '<ul>' . $Links . '</ul>'; }
/** * Get a ajax-link to a specified DataBrowser * @param string $name Name to be displayed as link * @param int $start Timestamp for first date in browser * @param int $end Timestamp for last date in browser * @param string $title title for the link * @return string HTML-link */ static function getLink($name, $start, $end, $title = '') { $href = self::getBaseUrl() . '?start=' . $start . '&end=' . $end; return Ajax::link($name, DATA_BROWSER_SHARED_ID, $href, '', $title); }
$Shoe = new Shoe(DataObject::$DEFAULT_ID); } else { $Header = __('Edit shoe'); $Mode = StandardFormular::$SUBMIT_MODE_EDIT; $Shoe = new Shoe(Request::sendId()); } $Formular = new StandardFormular($Shoe, $Mode); if ($Formular->submitSucceeded()) { header('Location: window.schuhe.table.php'); ShoeFactory::clearCache(); exit; } if (Request::sendId() > 0) { $DeleteText = '<strong>' . __('Delete shoe') . ' »</strong>'; $DeleteUrl = $_SERVER['SCRIPT_NAME'] . '?delete=true&id=' . $Shoe->id(); $DeleteLink = Ajax::link($DeleteText, 'ajax', $DeleteUrl); if ($Shoe->getKm() != $Shoe->getAdditionalKm()) { $DeleteLink = __('The shoe cannot be deleted as long it is used for some activity.'); } $DeleteFieldset = new FormularFieldset(__('Delete shoe')); $DeleteFieldset->addWarning($DeleteLink); $Formular->addFieldset($DeleteFieldset); } $Factory = new PluginFactory(); $Plugin = $Factory->newInstance('RunalyzePluginPanel_Schuhe'); echo '<div class="panel-heading">'; echo '<div class="panel-menu"><ul><li>' . $Plugin->tableLink() . '</li></ul></div>'; echo '<h1>' . $Header . '</h1>'; echo '</div>'; echo '<div class="panel-content">'; $Formular->setId('shoe');
/** * Display fieldset: Delete training */ protected function initDeleteFieldset() { $DeleteText = '<strong>' . __('Permanently delete this activity') . ' »</strong>'; $DeleteUrl = $_SERVER['SCRIPT_NAME'] . '?delete=' . $this->dataObject->id(); $DeleteLink = Ajax::link($DeleteText, 'ajax', $DeleteUrl); $Fieldset = new FormularFieldset(__('Delete activity')); $Fieldset->addWarning($DeleteLink); $Fieldset->setCollapsed(); $this->addFieldset($Fieldset); }
/** * Returns the html-link to this plugin * @param string $getParameter * @return string */ public function getActionLink($name, $getParameter = '') { return Ajax::link($name, self::$TOOLS_DIV_ID, parent::$DISPLAY_URL . '?id=' . $this->id() . '&' . $getParameter); }
<?if($value):?> <div class="image-preview"><?php echo HTML::img($value, '', $image); ?> <a href="<?php echo Ajax::link(array('action' => 'replace', 'form' => $form->name, 'element' => $element->name)); ?> " class="form-action delete">x</a></div> <?endif;?> <?php echo HTML::input($attributes);
/** * Returns the html-link for inner-html-navigation * @param string $name displayed link-name * @param int $sport id of sport, default $this->sportid * @param int $year year, default $this->year * @param string $dat optional dat-parameter * @return string */ protected function getInnerLink($name, $sport = 0, $year = 0, $dat = '') { if ($sport == 0) { $sport = $this->sportid; } if ($year == 0) { $year = $this->year; } return Ajax::link($name, 'statistics-inner', self::$DISPLAY_URL . '?id=' . $this->id() . '&sport=' . $sport . '&jahr=' . $year . '&dat=' . $dat); }