Minor template updates
This commit is contained in:
parent
696ee7a9e2
commit
45cadf0945
@ -85,7 +85,10 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
if ($this->request->is_ajax())
|
||||
throw HTTP_Exception::factory(403,_('You dont have enough permissions.'));
|
||||
else
|
||||
HTTP::redirect('login/noaccess');
|
||||
if (! Kohana::$config->load('debug')->disabled_noaccess_redirect)
|
||||
HTTP::redirect('login/noaccess');
|
||||
else
|
||||
throw HTTP_Exception::factory(501,'I would redirect you here - no ACCESS');
|
||||
|
||||
} else {
|
||||
Session::instance()->set('afterlogin',Request::detect_uri());
|
||||
@ -150,8 +153,8 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
$output = Style::factory()->render_all();
|
||||
$output .= Script::factory()->render_all();
|
||||
|
||||
if (! isset($this->template->content) AND $this->response->body())
|
||||
$output .= $this->response->body();
|
||||
if (! isset($this->template->content))
|
||||
$output .= $this->response->body() ? $this->response->body() : '';
|
||||
else
|
||||
$output .= $this->template->content;
|
||||
|
||||
|
@ -71,6 +71,11 @@
|
||||
<li class="">
|
||||
<a href="<?php echo URL::link('user','welcome',TRUE); ?>"><i class="icon-home"></i> <span>Home</span></a>
|
||||
</li>
|
||||
<?php if (($ao = Auth::instance()->get_user()) AND $ao->isAdmin()) : ?>
|
||||
<li class="">
|
||||
<a href="<?php echo URL::link('admin','welcome',TRUE); ?>"><i class="icon-tasks"></i> <span>Admin</span></a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div> <!-- /.subnav-collapse -->
|
||||
</div> <!-- /container -->
|
||||
|
@ -0,0 +1,15 @@
|
||||
<ul id="main-nav">
|
||||
<li class="active"><a href="<?php echo URL::site(''); ?>">Home</a></li>
|
||||
<?php if ($x = Company::instance()->faq()) : ?>
|
||||
<li><a href="<?php echo $x; ?>">Faq</a></li>
|
||||
<?php endif ?>
|
||||
<?php if (Auth::instance()->logged_in()) : ?>
|
||||
<li><a href="<?php echo URL::site('login'); ?>">Customer Login</a></li>
|
||||
<?php else : ?>
|
||||
<li><a href="<?php echo URL::site('login'); ?>" data-toggle="modal" data-target="#modal-login">Customer Login</a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<div class="modal hide fade" id="modal-login" role="dialog" aria-hidden="true">
|
||||
<div class="modal-body"></div>
|
||||
</div>
|
Reference in New Issue
Block a user