Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Michael J. Rubinsky (mrubinsk@horde.org)
Beispiel #1
0
 /**
  * Attach widget to supplied view.
  *
  * @param Ansel_View_Base $view
  */
 public function attach(Ansel_View_Base $view)
 {
     if (empty($GLOBALS['conf']['maps']['driver'])) {
         return false;
     }
     return parent::attach($view);
 }
Beispiel #2
0
 /**
  * Attach widget to supplied view.
  *
  * @param Ansel_View_Base $view
  *
  * @return boolean
  */
 public function attach(Ansel_View_Base $view)
 {
     if (empty($GLOBALS['conf']['faces']['driver'])) {
         return false;
     }
     $GLOBALS['page_output']->addScriptFile('imagefaces.js');
     return parent::attach($view);
 }
Beispiel #3
0
 /**
  * Override the parent class' attach method and set the owner in the
  * title string.
  *
  * @param Ansel_View_Base $view  The view we are attaching to
  */
 public function attach(Ansel_View_Base $view)
 {
     if (parent::attach($view)) {
         $owner = $this->_view->gallery->getIdentity();
         $name = $owner->getValue('fullname');
         if (!$name) {
             $name = $this->_view->gallery->get('owner');
         }
         $this->_title = sprintf(_("%s's Galleries"), $name);
     } else {
         return false;
     }
     return true;
 }
Beispiel #4
0
 /**
  *
  * @var array $params  The parameters:
  *   - view:  The view we are attaching to (image, gallery).
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_resourceType = $params['view'];
     $this->_title = _("Tags");
     // Handle any incoming tag changes from non-script browsers.
     $tags = Horde_Util::getFormData('addtag');
     if (!is_null($tags) && strlen($tags)) {
         $tagger = $GLOBALS['injector']->getInstance('Ansel_Tagger');
         $this->_view->resource->setTags($tags, $tagger->split($tags));
     } elseif (Horde_Util::getFormData('actionID') == 'deleteTags') {
         $tag = Horde_Util::getFormData('tag');
         $this->_view->resource->removeTag($tag);
     }
 }
Beispiel #5
0
 public function __construct($params)
 {
     parent::__construct($params);
 }
Beispiel #6
0
 /**
  * Constructor
  *
  * @param array $params  Any parameters for this widget
  * @return Ansel_Widget_ImageFaces
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_title = _("People in this gallery");
 }
Beispiel #7
0
 /**
  * Constructor
  *
  * @param array $params  Any parameters for this widget
  *
  * @return Ansel_Widget_SimilarPhotos
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_title = _("Similar Photos");
 }