public function render() { $this->set_param('id', 'footer'); if ($this->_copyright || $this->_full_title || $this->_help_title) { $p = HTML_Decorator::tag('p'); if ($this->_copyright) { $p->add_inner($this->_copyright); } if ($this->_copyright && ($this->_full_title || $this->_help_title)) { $p->add_inner_tag('br'); } if ($this->_full_title) { $p->add_inner_tag('a', $this->_full_title, array('href' => $this->_full_url)); } if ($this->_full_title && $this->_help_title) { $p->add_inner(' | '); } if ($this->_help_title) { $p->add_inner_tag('a', $this->_help_title, array('href' => $this->_help_url)); } $this->add_inner($p); } if ($this->_powered_by) { $this->add_inner_tag('p', 'Powered by the <br><a href="http://mwf.ucla.edu" target="_blank">UCLA Mobile Web Framework</a>', array('style' => 'font-weight:bold;font-style:italic')); } return parent::render(); }
public function render() { if ($this->_padded) { $this->add_class('content-padded'); } return parent::render(); }
public function render() { if (!$this->_image) { $this->_image = array('src' => HTTPS::is_https() ? HTTPS::convert_path(Config::get('global', 'header_home_button')) : Config::get('global', 'header_home_button'), 'alt' => Config::get('global', 'header_home_button_alt')); } $image = HTML_Decorator::tag('img', false, $this->_image)->render(); $home_button = HTML_Decorator::tag('a', $image, array('href' => HTTPS::is_https() ? HTTPS::convert_path(Config::get('global', 'site_url')) : Config::get('global', 'site_url')))->render(); if ($this->_title_path) { $title = $this->_title ? HTML_Decorator::tag('a', $this->_title, array('href' => $this->_title_path)) : false; } else { $title = $this->_title ? $this->_title : ''; } $title_span = $title ? HTML_Decorator::tag('span', $title)->render() : ''; $this->set_param('id', 'header'); $this->add_inner_front($home_button . $title_span); return parent::render(); }
public function render() { $handler_css = $this->_handler_css ? $this->_handler_css : Config::get('global', 'site_assets_url') . '/css.php?'; foreach ($this->_handler_css_params as $key => $val) { $handler_css .= is_int($key) ? $val . '&' : $key . '=' . $val . '&'; } $handler_css = substr($handler_css, 0, strlen($handler_css) - 1); $handler_js = $this->_handler_js ? $this->_handler_js : Config::get('global', 'site_assets_url') . '/js.php?'; foreach ($this->_handler_js_params as $key => $val) { $handler_js .= is_int($key) ? $val . '&' : $key . '=' . $val . '&'; } $handler_js = substr($handler_js, 0, strlen($handler_js) - 1); $this->add_inner_tag_front('meta', false, array('name' => 'viewport', 'content' => 'height=device-height,width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no')); $this->add_inner_tag_front('script', null, array('type' => 'text/javascript', 'src' => HTTPS::is_https() ? HTTPS::convert_path($handler_js) : $handler_js)); $this->add_inner_tag_front('link', false, array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => HTTPS::is_https() ? HTTPS::convert_path($handler_css) : $handler_css, 'media' => 'screen')); $this->add_inner_tag_front('title', $this->_title); $charset = Config::get('global', 'charset'); if ($charset !== false) { $this->add_inner_tag_front('meta', false, array('charset' => $charset)); } return parent::render(); }
public function render() { $count = count($this->_list); if ($this->_title) { $this->_title->add_class('menu-first'); } elseif ($count > 0) { $this->_list[0]->add_class('menu-first'); } if ($count > 0) { $this->_list[$count - 1]->add_class('menu-last'); } else { if ($this->_title) { $this->_title->add_class('menu-last'); } } if ($this->_detailed) { $this->add_class('menu-detailed'); } elseif ($this->_detailed === false) { $this->remove_class('menu-detailed'); } if ($this->_padded) { $this->add_class('menu-padded'); } elseif ($this->_padded === false) { $this->remove_class('menu-padded'); } $list = ''; if ($count > 0) { $inner = ''; foreach ($this->_list as $list_item) { $inner .= $list_item->render(); } $list = HTML_Decorator::tag('ol', $inner)->render(); } $title = is_a($this->_title, 'Decorator') ? $this->_title->render() : ($this->_title ? $this->_title : ''); $this->add_inner_front($title . $list); return parent::render(); }
public function render() { if ($this->_options_max !== false && $this->_options_max < $this->_options_count) { $options = array(); for ($i = 0; $i < $this->_options_max; $i++) { $options[$i] = $this->_options[$i]; } $this->_options = $options; $this->_options_count = $this->_options_max; } if (count($this->_options) == 0) { return ''; } $this->_options[0]->add_class('button-first'); $this->_options[$this->_options_count - 1]->add_class('button-last'); $options = ''; foreach ($this->_options as $option) { $options .= is_a($option, 'Decorator') ? $option->render() : $option; } $this->add_inner_front($options); return parent::render(); }