aboutsummaryrefslogtreecommitdiff
path: root/views/installation/page
diff options
context:
space:
mode:
Diffstat (limited to 'views/installation/page')
-rw-r--r--views/installation/page/default.php57
-rw-r--r--views/installation/page/elements/footer.php10
-rw-r--r--views/installation/page/elements/header.php8
-rw-r--r--views/installation/page/elements/messages.php21
-rw-r--r--views/installation/page/elements/sidebar.php26
5 files changed, 122 insertions, 0 deletions
diff --git a/views/installation/page/default.php b/views/installation/page/default.php
new file mode 100644
index 000000000..662e8206e
--- /dev/null
+++ b/views/installation/page/default.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Elgg install pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['sysmessages'] Array of system status messages
+ */
+
+$title = elgg_echo('install:title');
+$title .= " : {$vars['title']}";
+
+// we won't trust server configuration but specify utf-8
+header('Content-type: text/html; charset=utf-8');
+
+// turn off browser caching
+header('Pragma: public', TRUE);
+header("Cache-Control: no-cache, must-revalidate", TRUE);
+header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE);
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title><?php echo $title; ?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
+ <link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>install/css/install.css" type="text/css" />
+ <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.6.4.min.js"></script>
+ <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>install/js/install.js"></script>
+ </head>
+ <body>
+ <div class="elgg-page">
+ <div class="elgg-page-header">
+ <?php echo elgg_view('page/elements/header', $vars); ?>
+ </div>
+ <div class="elgg-page-body">
+ <div class="elgg-layout">
+ <div class="elgg-sidebar">
+ <?php echo elgg_view('page/elements/sidebar', $vars); ?>
+ </div>
+ <div class="elgg-body">
+ <h2><?php echo $vars['title']; ?></h2>
+ <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
+ <?php echo $vars['body']; ?>
+ </div>
+ </div>
+ </div>
+ <div class="elgg-page-footer">
+ <?php echo elgg_view('page/elements/footer'); ?>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/views/installation/page/elements/footer.php b/views/installation/page/elements/footer.php
new file mode 100644
index 000000000..d6a755fba
--- /dev/null
+++ b/views/installation/page/elements/footer.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Install footer - offers help links
+ */
+?>
+<ul>
+ <li><a href="http://docs.elgg.org/wiki/Installation" target="_blank">Install instructions</a></li>
+ <li><a href="http://docs.elgg.org/wiki/Install_Troubleshooting" target="_blank">Install troubleshooting</a></li>
+ <li><a href="http://community.elgg.org/pg/groups/world" target="_blank">Elgg community forums</a></li>
+</ul> \ No newline at end of file
diff --git a/views/installation/page/elements/header.php b/views/installation/page/elements/header.php
new file mode 100644
index 000000000..8c18dbffd
--- /dev/null
+++ b/views/installation/page/elements/header.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Install header
+ */
+
+$url = elgg_get_site_url()."_graphics/elgg_logo.png";
+?>
+<img src="<?php echo $url; ?>" alt="Elgg" />
diff --git a/views/installation/page/elements/messages.php b/views/installation/page/elements/messages.php
new file mode 100644
index 000000000..46261dca4
--- /dev/null
+++ b/views/installation/page/elements/messages.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Lists all system messages
+ *
+ * @uses $vars['object'] The array of message registers
+ */
+
+if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+
+ echo '<ul class="elgg-system-messages">';
+
+ foreach ($vars['object'] as $type => $list ) {
+ foreach ($list as $message) {
+ echo "<li class=\"elgg-state-$type\">";
+ echo elgg_autop($message);
+ echo '</li>';
+ }
+ }
+
+ echo '</ul>';
+}
diff --git a/views/installation/page/elements/sidebar.php b/views/installation/page/elements/sidebar.php
new file mode 100644
index 000000000..8136cd898
--- /dev/null
+++ b/views/installation/page/elements/sidebar.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Install sidebar
+ *
+ * @uses $vars['step'] Current step
+ * @uses $vars['steps'] Array of steps
+ */
+
+$current_step = $vars['step'];
+$steps = $vars['steps'];
+
+$current_step_index = array_search($current_step, $steps);
+
+echo '<ol>';
+foreach ($steps as $index => $step) {
+ if ($index < $current_step_index) {
+ $class = 'past';
+ } elseif ($index == $current_step_index) {
+ $class = 'present';
+ } else {
+ $class = 'future';
+ }
+ $text = elgg_echo("install:$step");
+ echo "<li class=\"$class\">$text</li>";
+}
+echo '</ol>';