Skip to content
Snippets Groups Projects
Commit 0dd2242a authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Search History: Only show MyResearch sidebar if logged in.

parent 3019e9dd
No related merge requests found
......@@ -23,13 +23,15 @@
<? endif; ?>
</div>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
<? if ($user = $this->auth()->isLoggedIn()): ?>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
<? endif; ?>
<div class="clear"></div>
\ No newline at end of file
......@@ -21,11 +21,13 @@
<? endif; ?>
</div>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
\ No newline at end of file
<? if ($user = $this->auth()->isLoggedIn()): ?>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
<? endif; ?>
\ No newline at end of file
<?
// Set page title.
$this->headTitle($this->translate('Search History'));
// Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>'
. '<li class="active">' . $this->transEsc('History') . '</li>';
?>
<div class="row">
<div class="<?=$this->layoutClass('mainbody')?>">
<? if (!empty($this->saved)): ?>
<h2><?=$this->transEsc("history_saved_searches")?></h2>
<?=$this->context()->renderInContext('search/history-table.phtml', array('showSaved' => true));?>
<? endif; ?>
<h2><?=$this->transEsc("history_recent_searches")?></h2>
<? if (!empty($this->unsaved)): ?>
<?=$this->context()->renderInContext('search/history-table.phtml', array('showSaved' => false));?>
<? else: ?>
<?=$this->transEsc("history_no_searches")?>
<? endif; ?>
</div>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
<?
// Set page title.
$this->headTitle($this->translate('Search History'));
// Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>'
. '<li class="active">' . $this->transEsc('History') . '</li>';
?>
<div class="row">
<div class="<?=$this->layoutClass('mainbody')?>">
<? if (!empty($this->saved)): ?>
<h2><?=$this->transEsc("history_saved_searches")?></h2>
<?=$this->context()->renderInContext('search/history-table.phtml', array('showSaved' => true));?>
<? endif; ?>
<h2><?=$this->transEsc("history_recent_searches")?></h2>
<? if (!empty($this->unsaved)): ?>
<?=$this->context()->renderInContext('search/history-table.phtml', array('showSaved' => false));?>
<? else: ?>
<?=$this->transEsc("history_no_searches")?>
<? endif; ?>
</div>
<? if ($user = $this->auth()->isLoggedIn()): ?>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext(
"myresearch/menu.phtml",
// Only activate search history in account menu if user is logged in.
$this->auth()->isLoggedIn() ? array('active' => 'history') : array()
);
?>
</div>
<? endif; ?>
</div>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment