Add minimalist page layout and processing object
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 25 Aug 2007 16:51:27 +0000 (18:51 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 25 Aug 2007 16:51:27 +0000 (18:51 +0200)
modules/profile/page.inc.php [new file with mode: 0644]
templates/core/plwizard.tpl [new file with mode: 0644]

diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php
new file mode 100644 (file)
index 0000000..a4b2d3c
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2007 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                *
+ ***************************************************************************/
+
+class ProfileGeneral implements PlWizardPage
+{
+    protected $wizard;
+
+    public function __construct(PlWizard &$wiz)
+    {
+        $this->wizard =& $wiz;
+    }
+
+    public function template()
+    {
+        return 'profile/general.tpl';
+    }
+
+    public function prepare(PlatalPage &$page)
+    {
+    }
+
+    public function process()
+    {
+        return PlWizard::CURRENT_PAGE;
+    }
+}
+
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
diff --git a/templates/core/plwizard.tpl b/templates/core/plwizard.tpl
new file mode 100644 (file)
index 0000000..808e7c7
--- /dev/null
@@ -0,0 +1,40 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2007 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<div class="wizard" style="clear: both">
+  <div class="wiz_header">
+    {foreach from=$pages item=title key=id}
+    <div class="wiz_tab {if $id eq $current}active{/if} {if !$stateless && $current gt $id}grayed{/if}"
+         style="float: left; width: {$tab_width}%">
+      {if $stateless || $id gt $current}<a href="{$wiz_baseurl}/{$id}">{/if}
+      {$title}
+      {if $stateless || $id gt $current}</a>{/if}
+    </div>
+    {/foreach}
+    <div style="clear: both"></div>
+  </div>
+  <div class="wiz_content" style="clear: both">
+    {include file=$wiz_page}
+  </div>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}