Rajout des aides de vue et d'action
[zf2.biz/galerie.git] / module / Application / view / layout / layout.phtml
index 513414e..9ef159f 100644 (file)
@@ -1,55 +1,75 @@
 <?php echo $this->doctype(); ?>
 
 <html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <?php echo $this->headTitle('ZF2 Skeleton Application')->setSeparator(' - ')->setAutoEscape(false) ?>
+    <head>
+        <meta charset="utf-8">
+        <?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
 
-    <?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>
+        <?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>
 
-    <!-- Le styles -->
-    <?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
-                    ->appendStylesheet($this->basePath() . '/css/bootstrap.min.css')
-                    ->appendStylesheet($this->basePath() . '/css/style.css')
-                    ->appendStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css') ?>
+        <!-- Le styles -->
+        <?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
+                        ->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
+                        ->prependStylesheet($this->basePath() . '/css/style.css')
+                        ->prependStylesheet($this->basePath() . '/css/bootstrap.min.css')
+                        ->prependStylesheet($this->basePath() . '/css/jquery-ui.css')
+                        ->prependStylesheet($this->basePath() . '/css/jquery-dataTables.css') ?>
 
-    <!-- Scripts -->
-    <?php echo $this->headScript()->appendFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',)) ?>
+        <!-- Scripts -->
+        <?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
+                                      ->prependFile($this->basePath() . '/js/bootstrap.min.js')
+                                      ->prependFile($this->basePath() . '/js/perso.js')
+                                      ->prependFile($this->basePath() . '/js/jquery-dataTables.js')
+                                      ->prependFile($this->basePath() . '/js/jquery-ui.js')
+                                      ->prependFile($this->basePath() . '/js/jquery.min.js') ?>
 
-  </head>
-
-  <body>
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="<?php echo $this->url('home') ?>">Skeleton Application</a>
-          <div class="nav-collapse">
-            <ul class="nav">
-              <li class="active"><a href="<?php echo $this->url('home') ?>">Home</a></li>
-            </ul>
-          </div><!--/.nav-collapse -->
+    </head>
+    <body>
+        <div class="navbar navbar-inverse navbar-fixed-top">
+            <div class="navbar-inner">
+                <div class="container">
+                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </a>
+                    <a class="brand" href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Skeleton Application') ?></a>
+                    <div class="nav-collapse collapse">
+                        <ul class="nav">
+                            <li class="active"><a href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Home') ?></a></li>
+                        </ul>
+                    </div><!--/.nav-collapse -->
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-
-    <div class="container">
-
-      <?php echo $this->content; ?>
-
-      <hr>
-
-      <footer>
-        <p>&copy; 2005 - 2012 by Zend Technologies Ltd. All rights reserved.</p>
-      </footer>
-
-    </div> <!-- /container -->
-
-  </body>
+        <div class="container">
+<?php
+    $views = $this->viewModel()->getCurrent()->getChildren();
+    $main_view = $views[0];
+    $variables = $main_view->getVariables();
+?>
+<?php if (isset($variables['infos'])) : ?>
+<?php foreach($main_view->infos as $info): ?>
+    <?php echo $this->format($info, 'info'); ?>
+<?php endforeach; ?>
+<?php endif; ?>
+<?php if (isset($main_view->warnings)) : ?>
+<?php foreach($warnings as $warning): ?>
+    <?php echo $this->format($warning, 'warning'); ?>
+<?php endforeach; ?>
+<?php endif; ?>
+<?php if (isset($main_view->errors)) : ?>
+<?php foreach($errors as $error): ?>
+    <?php echo $this->format($error, 'error'); ?>
+<?php endforeach; ?>
+<?php endif; ?>
+            <hr />
+            <?php echo $this->content; ?>
+            <hr />
+            <footer>
+                <p>&copy; 2005 - 2012 by Zend Technologies Ltd. <?php echo $this->translate('All rights reserved.') ?></p>
+            </footer>
+        </div> <!-- /container -->
+        <?php echo $this->inlineScript() ?>
+    </body>
 </html>