Exemplo n.º 1
0
 /**
  * @param ContainerInterface $container
  * @return void
  */
 public function setContainer(ContainerInterface $container = null)
 {
     $this->container = $container;
     $this->breadcrumbs = $this->get("white_october_breadcrumbs");
     $this->breadcrumbs->addItem('index.menu.home', $this->get('router')->generate('index_index'));
     $this->breadcrumbs->addItem('index.menu.traders', $this->get('router')->generate('trader_list'));
 }
Exemplo n.º 2
0
 /**
 * Set array of dashboard crumbs
 *
 * @param void
 * @return null
 */
 function project_crumbs() {
   
   add_bread_crumb(lang('dashboard'), get_url('dashboard'));
   if(active_project())
   	add_bread_crumb(active_project()->getName(), active_project()->getOverviewUrl());
   
   $args = func_get_args();
   if(!count($args)) return;
   BreadCrumbs::instance()->addByFunctionArguments($args);
   
 } // dashboard_crumbs
Exemplo n.º 3
0
 /**
  * @Route("/update/{offer_id}",name="offer_update")
  * @Template()
  * @return Response
  * @param Request $request
  */
 public function updateAction(Request $request)
 {
     $offer = $this->get('gsm_lot_offer.offer_manager')->getOffer($request->get('offer_id'));
     $user = $this->get('security.token_storage')->getToken()->getUser();
     if ($offer) {
         if ($offer->getTrader()->getUser()->getId() == $user->getId()) {
             $this->breadcrumbs->addItem('offer.update', $this->get('router')->generate('offer_update', array('offer_id' => $offer->getId())));
             $form = $this->createForm(new OfferType(), $offer);
             $form->handleRequest($request);
             if ($form->isValid()) {
                 $offer->setTrader($this->get('security.token_storage')->getToken()->getUser()->getTrader());
                 $this->get('gsm_lot_offer.offer_manager')->updateOffer($offer);
                 $this->get('session')->getFlashBag()->add('notice', 'offer.updated');
                 return $this->redirect($this->get('router')->generate($this->get('session')->get('redirect')));
             }
             return $this->render('GsmLotOfferBundle:Offer:update.html.twig', array('form' => $form->createView()));
         }
     }
     return $this->redirect($this->get('router')->generate($this->get('session')->get('redirect')));
 }
Exemplo n.º 4
0
 protected function render(array $args = array(), $tpl = null)
 {
     extract($args);
     ob_start();
     require $this->file_path($tpl);
     //$templateFile;
     $content = ob_get_clean();
     ob_start();
     ob_start();
     require VIEW_DIR . 'img_content.phtml';
     //$templateFile;
     $img_content = ob_get_clean();
     ob_start();
     require VIEW_DIR . 'searchForm.phtml';
     $search = ob_get_clean();
     $menu = new MenuController();
     $main_menu = $menu->mainMenuAction();
     $login_logout = new SecurityController();
     $login_logout_block = $login_logout->logAction();
     $news = new NewsController();
     $news_block = $news->getBlockAction();
     $menu_block = $menu->getBlockMainMenuAction();
     $basic_page_bl = new IndexController();
     $basic_page_block = $basic_page_bl->getBasicPageBlockAction();
     if (Router::getLanguage() == 'uk') {
         $lang = 'en';
     } else {
         $lang = 'uk';
     }
     $lang_icon = Lang::url_translation($lang, Config::get('default_id_error_204'));
     $bread_crumbs = BreadCrumbs::getBreadcrumbs();
     $footer_text = __t('footer_text');
     ob_start();
     require VIEW_DIR . 'layout.phtml';
     return ob_get_clean();
 }
Exemplo n.º 5
0
/**
 * Add single bread crumb to the list
 *
 * @access public
 * @param string $title Crumb title, required
 * @param string $url Crumb URL, optional
 * @param string $attributes Additional crumb attributes like class etc. Optional
 * @return null
 */
function add_bread_crumb($title, $url = null, $attributes = null)
{
    BreadCrumbs::instance()->addCrumb(new BreadCrumb($title, $url, $attributes));
}
/**
 * Prepare account bread crumbs
 *
 * @access public
 * @param void
 * @return null
 */
function account_crumbs()
{
    add_bread_crumb(lang('dashboard'), get_url('dashboard', 'index'));
    add_bread_crumb(lang('account'), get_url('account', 'index'));
    $args = func_get_args();
    if (!count($args)) {
        return;
    }
    BreadCrumbs::instance()->addByFunctionArguments($args);
}
Exemplo n.º 7
0
<?php

BreadCrumbs::register('membership', function ($breadcrumbs) {
    $breadcrumbs->push('Membership', route('membership'));
});
BreadCrumbs::register('membership-standing', function ($breadcrumbs) {
    $breadcrumbs->parent('membership');
    $breadcrumbs->push('IQSK Members In Good Standing', route('membership-standing'));
});
BreadCrumbs::register('list-of-arbitrators', function ($breadcrumbs) {
    $breadcrumbs->parent('membership');
    $breadcrumbs->push('List of Arbitrators', route('list-of-arbitrators'));
});
BreadCrumbs::register('membership-fee', function ($breadcrumbs) {
    $breadcrumbs->parent('membership');
    $breadcrumbs->push('Membership Fee', route('membership-fee'));
});
BreadCrumbs::register('listed-qs-firms', function ($breadcrumbs) {
    $breadcrumbs->parent('membership');
    $breadcrumbs->push('Listed QS Firms', route('listed-qs-firms'));
});
Exemplo n.º 8
0
 * @created 2006-06-12
 * @since 2009-05-11
 * @author Jared <*****@*****.**>
 * @editor Bill Wilson
 * @editor wendy@djamoer.net
 * @editor grad
 * @editor Shaun McCormick <*****@*****.**>
 * @editor Shawn Wilkerson <*****@*****.**>
 * @editor Wieger Sloot, Sterc.nl <*****@*****.**>
 * @tester Bob Ray
 * @package breadcrumbs
 *
 * This snippet was designed to show the path through the various levels of site
 * structure back to the root. It is NOT necessarily the path the user took to
 * arrive at a given page.
 *
 * @see breadcrumbs.class.php for config settings
 *
 * Included classes
 * .B_crumbBox Span that surrounds all crumb output
 * .B_hideCrumb Span surrounding the "..." if there are more crumbs than will be shown
 * .B_currentCrumb Span or A tag surrounding the current crumb
 * .B_firstCrumb Span that always surrounds the first crumb, whether it is "home" or not
 * .B_lastCrumb Span surrounding last crumb, whether it is the current page or not .
 * .B_crumb Class given to each A tag surrounding the intermediate crumbs (not home, or
 * hide)
 * .B_homeCrumb Class given to the home crumb
 */
require_once $modx->getOption('breadcrumbs.core_path', null, $modx->getOption('core_path') . 'components/breadcrumbs/') . 'model/breadcrumbs/breadcrumbs.class.php';
$bc = new BreadCrumbs($modx, $scriptProperties);
return $bc->run();
Exemplo n.º 9
0
$Photos = new Photos(DB_PREFIX . DB_TBL_PHOTOS);
$Groups = new Groups(DB_PREFIX . DB_TBL_GROUPS);
$Mails = new Mails(DB_PREFIX . DB_TBL_MAILS);
$Walls = new Walls(DB_PREFIX . DB_TBL_WALLS);
$Topics = new Topics(DB_PREFIX . DB_TBL_TOPICS);
$Events = new Events(DB_PREFIX . DB_TBL_EVENTS);
$Bookmarks = new Bookmarks(DB_PREFIX . DB_TBL_BOOKMARKS);
include_once FLGR_LIBS . '/int.php';
/**
 * 
 */
//include_once(FLGR_COMMON.'/bread-crumbs.php');
if (isset($aRequest[1]) && 'cms' == $aRequest[1]) {
    $tplBreadCrumbs = new KTemplate();
    // надо оставлять чтобы конечные модули резетили шаблон $tplBreadCrumbs
    $BreadCrumbs = new BreadCrumbs();
    $BreadCrumbs->addBreadCrumbs($sKey, $sTitle);
    // add breadcrumbs
} else {
    $BreadCrumbs = new BreadCrumbs('
		<!-- BEGIN BreadCrumbs -->
		<li><a href="{link}">{title}</a></li>
		<!-- END BreadCrumbs -->
	', '
		<!-- BEGIN BreadCrumbs -->
		<li>{title}</li>
		<!-- END BreadCrumbs -->
	');
    //	if ($Permissions->bIsLogged()) {
    //		$aLoggedUser = $User->getBaseData($Permissions->getLoggedUserId());
    //		$BreadCrumbs->addBreadCrumbs('', 'Моя страница');
Exemplo n.º 10
0
function claro_html_document_breadcrumb($curDirPath)
{
    $curDirPathList = explode('/', $curDirPath);
    $urlTrail = '';
    $bc = new BreadCrumbs();
    foreach ($curDirPathList as $thisDir) {
        if (empty($thisDir)) {
            $bc->appendNode(new BreadCrumbsNode(get_lang('Root'), claro_htmlspecialchars(Url::Contextualize(get_module_entry_url('CLDOC')))));
        } else {
            $urlTrail .= '/' . $thisDir;
            $bc->appendNode(new BreadCrumbsNode(get_lang($thisDir), claro_htmlspecialchars(Url::Contextualize(get_module_entry_url('CLDOC') . '?cmd=exChDir&amp;file=' . base64_encode($urlTrail)))));
        }
    }
    if ($bc->size() < 2) {
        return '';
    } else {
        return '<div class="breadcrumbTrails">' . $bc->render() . '</div>' . "\n";
    }
}
Exemplo n.º 11
0
function disp_forum_breadcrumb($pagetype, $forum_id, $forum_name, $topic_id = 0, $topic_name = '')
{
    $bc = new BreadCrumbs();
    $bc->appendNode(new BreadCrumbsNode(get_lang('Forum index'), claro_htmlspecialchars(Url::Contextualize(get_module_entry_url('CLFRM')))));
    if (in_array($pagetype, array('viewforum', 'viewtopic', 'add', 'edit', 'reply', 'quote'))) {
        $bc->appendNode(new BreadCrumbsNode($forum_name, claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewforum.php?forum=' . $forum_id))));
        switch ($pagetype) {
            case 'viewforum':
                break;
            case 'viewtopic':
                $bc->appendNode(new BreadCrumbsNode($topic_name));
                break;
            case 'add':
                $bc->appendNode(new BreadCrumbsNode(get_lang('New topic')));
                break;
            case 'edit':
                $bc->appendNode(new BreadCrumbsNode($topic_name, claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id))));
                $bc->appendNode(new BreadCrumbsNode(get_lang('Edit post')));
                break;
            case 'quote':
                $bc->appendNode(new BreadCrumbsNode($topic_name, claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id))));
                $bc->appendNode(new BreadCrumbsNode(get_lang('Reply')));
                break;
            case 'reply':
                $bc->appendNode(new BreadCrumbsNode($topic_name, claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id))));
                $bc->appendNode(new BreadCrumbsNode(get_lang('Reply')));
                break;
        }
    } elseif ($pagetype == 'viewsearch') {
        $bc->appendNode(new BreadCrumbsNode(get_lang('Search result'), null));
    }
    // return claro_html_breadcrumbtrail($breadCrumbNameList, $breadCrumbUrlList, ' > ') . '<br />' ;
    return '<div class="breadcrumbTrails">' . $bc->render() . '</div>' . "\n";
}
Exemplo n.º 12
0
 public function render()
 {
     $this->init();
     return parent::render();
 }