aboutsummaryrefslogtreecommitdiff
path: root/views/default/page
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page')
-rw-r--r--views/default/page/default.php8
-rw-r--r--views/default/page/elements/comments.php3
-rw-r--r--views/default/page/elements/head.php4
-rw-r--r--views/default/page/elements/messages.php2
-rw-r--r--views/default/page/layouts/widgets.php1
-rw-r--r--views/default/page/layouts/widgets/add_panel.php9
6 files changed, 17 insertions, 10 deletions
diff --git a/views/default/page/default.php b/views/default/page/default.php
index 3724bffd8..567494d0c 100644
--- a/views/default/page/default.php
+++ b/views/default/page/default.php
@@ -33,9 +33,11 @@ $footer = elgg_view('page/elements/footer', $vars);
// Set the content type
header("Content-type: text/html; charset=UTF-8");
+$lang = get_current_language();
+
?>
<!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">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" lang="<?php echo $lang; ?>">
<head>
<?php echo elgg_view('page/elements/head', $vars); ?>
</head>
@@ -45,13 +47,13 @@ header("Content-type: text/html; charset=UTF-8");
<?php echo $messages; ?>
</div>
- <?php if (elgg_is_logged_in()): ?>
+ <?php if (elgg_is_logged_in()){ ?>
<div class="elgg-page-topbar">
<div class="elgg-inner">
<?php echo $topbar; ?>
</div>
</div>
- <?php endif; ?>
+ <?php } ?>
<div class="elgg-page-header">
<div class="elgg-inner">
diff --git a/views/default/page/elements/comments.php b/views/default/page/elements/comments.php
index cf9b5f08b..97cb9574e 100644
--- a/views/default/page/elements/comments.php
+++ b/views/default/page/elements/comments.php
@@ -36,8 +36,7 @@ if ($html) {
}
if ($show_add_form) {
- $form_vars = array('name' => 'elgg_add_comment');
- echo elgg_view_form('comments/add', $form_vars, $vars);
+ echo elgg_view_form('comments/add', array(), $vars);
}
echo '</div>';
diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php
index e968e95ce..1eb2be088 100644
--- a/views/default/page/elements/head.php
+++ b/views/default/page/elements/head.php
@@ -66,7 +66,9 @@ $release = get_version(true);
<?php } ?>
<script type="text/javascript">
+// <![CDATA[
<?php echo elgg_view('js/initialize_elgg'); ?>
+// ]]>
</script>
<?php
@@ -76,4 +78,4 @@ $metatags = elgg_view('metatags', $vars);
if ($metatags) {
elgg_deprecated_notice("The metatags view has been deprecated. Extend page/elements/head instead", 1.8);
echo $metatags;
-} \ No newline at end of file
+}
diff --git a/views/default/page/elements/messages.php b/views/default/page/elements/messages.php
index a35a48586..edd40d71e 100644
--- a/views/default/page/elements/messages.php
+++ b/views/default/page/elements/messages.php
@@ -18,7 +18,7 @@ if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object'
foreach ($vars['object'] as $type => $list ) {
foreach ($list as $message) {
echo "<li class=\"elgg-message elgg-state-$type\">";
- echo autop($message);
+ echo elgg_autop($message);
echo '</li>';
}
}
diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php
index e3819cc20..c6b162516 100644
--- a/views/default/page/layouts/widgets.php
+++ b/views/default/page/layouts/widgets.php
@@ -31,6 +31,7 @@ if (elgg_can_edit_widget_layout($context)) {
'widgets' => $widgets,
'context' => $context,
'exact_match' => $exact_match,
+ 'show_access' => $show_access,
);
echo elgg_view('page/layouts/widgets/add_panel', $params);
}
diff --git a/views/default/page/layouts/widgets/add_panel.php b/views/default/page/layouts/widgets/add_panel.php
index 9eb78cdb6..d9b11342a 100644
--- a/views/default/page/layouts/widgets/add_panel.php
+++ b/views/default/page/layouts/widgets/add_panel.php
@@ -50,10 +50,13 @@ foreach ($widgets as $column_widgets) {
?>
</ul>
<?php
- $params = array(
+ echo elgg_view('input/hidden', array(
'name' => 'widget_context',
'value' => $context
- );
- echo elgg_view('input/hidden', $params);
+ ));
+ echo elgg_view('input/hidden', array(
+ 'name' => 'show_access',
+ 'value' => (int)$vars['show_access']
+ ));
?>
</div>