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('&center=%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()
 {
     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->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());
 }
Exemple #9
0
 protected function getCSSClassNames()
 {
     return array_merge(array('cme-certificate'), parent::getCSSClassNames());
 }
 /**
  * Gets the array of CSS classes that are applied to this gadget display
  *
  * @return array the array of CSS classes that are applied to this gadget
  *                display.
  */
 protected function getCSSClassNames()
 {
     $classes = array('blorg-gadget-display');
     $classes = array_merge($classes, parent::getCSSClassNames());
     return $classes;
 }
 protected function getCSSClassNames()
 {
     return array_merge(array('cme-front-matter-display'), parent::getCSSClassNames());
 }