public function display() { if (!$this->visible || !$this->api_key) { return; } if ($this->tag_list === null || $this->tag_list->getGeoTaggedPhotoCount() == 0) { return; } parent::display(); echo '<div class="pinhole-map-link">'; $a_tag = new SwatHtmlTag('a'); $a_tag->class = 'pinhole-map-link'; $a_tag->href = $this->base; if (count($this->tag_list) > 0) { $a_tag->href .= '?' . $this->tag_list->__toString(); } $a_tag->open(); $img_tag = new SwatHtmlTag('img'); $img_tag->width = $this->width; $img_tag->height = $this->height; $img_tag->src = sprintf('http://maps.google.com/staticmap?' . 'format=png8&sensor=false&maptype=roadmap' . sprintf('&size=%sx%s', $this->width, $this->height) . sprintf('¢er=%s,%s', $this->getCenterLatitude(), $this->getCenterLongitude()) . sprintf('&span=%s,%s', $this->getSpanLatitude(), $this->getSpanLongitude()) . sprintf('&markers=%s', implode('|', $this->getMarkers())) . sprintf('&key=%s', $this->api_key)); $img_tag->display(); if ($this->show_title) { $this->displayTitle(); } $a_tag->close(); echo '</div>'; }
public function display() { if (!$this->visible) { return; } if ($this->tag_list === null) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->class = 'pinhole-tag-list-view'; $div_tag->id = $this->id; $div_tag->open(); $this->displayHomeLink(); echo 'Browsing: '; if (count($this->tag_list) > 0) { $this->displayTagList($this->tag_list); } else { echo Pinhole::_('All Photos'); } $this->displayCount(); echo ' '; $this->displayAtomLink(); $div_tag->close(); }
/** * Displays this date tag browser */ public function display() { if (!$this->visible) { return; } if ($this->tag_list === null) { return; } parent::display(); $date_range = $this->tag_list->getPhotoInfo(); $start_date = $date_range['start']; $end_date = $date_range['end']; $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = 'pinhole-date-tag-browser'; $div_tag->open(); // always show year selector $this->displayYears($start_date, $end_date); // if all photos in the tag list are in the same year, show the month // selector if ($start_date->getYear() == $end_date->getYear()) { $this->displayMonths($start_date, $end_date); // if all photos in the tag list are in the same month, show the // day selector if ($start_date->getMonth() == $end_date->getMonth()) { $this->displayDays($start_date, $end_date); } } $div_tag->close(); }
public function display() { if (!$this->visible) { return; } if ($this->tag_list === null) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = 'pinhole-browser-page-menu'; $div_tag->open(); $a_tag = new SwatHtmlTag('a'); $a_tag->href = $this->appendTagPath(sprintf('%stags/alphabetical', $this->base)); $a_tag->setContent(Pinhole::_('Alphabetical')); $a_tag->display(); $a_tag = new SwatHtmlTag('a'); $a_tag->href = $this->appendTagPath(sprintf('%stags/date', $this->base)); $a_tag->setContent(Pinhole::_('By Date Added')); $a_tag->display(); $a_tag = new SwatHtmlTag('a'); $a_tag->href = $this->appendTagPath(sprintf('%stags/popular', $this->base)); $a_tag->setContent(Pinhole::_('By Popularity')); $a_tag->display(); $a_tag = new SwatHtmlTag('a'); $a_tag->href = $this->appendTagPath(sprintf('%stags/cloud', $this->base)); $a_tag->setContent(Pinhole::_('Cloud View')); $a_tag->display(); $div_tag->close(); }
public function display() { if (!$this->visible) { return; } parent::display(); Swat::displayInlineJavaScript($this->getInlineJavaScript()); }
public function display() { parent::display(); $span_tag = new SwatHtmlTag('span'); $span_tag->id = $this->id; $span_tag->class = 'blorg-file-attach-status'; $span_tag->setContent(''); $span_tag->display(); Swat::displayInlineJavaScript($this->getInlineJavaScript()); }
public function display() { if (!$this->visible) { return; } if ($this->tag_list === null) { return; } if ($this->sub_tag_list === null || count($this->sub_tag_list) == 0) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->class = 'pinhole-sub-tag-list-view'; $div_tag->id = $this->id; $div_tag->open(); if (count($this->tag_list) > 0) { $titles = array(); foreach ($this->tag_list as $tag) { $titles[] = $tag->getTitle(); } $header_tag = new SwatHtmlTag('h2'); $header_tag->setContent(sprintf(Pinhole::_('View photos tagged “%s” and:'), implode('”, “', $titles))); $header_tag->display(); } elseif ($this->title !== null) { $header_tag = new SwatHtmlTag('h2'); $header_tag->setContent($this->title); $header_tag->display(); } $ul_tag = new SwatHtmlTag('ul'); $ul_tag->id = $this->id . '_list'; $ul_tag->open(); $li_tag = new SwatHtmlTag('li'); foreach ($this->sub_tag_list as $tag) { $add_list = clone $this->tag_list; $add_list->add($tag); $li_tag->open(); $add_anchor_tag = new SwatHtmlTag('a'); $add_anchor_tag->class = 'pinhole-tag-list-view-tag'; $add_anchor_tag->rel = 'tag'; $add_anchor_tag->href = $this->base . '?' . $add_list->__toString(); $add_anchor_tag->setContent($tag->getTitle()); if ($tag->photo_count !== null) { $add_anchor_tag->title = sprintf('%s %s', SwatString::minimizeEntities(SwatString::numberFormat($tag->photo_count)), SwatString::minimizeEntities(Pinhole::ngettext('Photo', 'Photos', $tag->photo_count))); } $add_anchor_tag->display(); $li_tag->close(); unset($add_list); } $ul_tag->close(); $div_tag->close(); }
public function display() { if (!$this->visible) { return; } if ($this->gadget_title == '') { return; } parent::display(); $edit_button = $this->getCompositeWidget('edit_button'); $edit_button->sensitive = $this->isSensitive(); $add_button = $this->getCompositeWidget('add_button'); $add_button->sensitive = $this->isSensitive(); $delete_button = $this->getCompositeWidget('delete_button'); $delete_button->sensitive = $this->isSensitive(); $container_div = new SwatHtmlTag('div'); $container_div->class = $this->getCSSClassString(); $container_div->id = $this->id; $container_div->open(); if ($this->show_edit || $this->show_add || $this->show_delete) { $controls_div = new SwatHtmlTag('div'); $controls_div->class = 'blorg-gadget-display-controls'; $controls_div->open(); if ($this->show_add) { $add_button->display(); } if ($this->show_edit) { $edit_button->display(); } if ($this->show_delete) { $delete_button->display(); } $controls_div->close(); } $content_div = new SwatHtmlTag('div'); $content_div->class = 'blorg-gadget-display-content'; $content_div->open(); $header_tag = new SwatHtmlTag('h3'); $header_tag->class = 'blorg-gadget-display-title'; $header_tag->setContent($this->gadget_title); $header_tag->display(); $description_div = new SwatHtmlTag('div'); $description_div->class = 'blorg-gadget-display-description'; $description_div->setContent($this->getDescription(), 'text/xml'); $description_div->display(); $content_div->close(); $container_div->close(); }
public function display() { if (!$this->visible) { return; } if ($this->tag_list === null || $this->photo === null) { return; } parent::display(); $photos = $this->tag_list->getNextPrevPhotos($this->photo); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = 'pinhole-photo-next-prev'; $div_tag->open(); $this->displayPrev($photos['prev']); $this->displayCurrent($this->photo); $this->displayNext($photos['next']); $div_tag->close(); }
public function display() { if (!$this->visible) { return; } if ($this->file === null) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = 'blorg-header-image-display'; $div_tag->open(); $img_tag = new SwatHtmlTag('img'); $img_tag->src = $this->file->getRelativeUri('../'); $img_tag->alt = Blorg::_('Header Image'); $img_tag->display(); $div_tag->close(); Swat::displayInlineJavaScript($this->getInlineJavaScript()); }
public function display() { if (!$this->visible) { return; } if (!$this->app instanceof SiteApplication) { throw new SwatException('Application must be set to display certificate.'); } if (!$this->account instanceof CMEAccount) { throw new SwatException('Account must be set to display certificate.'); } if (!$this->credits instanceof CMEAccountEarnedCMECreditWrapper) { throw new SwatException('Earned credits must be set to display certificate.'); } parent::display(); $certificate_div = new SwatHtmlTag('div'); $certificate_div->id = $this->id; $certificate_div->class = $this->getCSSClassString(); $certificate_div->open(); $this->displayCertificateContent(); $certificate_div->close(); }