From 5a33971be4de6515a9d88ee40d12717353f1e3e2 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 21 Jun 2012 15:50:19 -0400 Subject: [PATCH] Fixed some basic header/layout template issues (VF_Cart --> \VuFind\Cart, baseurl --> url('home')). --- themes/vufind/blueprint/templates/header.phtml | 4 ++-- themes/vufind/blueprint/templates/layout/layout.phtml | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/themes/vufind/blueprint/templates/header.phtml b/themes/vufind/blueprint/templates/header.phtml index 9bf3d2b282e..d3f2023f60a 100644 --- a/themes/vufind/blueprint/templates/header.phtml +++ b/themes/vufind/blueprint/templates/header.phtml @@ -1,6 +1,6 @@ -<a id="logo" href="<?=$this->baseUrl()?>"></a> +<a id="logo" href="<?=$this->url('home')?>"></a> <div id="headerRight"> - <? $cart = VF_Cart::getInstance(); if ($cart->isActive()): ?> + <? $cart = \VuFind\Cart::getInstance(); if ($cart->isActive()): ?> <div id="cartSummary" class="cartSummary"> <a id="cartItems" title="<?=$this->transEsc('View Book Bag')?>" class="bookbag" href="<?=$this->url(array('controller' => 'Cart', 'action' => 'Home'), 'default', true)?>"><strong><span><?=count($cart->getItems())?></span></strong> <?=$this->transEsc('items')?> <?=$cart->isFull() ? '(' . $this->transEsc('bookbag_full') . ')' : ''?></a> <a id="viewCart" title="<?=$this->transEsc('View Book Bag')?>" class="viewCart bookbag offscreen" href="<?=$this->url(array('controller' => 'Cart', 'action' => 'Home'), 'default', true)?>"><strong><span id="cartSize"><?=count($cart->getItems())?></span></strong> <?=$this->transEsc('items')?><span id="cartStatus"><?=$cart->isFull() ? $this->transEsc('bookbag_full') : ' '?></span></a> diff --git a/themes/vufind/blueprint/templates/layout/layout.phtml b/themes/vufind/blueprint/templates/layout/layout.phtml index e3c1468ac97..1e3bf8ecbd2 100644 --- a/themes/vufind/blueprint/templates/layout/layout.phtml +++ b/themes/vufind/blueprint/templates/layout/layout.phtml @@ -9,8 +9,7 @@ $this->headLink( array( 'href' => $this->url( - array('controller' => 'Search', 'action' => 'OpenSearch'), - 'default', true + 'default', array('controller' => 'Search', 'action' => 'OpenSearch') ) . '?method=describe', 'type' => 'application/opensearchdescription+xml', 'title' => $this->transEsc('Library Catalog Search'), @@ -21,10 +20,10 @@ <?=$this->headLink()?> <? // Set global path for Javascript code: - $this->headScript()->prependScript("path = '" . $this->baseUrl() . "';"); + $this->headScript()->prependScript("path = '" . rtrim($this->url('home'), '/') . "';"); // Deal with cart stuff: - $cart = VF_Cart::getInstance(); + $cart = \VuFind\Cart::getInstance(); if ($cart->isActive()) { $this->headScript()->appendFile("jquery.cookie.js"); $this->headScript()->appendFile("cart.js"); @@ -71,7 +70,7 @@ <? if ($this->layout()->breadcrumbs): ?> <div class="breadcrumbs"> <div class="breadcrumbinner"> - <a href="<?=$this->baseUrl()?>"><?=$this->transEsc('Home')?></a> <span>></span> + <a href="<?=$this->url('home')?>"><?=$this->transEsc('Home')?></a> <span>></span> <?=$this->layout()->breadcrumbs?> </div> </div> -- GitLab