From 7f01270ba106937300cf491927839d3428360d0a Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 5 Oct 2010 10:53:40 +0000 Subject: moved installation to its own viewtype git-svn-id: http://code.elgg.org/elgg/trunk@7010 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/installation/input/access.php | 49 +++++++++++++++++++++ views/installation/input/button.php | 53 +++++++++++++++++++++++ views/installation/input/checkboxes.php | 50 +++++++++++++++++++++ views/installation/input/form.php | 53 +++++++++++++++++++++++ views/installation/input/hidden.php | 18 ++++++++ views/installation/input/longtext.php | 24 ++++++++++ views/installation/input/password.php | 23 ++++++++++ views/installation/input/pulldown.php | 45 +++++++++++++++++++ views/installation/input/reset.php | 26 +++++++++++ views/installation/input/securitytoken.php | 17 ++++++++ views/installation/input/submit.php | 26 +++++++++++ views/installation/input/text.php | 26 +++++++++++ views/installation/install/footer.php | 10 +++++ views/installation/install/forms/admin.php | 21 +++++++++ views/installation/install/forms/database.php | 20 +++++++++ views/installation/install/forms/settings.php | 20 +++++++++ views/installation/install/forms/template.php | 27 ++++++++++++ views/installation/install/header.php | 6 +++ views/installation/install/nav.php | 35 +++++++++++++++ views/installation/install/pages/admin.php | 8 ++++ views/installation/install/pages/complete.php | 14 ++++++ views/installation/install/pages/database.php | 16 +++++++ views/installation/install/pages/requirements.php | 39 +++++++++++++++++ views/installation/install/pages/settings.php | 5 +++ views/installation/install/pages/welcome.php | 8 ++++ views/installation/install/sidebar.php | 26 +++++++++++ views/installation/messages/errors/error.php | 17 ++++++++ views/installation/messages/errors/list.php | 41 ++++++++++++++++++ views/installation/messages/list.php | 18 ++++++++ views/installation/messages/messages/list.php | 43 ++++++++++++++++++ views/installation/messages/messages/message.php | 17 ++++++++ views/installation/page_shells/default.php | 51 ++++++++++++++++++++++ 32 files changed, 852 insertions(+) create mode 100644 views/installation/input/access.php create mode 100644 views/installation/input/button.php create mode 100644 views/installation/input/checkboxes.php create mode 100644 views/installation/input/form.php create mode 100644 views/installation/input/hidden.php create mode 100644 views/installation/input/longtext.php create mode 100644 views/installation/input/password.php create mode 100644 views/installation/input/pulldown.php create mode 100644 views/installation/input/reset.php create mode 100644 views/installation/input/securitytoken.php create mode 100644 views/installation/input/submit.php create mode 100644 views/installation/input/text.php create mode 100644 views/installation/install/footer.php create mode 100644 views/installation/install/forms/admin.php create mode 100644 views/installation/install/forms/database.php create mode 100644 views/installation/install/forms/settings.php create mode 100644 views/installation/install/forms/template.php create mode 100644 views/installation/install/header.php create mode 100644 views/installation/install/nav.php create mode 100644 views/installation/install/pages/admin.php create mode 100644 views/installation/install/pages/complete.php create mode 100644 views/installation/install/pages/database.php create mode 100644 views/installation/install/pages/requirements.php create mode 100644 views/installation/install/pages/settings.php create mode 100644 views/installation/install/pages/welcome.php create mode 100644 views/installation/install/sidebar.php create mode 100644 views/installation/messages/errors/error.php create mode 100644 views/installation/messages/errors/list.php create mode 100644 views/installation/messages/list.php create mode 100644 views/installation/messages/messages/list.php create mode 100644 views/installation/messages/messages/message.php create mode 100644 views/installation/page_shells/default.php (limited to 'views/installation') diff --git a/views/installation/input/access.php b/views/installation/input/access.php new file mode 100644 index 000000000..a57014840 --- /dev/null +++ b/views/installation/input/access.php @@ -0,0 +1,49 @@ + 0) { + + ?> + + + + wwwroot)===false) { + $src = ""; +} +?> + value="" src="" class="" /> \ No newline at end of file diff --git a/views/installation/input/checkboxes.php b/views/installation/input/checkboxes.php new file mode 100644 index 000000000..0792f09ce --- /dev/null +++ b/views/installation/input/checkboxes.php @@ -0,0 +1,50 @@ + $option) { + //if (!in_array($option,$vars['value'])) { + if (is_array($vars['value'])) { + if (!in_array($option,$vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } else { + if ($option != $vars['value']) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } + + // handle indexed array where label is not specified + // @todo deprecate in Elgg 1.8 + if (is_integer($label)) { + $label = $option; + } + + $disabled = ""; + if ($vars['disabled']) { + $disabled = ' disabled="yes" '; + } + echo "
"; +} \ No newline at end of file diff --git a/views/installation/input/form.php b/views/installation/input/form.php new file mode 100644 index 000000000..35e718adb --- /dev/null +++ b/views/installation/input/form.php @@ -0,0 +1,53 @@ + +
id="" name="" action="" method="" > + + +
\ No newline at end of file diff --git a/views/installation/input/hidden.php b/views/installation/input/hidden.php new file mode 100644 index 000000000..dd5c8bb98 --- /dev/null +++ b/views/installation/input/hidden.php @@ -0,0 +1,18 @@ + + name="" value="" /> \ No newline at end of file diff --git a/views/installation/input/longtext.php b/views/installation/input/longtext.php new file mode 100644 index 000000000..9da3d8276 --- /dev/null +++ b/views/installation/input/longtext.php @@ -0,0 +1,24 @@ + + + \ No newline at end of file diff --git a/views/installation/input/password.php b/views/installation/input/password.php new file mode 100644 index 000000000..461f77955 --- /dev/null +++ b/views/installation/input/password.php @@ -0,0 +1,23 @@ + + + name="" value="" class="" /> diff --git a/views/installation/input/pulldown.php b/views/installation/input/pulldown.php new file mode 100644 index 000000000..6ad12eec4 --- /dev/null +++ b/views/installation/input/pulldown.php @@ -0,0 +1,45 @@ + "option" where "value" is an internal name and "option" is + * the value displayed on the button. Replaces $vars['options'] when defined. + */ + + +$class = $vars['class']; +if (!$class) { + $class = "input-pulldown"; +} +?> + \ No newline at end of file diff --git a/views/installation/input/reset.php b/views/installation/input/reset.php new file mode 100644 index 000000000..bb8d278c3 --- /dev/null +++ b/views/installation/input/reset.php @@ -0,0 +1,26 @@ + '__elgg_token', 'value' => $token)); +echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts)); diff --git a/views/installation/input/submit.php b/views/installation/input/submit.php new file mode 100644 index 000000000..cfa7989d0 --- /dev/null +++ b/views/installation/input/submit.php @@ -0,0 +1,26 @@ + + name="" value="" class=""/> \ No newline at end of file diff --git a/views/installation/install/footer.php b/views/installation/install/footer.php new file mode 100644 index 000000000..69cd27f66 --- /dev/null +++ b/views/installation/install/footer.php @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/views/installation/install/forms/admin.php b/views/installation/install/forms/admin.php new file mode 100644 index 000000000..ae83cadea --- /dev/null +++ b/views/installation/install/forms/admin.php @@ -0,0 +1,21 @@ + $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/database.php b/views/installation/install/forms/database.php new file mode 100644 index 000000000..a3fa8dd65 --- /dev/null +++ b/views/installation/install/forms/database.php @@ -0,0 +1,20 @@ + $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/settings.php b/views/installation/install/forms/settings.php new file mode 100644 index 000000000..67cba10f6 --- /dev/null +++ b/views/installation/install/forms/settings.php @@ -0,0 +1,20 @@ + $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/template.php b/views/installation/install/forms/template.php new file mode 100644 index 000000000..a2d93f42e --- /dev/null +++ b/views/installation/install/forms/template.php @@ -0,0 +1,27 @@ + $params) { + $label = elgg_echo("installation:$type:label:$field"); + $help = elgg_echo("installation:$type:help:$field"); + $params['internalname'] = $field; + + $form_body .= '

'; + $form_body .= ""; + $form_body .= elgg_view("input/{$params['type']}", $params); + $form_body .= "$help"; + $form_body .= '

'; +} + +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('next'))); + +echo $form_body; diff --git a/views/installation/install/header.php b/views/installation/install/header.php new file mode 100644 index 000000000..d821e31e5 --- /dev/null +++ b/views/installation/install/header.php @@ -0,0 +1,6 @@ + +

Elgg

diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php new file mode 100644 index 000000000..d6a20ea2b --- /dev/null +++ b/views/installation/install/nav.php @@ -0,0 +1,35 @@ +$refresh_text"; +} + +// create next button and selectively disable +$next_text = elgg_echo('next'); +$next_link = "{$vars['url']}install.php?step={$vars['next_step']}"; +$next = "$next_text"; +if (isset($vars['advance']) && !$vars['advance']) { + // disable the next button + $next = "$next_text"; +} + + +echo <<<___END +
+ $next + $refresh +
+ +___END; diff --git a/views/installation/install/pages/admin.php b/views/installation/install/pages/admin.php new file mode 100644 index 000000000..1fdd5dced --- /dev/null +++ b/views/installation/install/pages/admin.php @@ -0,0 +1,8 @@ + + +
+Go to site"; +?> +
diff --git a/views/installation/install/pages/database.php b/views/installation/install/pages/database.php new file mode 100644 index 000000000..7765c6e48 --- /dev/null +++ b/views/installation/install/pages/database.php @@ -0,0 +1,16 @@ + $checks) { + $title = elgg_echo("install:require:$category"); + echo "

$title

"; + echo ""; +} + +$vars['refresh'] = TRUE; + +// cannot advance to next step with a failure +if ($vars['num_failures'] != 0) { + $vars['advance'] = FALSE; +} + +echo elgg_view('install/nav', $vars); diff --git a/views/installation/install/pages/settings.php b/views/installation/install/pages/settings.php new file mode 100644 index 000000000..6f20573ef --- /dev/null +++ b/views/installation/install/pages/settings.php @@ -0,0 +1,5 @@ +'; +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 "
  • $text
  • "; +} +echo ''; diff --git a/views/installation/messages/errors/error.php b/views/installation/messages/errors/error.php new file mode 100644 index 000000000..2ec365890 --- /dev/null +++ b/views/installation/messages/errors/error.php @@ -0,0 +1,17 @@ + + +

    + +

    \ No newline at end of file diff --git a/views/installation/messages/errors/list.php b/views/installation/messages/errors/list.php new file mode 100644 index 000000000..c270d6c0a --- /dev/null +++ b/views/installation/messages/errors/list.php @@ -0,0 +1,41 @@ + + +
    +
    + + $error)); + //echo "
    "; + } +?> +
    +
    + 0) { + foreach($vars['object'] as $register => $list ) { + echo elgg_view("messages/{$register}/list", array('object' => $list)); + } +} \ No newline at end of file diff --git a/views/installation/messages/messages/list.php b/views/installation/messages/messages/list.php new file mode 100644 index 000000000..ed169c692 --- /dev/null +++ b/views/installation/messages/messages/list.php @@ -0,0 +1,43 @@ + + + + +
    + + $message)); + } +?> + +
    + + + +

    + +

    \ No newline at end of file diff --git a/views/installation/page_shells/default.php b/views/installation/page_shells/default.php new file mode 100644 index 000000000..b023197fa --- /dev/null +++ b/views/installation/page_shells/default.php @@ -0,0 +1,51 @@ + + + + + Elgg Install : <?php echo $vars['title']; ?> + + + + + +
    +
    + +
    +
    + +
    +
    +

    + $vars['sysmessages'])); ?> + +
    +
    +
    + + + -- cgit v1.2.3