getBreadCrumbs() public static method

Generate a list of breadcrumbs showing where we are in the gallery tree.
public static getBreadCrumbs ( Ansel_Gallery $gallery = null, stirng $separator = ' » ' ) : string
$gallery Ansel_Gallery The gallery the bread crumbs are for.
$separator stirng The separator text to use between crumbs.
return string
Example #1
0
} catch (Ansel_Exception $e) {
    $notification->push($e->getMessage());
    Horde::url('list.php')->redirect();
    exit;
}
$form = new Horde_Form($vars, _("This gallery is protected by a password. Please enter it below."));
$form->addVariable($gallery->get('name'), 'name', 'description', false);
$form->addVariable($gallery->get('desc'), 'desc', 'description', false);
$form->addVariable(_("Password"), 'passwd', 'password', true);
$form->addHidden('', 'url', 'text', true);
$form->addHidden('', 'gallery', 'int', true);
if ($form->validate()) {
    if ($gallery->get('passwd') != $vars->get('passwd')) {
        $notification->push(_("Incorrect password"), 'horde.warning');
    } else {
        $session->set('ansel', 'passwd/' . $gallery->id, hash('md5', $vars->get('passwd')));
        $url = $vars->get('url');
        if (empty($url)) {
            $url = Horde::url('view.php')->add('gallery', $gallery->id);
        } else {
            $url = Horde::url($url);
        }
        $url->redirect();
        exit;
    }
}
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
echo '<div class="header">' . Ansel::getBreadCrumbs() . '</div>';
$form->renderActive(null, null, null, 'post');
$page_output->footer();
Example #2
0
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Chuck Hagenbuch <*****@*****.**>
 */
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('ansel');
$gallery_id = Horde_Util::getFormData('gallery');
try {
    $gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getGallery($gallery_id);
} catch (Ansel_Exception $e) {
    $notification->push(sprintf(_("Gallery %s not found."), $gallery_id), 'horde.error');
    Ansel::getUrlFor('view', array('view' => 'List'), true)->redirect();
    exit;
}
if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
    $notification->push(_("You are not authorized to upload photos to this gallery."), 'horde.error');
    Ansel::getUrlFor('view', array('view' => 'List'), true)->redirect();
}
$page = Horde_Util::getFormData('page', 0);
$return_url = Ansel::getUrlFor('view', array('gallery' => $gallery_id, 'slug' => $gallery->get('slug'), 'view' => 'Gallery', 'page' => $page), true);
$view = new Ansel_View_Upload(array('forceNoScript' => $prefs->getValue('force_old_uploader', false), 'browse_button' => 'pickfiles', 'target' => Horde::selfUrl()->setRaw(true), 'drop_target' => 'filelist', 'upload_button' => 'uploadfiles', 'gallery' => $gallery, 'return_target' => $return_url->toString(true, true)));
if (!$prefs->getValue('force_old_uploader', 'false')) {
    $view->run();
    $nojs = '';
} else {
    $nojs = $view->handleLegacy();
}
$page_output->header(array('title' => _("Add Photo")));
echo '<div class="header" id="galleryHeader"><span class="breadcrumbs">' . Ansel::getBreadCrumbs($gallery) . '</span></div>';
require ANSEL_TEMPLATES . '/image/plupload.inc';
$page_output->footer();
Example #3
0
<div id="galleryHeader" class="header">
  <?php 
if ($this->numTiles) {
    ?>
    <span class="rightFloat">
      <?php 
    echo $this->numTiles > $this->perpage ? sprintf(_("%d to %d of %d Items"), $this->pagestart, $this->pageend, $this->numTiles) : sprintf(ngettext("%d Item", "%d Items", $this->numTiles), $this->numTiles);
    ?>
    </span>
  <?php 
}
?>
  <?php 
echo Ansel::getBreadCrumbs($this->gallery);
?>
</div>
<div class="horde-content gallery-desc" id="galleryDescription"><?php 
echo $this->gallery_desc;
?>
</div>

<!-- Start Gallery Grid -->
<div class="horde-content">
<table width="100%" cellspacing="0">
 <tr>
  <td style="vertical-align:top;width:<?php 
echo $this->view->countWidgets() ? "75%" : "100%";
?>
;">
    <?php 
if (empty($this->view->api) && $this->option_select && $this->numTiles) {