aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/walled_garden.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/walled_garden.php')
-rw-r--r--views/default/page/walled_garden.php80
1 files changed, 21 insertions, 59 deletions
diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php
index 74b4f3029..b280cf6b2 100644
--- a/views/default/page/walled_garden.php
+++ b/views/default/page/walled_garden.php
@@ -1,78 +1,40 @@
<?php
/**
- *
+ * Walled garden page shell
+ *
+ * Used for the walled garden index page
*/
-// Set the content type
-header("Content-type: text/html; charset=UTF-8");
-
-// Set title
-$site_title = elgg_get_config('sitename');
-if (empty($vars['title'])) {
- $title = $site_title;
-} else if (empty($site_title)) {
- $title = $vars['title'];
-} else {
- $title = $site_title . ": " . $vars['title'];
+$is_sticky_register = elgg_is_sticky_form('register');
+$wg_body_class = 'elgg-body-walledgarden';
+if ($is_sticky_register) {
+ $wg_body_class .= ' hidden';
}
-// @todo - move the css below into it's own style-sheet
-// that is called when running as a private network
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
?>
-<html>
+<!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>
<?php echo elgg_view('page/elements/head', $vars); ?>
- <style type="text/css">
- /* ***************************************
- WalledGarden
- *************************************** */
- .elgg-grid-walledgarden {
- margin:100px auto 0 auto;
- padding:0;
- width:600px;
- text-align: left;
- word-wrap:break-word;
- background: gray;
- }
-
- .elgg-grid-walledgarden > .elgg-col {
- background: white;
- }
-
- .elgg-heading-walledgarden {
- color:#666666;
- margin-top:80px;
- line-height: 1.1em;
- }
-
- .walledgardenlogin h2 {
- color:#666666;
- border-bottom:1px solid #CCCCCC;
- margin-bottom:5px;
- padding-bottom:5px;
- }
-
-
- </style>
</head>
<body>
<div class="elgg-page elgg-page-walledgarden">
<div class="elgg-page-messages">
<?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
</div>
- <div class="elgg-page-body">
- <div class="elgg-inner">
- <div class="elgg-grid elgg-grid-walledgarden">
- <div class="elgg-col elgg-col-1of2">
- <h1 class="elgg-heading-walledgarden">Welcome to:<br /><?php echo $title; ?></h1>
- </div>
- <div class="elgg-col elgg-col-1of2">
- <?php echo $vars['body']; ?>
- </div>
- </div>
- </div>
+ <div class="<?php echo $wg_body_class; ?>">
+ <?php echo $vars['body']; ?>
</div>
</div>
-<?php echo elgg_view('footer/analytics'); ?>
+<?php if ($is_sticky_register): ?>
+<script type="text/javascript">
+elgg.register_hook_handler('init', 'system', function() {
+ $('.registration_link').trigger('click');
+});
+</script>
+<?php endif; ?>
+<?php echo elgg_view('page/elements/foot'); ?>
</body>
</html> \ No newline at end of file