Created
April 27, 2012 13:20
-
-
Save eminetto/2509166 to your computer and use it in GitHub Desktop.
Layout usando Zend_Dojo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
</head> | |
<?php | |
Zend_Dojo::enableView($this); | |
if ($this->dojo()->isEnabled()): | |
echo $this->dojo(); | |
echo $this->dojo()->addStylesheetModule('dijit.themes.tundra'); | |
endif; | |
?> | |
<body class="tundra"> | |
<h1>Blog do Minetto</h1> | |
<?php | |
//mensagens de erro | |
$session = Zend_Registry::get('session'); | |
if(isset($session->erro)) | |
echo "<p> $session->erro </p>"; | |
unset($session->erro); | |
?> | |
<?php echo $this->layout()->content; ?> | |
<?php | |
//usuario logado? | |
$auth = Zend_Auth::getInstance(); | |
if ($auth->hasIdentity()) { ?> | |
<p>Logado como <?php echo $auth->getIdentity();?> </p> | |
<p><a href="/auth/logout">Sair</a></p> | |
<?php | |
} | |
else { | |
?> | |
<p><a href="/auth">Fazer login</a></p> | |
<?php | |
} | |
?> | |
<h5>Powered by Heineken</h5> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment