Enable grouping on all MultiPageView.
[platal.git] / templates / site_errors.tpl
index ffdf1e5..0863fbb 100644 (file)
@@ -1,38 +1,60 @@
-{**************************************************************************}\r
-{*                                                                        *}\r
-{*  Copyright (C) 2003-2010 Polytechnique.org                             *}\r
-{*  http://opensource.polytechnique.org/                                  *}\r
-{*                                                                        *}\r
-{*  This program is free software; you can redistribute it and/or modify  *}\r
-{*  it under the terms of the GNU General Public License as published by  *}\r
-{*  the Free Software Foundation; either version 2 of the License, or     *}\r
-{*  (at your option) any later version.                                   *}\r
-{*                                                                        *}\r
-{*  This program is distributed in the hope that it will be useful,       *}\r
-{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}\r
-{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}\r
-{*  GNU General Public License for more details.                          *}\r
-{*                                                                        *}\r
-{*  You should have received a copy of the GNU General Public License     *}\r
-{*  along with this program; if not, write to the Free Software           *}\r
-{*  Foundation, Inc.,                                                     *}\r
-{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}\r
-{*                                                                        *}\r
-{**************************************************************************}\r
-\r
-<h1>Erreurs d'exécution</h1>\r
-  {if $errors}\r
-    {$errors|smarty:nodefaults}\r
-  {else}\r
-<p>\r
-    Il n'y a pas d'erreurs actuellement recensées.\r
-</p>\r
-  {/if}\r
-<form action="site_errors" method="post">\r
-  <div>\r
-    <input type="submit" name="clear" value="Effacer les erreurs" />\r
-  </div>\r
-</form>\r
-\r
-\r
-{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}\r
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<script type="text/javascript">
+{literal}
+// <![CDATA[
+$(function() {
+  $(".error_state").click(function() {
+    $(this).children(".error_state_content").toggle();
+  });
+});
+// ]]>
+{/literal}
+</script>
+
+<h1>Erreurs d'exécution</h1>
+  {iterate from=$errors item=error}
+  <fieldset>
+    <legend>{$error->date}</legend>
+    <pre>{$error->error}</pre>
+    {foreach from=$error->state item=table key=name}
+    <div class="error_state">
+      <div><strong>{$name} (click to show/hide content)</strong></div>
+      <div class="error_state_content" style="display: none">
+        {php}
+        $var = $this->get_template_vars('table');
+        var_dump($var);
+        {/php}
+      </div>
+    </div>
+    {/foreach}
+  </fieldset>
+  {/iterate}
+<form action="site_errors" method="post">
+  <div>
+    <input type="submit" name="clear" value="Effacer les erreurs" />
+  </div>
+</form>
+
+
+{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}