Merge branch 'master' of github.com:jeena/seinheit.ch
This commit is contained in:
commit
775a1a7a71
8 changed files with 52 additions and 21 deletions
|
@ -3,7 +3,7 @@ class AdminController extends Katharsis_Controller_Abstract
|
|||
{
|
||||
public function indexAction()
|
||||
{
|
||||
if(!Access::isLogged()) $this->_location('gate');
|
||||
if(!Access::isLoggedIn()) $this->_location('gate');
|
||||
}
|
||||
|
||||
public function gateAction()
|
||||
|
|
|
@ -11,7 +11,7 @@ class PageController extends Katharsis_Controller_Abstract
|
|||
public function __call($method, $args)
|
||||
{
|
||||
$preview = false;
|
||||
if(array_key_exists('preview', $this->_getAllParams()) && Access::isLogged())
|
||||
if(array_key_exists('preview', $this->_getAllParams()) && Access::isLoggedIn())
|
||||
{
|
||||
$preview = true;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ class Access extends Katharsis_Model_Abstract
|
|||
{
|
||||
}
|
||||
|
||||
public static function isLogged()
|
||||
public static function isLoggedIn()
|
||||
{
|
||||
if(isset($_SESSION['logged']) && $_SESSION['logged'] == 1)
|
||||
{
|
||||
|
@ -14,4 +14,3 @@ class Access extends Katharsis_Model_Abstract
|
|||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -10,7 +10,7 @@
|
|||
</title>
|
||||
<link href='http://fonts.googleapis.com/css?family=Amaranth' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $this->base ?>/style/main.css" />
|
||||
<?php if(Access::isLogged()) { ?>
|
||||
<?php if(Access::isLoggedIn()) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $this->base ?>/style/admin.css" />
|
||||
<script src="<?php echo $this->base ?>/script/admin.js"></script>
|
||||
<?php } ?>
|
||||
|
@ -19,12 +19,12 @@
|
|||
<meta name="Description" content="" />
|
||||
<meta name="keywords" content="" />
|
||||
</head>
|
||||
<body<?php if(Access::isLogged()): ?> class="admin"<?php endif ?>>
|
||||
<body<?php if(Access::isLoggedIn()): ?> class="admin"<?php endif ?>>
|
||||
|
||||
<div id="container">
|
||||
<header>
|
||||
|
||||
<?php if(Access::isLogged()): ?>
|
||||
<?php if(Access::isLoggedIn()): ?>
|
||||
<ul id="adminNavigation">
|
||||
<li>Admin Bereich</li>
|
||||
<li><a href="<?php echo $this->base ?>/adminNavigation">Navigationen</a></li>
|
||||
|
@ -35,9 +35,9 @@
|
|||
|
||||
<?php if($this->notices): ?>
|
||||
<ul class="notices">
|
||||
<?php foreach($this->notices as $notice): ?>
|
||||
<?php foreach($this->notices as $notice): ?>
|
||||
<li><?php echo $notice ?></li>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
|
@ -46,12 +46,26 @@
|
|||
|
||||
<ul id="navi">
|
||||
<?php foreach($this->mainNavigationItems as $item): ?>
|
||||
<li <?php if($item['id'] == $this->activeMenuItem) echo 'class="active"'?>>
|
||||
<li<?php if($item['id'] == $this->activeMenuItem) echo ' class="active"'?>>
|
||||
<?php if($item['link']): ?>
|
||||
<a href="<?php echo $item['link'] ?>"><?php echo $item['name'] ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $this->base ?>/<?php echo $item['controller'] ?>/<?php echo $item['action'] ?>"><?php echo $item['name'] ?></a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(count($item['children']) > 0): ?>
|
||||
<ul>
|
||||
<?php foreach($item['children'] as $child): ?>
|
||||
<li<?php if($child['id'] == $this->activeSubMenuItem) echo ' class="active"'?>>
|
||||
<?php if($child['link']): ?>
|
||||
<a href="<?php echo $child['link'] ?>"><?php echo $child['name'] ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $this->base ?>/<?php echo $child['controller'] ?>/<?php echo $child['action'] ?>"><?php echo $child['name'] ?></a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
|
|
@ -7,7 +7,7 @@ class DidgeridooArtwork_Controller_Plugin_Access extends Katharsis_Controller_Pl
|
|||
{
|
||||
$firstFive = substr(Katharsis_Request::getControllerName(), 0, 5);
|
||||
|
||||
if($firstFive == 'admin' && !Access::isLogged())
|
||||
if($firstFive == 'admin' && !Access::isLoggedIn())
|
||||
{
|
||||
Katharsis_Request::setControllerName('admin');
|
||||
Katharsis_Request::setActionName('index');
|
||||
|
|
|
@ -4,6 +4,12 @@ class DidgeridooArtwork_Controller_Plugin_Navigation extends Katharsis_Controlle
|
|||
public function preController()
|
||||
{
|
||||
$view = Katharsis_View::getInstance();
|
||||
|
||||
$navigation = new Navigation();
|
||||
$view->mainNavigationItems = $navigation->getAllItems();
|
||||
|
||||
|
||||
/*
|
||||
$sql = "SELECT id, name, controller, action, link FROM navigation WHERE parent_id IS NULL AND active = 1 ORDER BY sorting";
|
||||
$view->mainNavigationItems = $this->_con->fetchAll($sql);
|
||||
|
||||
|
@ -34,6 +40,6 @@ class DidgeridooArtwork_Controller_Plugin_Navigation extends Katharsis_Controlle
|
|||
$sql = $this->_con->createStatement($sql, array('controller' => $row['controller'], 'action' => $row['action']));
|
||||
$view->activeSubMenuItem = $this->_con->fetchField($sql);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
|
@ -3,7 +3,6 @@ body.admin footer {
|
|||
}
|
||||
|
||||
#adminNavigation {
|
||||
font-family: verdana;
|
||||
background: #90CB93;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
|
|
@ -51,8 +51,7 @@ img { max-width: 100%; }
|
|||
}
|
||||
|
||||
#logo {
|
||||
padding-top: 70px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
|
@ -60,27 +59,41 @@ img { max-width: 100%; }
|
|||
}
|
||||
|
||||
#navi {
|
||||
margin-top: 70px;
|
||||
float: right;
|
||||
right: 0px ;
|
||||
list-style-type: none;
|
||||
margin: -47px 0;
|
||||
text-align: center;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
#navi li {
|
||||
display: inline;
|
||||
#navi > li {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navi li a {
|
||||
color: black;
|
||||
padding: 10px 12px;
|
||||
text-decoration: none;
|
||||
background-color: #90cb93;
|
||||
background: #90cb93;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#navi a:hover {
|
||||
background: #84c684;
|
||||
}
|
||||
|
||||
#navi ul {
|
||||
display: none;
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#navi > li:hover ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#stage {
|
||||
clear: both;
|
||||
border-top: 5px solid #90cb93;
|
||||
padding: 50px 0px;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue