aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/users/admins.php12
-rw-r--r--views/default/core/settings/statistics/numentities.php2
-rw-r--r--views/default/core/settings/statistics/online.php2
-rw-r--r--views/default/css/admin.php4
-rw-r--r--views/default/css/elements/typography.php3
-rw-r--r--views/default/forms/profile/edit.php3
-rw-r--r--views/default/forms/profile/fields/add.php2
-rw-r--r--views/default/forms/user/passwordreset.php2
-rw-r--r--views/default/js/admin.php11
-rw-r--r--views/default/js/elgg.php1
-rw-r--r--views/default/js/initialize_elgg.php1
-rw-r--r--views/default/js/lightbox.php4
-rw-r--r--views/default/js/walled_garden.php5
-rw-r--r--views/default/object/plugin/elements/dependencies.php2
-rw-r--r--views/default/output/email.php4
-rw-r--r--views/default/output/longtext.php2
-rw-r--r--views/default/page/components/list.php15
-rw-r--r--views/default/page/default.php8
-rw-r--r--views/default/page/elements/messages.php2
-rw-r--r--views/default/river/elements/image.php6
-rw-r--r--views/default/widgets/control_panel/content.php26
21 files changed, 83 insertions, 34 deletions
diff --git a/views/default/admin/users/admins.php b/views/default/admin/users/admins.php
new file mode 100644
index 000000000..9b175d437
--- /dev/null
+++ b/views/default/admin/users/admins.php
@@ -0,0 +1,12 @@
+<?php
+$admins = elgg_list_entities(array(), 'elgg_get_admins');
+
+?>
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('admin:statistics:label:admins'); ?></h3>
+ </div>
+ <div class="elgg-body">
+ <?php echo $admins; ?>
+ </div>
+</div>
diff --git a/views/default/core/settings/statistics/numentities.php b/views/default/core/settings/statistics/numentities.php
index ce1705a2e..3782fd8bc 100644
--- a/views/default/core/settings/statistics/numentities.php
+++ b/views/default/core/settings/statistics/numentities.php
@@ -7,7 +7,7 @@
*/
// Get entity statistics
-$entity_stats = get_entity_statistics(elgg_get_logged_in_user_guid());
+$entity_stats = get_entity_statistics(elgg_get_page_owner_guid());
if ($entity_stats) {
$rows = '';
diff --git a/views/default/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php
index ce7ff35fb..f50ad9acc 100644
--- a/views/default/core/settings/statistics/online.php
+++ b/views/default/core/settings/statistics/online.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$user = elgg_get_logged_in_user_entity();
+$user = elgg_get_page_owner_entity();
$logged_in = 0;
$log = get_system_log($user->guid, "login", "", 'user', '', 1);
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index b996e5636..059e51dd6 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -1238,6 +1238,10 @@ a.elgg-widget-collapsed:before {
height: 16px;
display: inline-block;
margin: 0 2px;
+ vertical-align: text-bottom;
+}
+.elgg-module .elgg-head .elgg-icon {
+ vertical-align: baseline;
}
.elgg-icon-delete:hover,
.elgg-icon-delete-alt:hover {
diff --git a/views/default/css/elements/typography.php b/views/default/css/elements/typography.php
index d93b28d2c..4c2c3c774 100644
--- a/views/default/css/elements/typography.php
+++ b/views/default/css/elements/typography.php
@@ -157,5 +157,6 @@ h6 { font-size: 0.8em; }
padding: 3px 5px;
}
.elgg-output img {
- max-width: 100%;
+ max-width: 100%;
+ height: auto;
} \ No newline at end of file
diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php
index 222935344..9538b779e 100644
--- a/views/default/forms/profile/edit.php
+++ b/views/default/forms/profile/edit.php
@@ -18,7 +18,8 @@ if (is_array($profile_fields) && count($profile_fields) > 0) {
foreach ($profile_fields as $shortname => $valtype) {
$metadata = elgg_get_metadata(array(
'guid' => $vars['entity']->guid,
- 'metadata_name' => $shortname
+ 'metadata_name' => $shortname,
+ 'limit' => false
));
if ($metadata) {
if (is_array($metadata)) {
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php
index 1ea9c57a9..2087ec299 100644
--- a/views/default/forms/profile/fields/add.php
+++ b/views/default/forms/profile/fields/add.php
@@ -25,5 +25,5 @@ $formbody = <<< END
$submit_control</div>
END;
-echo autop(elgg_echo('profile:explainchangefields'));
+echo elgg_autop(elgg_echo('profile:explainchangefields'));
echo $formbody;
diff --git a/views/default/forms/user/passwordreset.php b/views/default/forms/user/passwordreset.php
index 3c89776f6..5946fa7c0 100644
--- a/views/default/forms/user/passwordreset.php
+++ b/views/default/forms/user/passwordreset.php
@@ -3,7 +3,7 @@
* Reset user password form
*/
-echo autop(elgg_echo('user:resetpassword:reset_password_confirm'));
+echo elgg_autop(elgg_echo('user:resetpassword:reset_password_confirm'));
echo elgg_view('input/hidden', array(
'name' => 'u',
diff --git a/views/default/js/admin.php b/views/default/js/admin.php
index 5cefba512..e8aa0d2ed 100644
--- a/views/default/js/admin.php
+++ b/views/default/js/admin.php
@@ -4,8 +4,9 @@
*
* @since 1.8
*/
+
+if (0) { ?><script><?php }
?>
-//<script>
elgg.provide('elgg.admin');
elgg.admin.init = function () {
@@ -47,7 +48,7 @@ elgg.admin.init = function () {
// admin notices delete ajax
$('a.elgg-admin-notice').click(elgg.admin.deleteNotice);
-}
+};
/**
* Save the plugin order after a move event.
@@ -88,7 +89,7 @@ elgg.admin.editProfileField = function(value, settings) {
elgg.action('profile/fields/edit', data);
return value;
-}
+};
/**
* Save the plugin profile order after a move event.
@@ -104,7 +105,7 @@ elgg.admin.moveProfileField = function(e, ui) {
elgg.action('profile/fields/reorder', {
fieldorder: orderStr
});
-}
+};
/**
* Fires the ajax action to delete the admin notice then hides the notice.
@@ -120,6 +121,6 @@ elgg.admin.deleteNotice = function(e) {
$container.slideUp('medium');
}
});
-}
+};
elgg.register_hook_handler('init', 'system', elgg.admin.init, 1000); \ No newline at end of file
diff --git a/views/default/js/elgg.php b/views/default/js/elgg.php
index 6460e93d6..b82d98ce4 100644
--- a/views/default/js/elgg.php
+++ b/views/default/js/elgg.php
@@ -50,6 +50,7 @@ foreach ($libs as $file) {
/**
* Set some values that are cacheable
*/
+if (0) { ?><script><?php }
?>
elgg.version = '<?php echo get_version(); ?>';
diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php
index f8234f84f..b45c33463 100644
--- a/views/default/js/initialize_elgg.php
+++ b/views/default/js/initialize_elgg.php
@@ -3,6 +3,7 @@
* Initialize Elgg's js lib with the uncacheable data
*/
+if (0) { ?><script><?php }
?>
/**
* Don't want to cache these -- they could change for every request
diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php
index c45d46098..a1f018eea 100644
--- a/views/default/js/lightbox.php
+++ b/views/default/js/lightbox.php
@@ -3,7 +3,8 @@
* Elgg lightbox
*
* Usage
- * Apply the class elgg-lightbox to links.
+ * Call elgg_load_js('lightbox') and elgg_load_css('lightbox') then
+ * apply the class elgg-lightbox to links.
*
* Advanced Usage
* Elgg is distributed with the Fancybox jQuery library. Please go to
@@ -16,6 +17,7 @@
* @todo add support for passing options: $('#myplugin-lightbox').elgg.ui.lightbox(options);
*/
+if (0) { ?><script><?php }
?>
/**
diff --git a/views/default/js/walled_garden.php b/views/default/js/walled_garden.php
index 13ec83c04..7a482fe23 100644
--- a/views/default/js/walled_garden.php
+++ b/views/default/js/walled_garden.php
@@ -12,6 +12,7 @@ $cancel_button = elgg_view('input/button', array(
));
$cancel_button = trim($cancel_button);
+if (0) { ?><script><?php }
?>
elgg.provide('elgg.walled_garden');
@@ -47,10 +48,10 @@ elgg.walled_garden.load = function(view) {
$(id).find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>');
$('#elgg-walledgarden-login').fadeToggle();
$(id).fadeToggle();
- },
+ }
});
event.preventDefault();
- };
+ };
};
elgg.register_hook_handler('init', 'system', elgg.walled_garden.init); \ No newline at end of file
diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php
index 8abd61692..d8daedd33 100644
--- a/views/default/object/plugin/elements/dependencies.php
+++ b/views/default/object/plugin/elements/dependencies.php
@@ -29,6 +29,8 @@ foreach ($deps as $dep) {
if ($dep['status']) {
$class = "elgg-state-success elgg-dependency elgg-dependency-$type";
+ } elseif ($dep['type'] == 'suggests') {
+ $class = "elgg-state-warning elgg-dependency elgg-dependency-$type";
} else {
$class = "elgg-state-error elgg-dependency elgg-dependency-$type";
}
diff --git a/views/default/output/email.php b/views/default/output/email.php
index 00eefad1f..f5a8bc4b8 100644
--- a/views/default/output/email.php
+++ b/views/default/output/email.php
@@ -10,6 +10,8 @@
*
*/
+$encoded_value = htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
+
if (!empty($vars['value'])) {
- echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8', false) ."</a>";
+ echo "<a href=\"mailto:$encoded_value\">$encoded_value</a>";
} \ No newline at end of file
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php
index 200f27de5..589100c4f 100644
--- a/views/default/output/longtext.php
+++ b/views/default/output/longtext.php
@@ -31,7 +31,7 @@ if ($parse_urls) {
$text = filter_tags($text);
-$text = autop($text);
+$text = elgg_autop($text);
$attributes = elgg_format_attributes($vars);
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index 0cf7d507c..28ed58ddf 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -51,14 +51,15 @@ if ($pagination && $count) {
if (is_array($items) && count($items) > 0) {
$html .= "<ul class=\"$list_class\">";
foreach ($items as $item) {
- if (elgg_instanceof($item)) {
- $id = "elgg-{$item->getType()}-{$item->getGUID()}";
- } else {
- $id = "item-{$item->getType()}-{$item->id}";
+ $li = elgg_view_list_item($item, $vars);
+ if ($li) {
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ $html .= "<li id=\"$id\" class=\"$item_class\">$li</li>";
}
- $html .= "<li id=\"$id\" class=\"$item_class\">";
- $html .= elgg_view_list_item($item, $vars);
- $html .= '</li>';
}
$html .= '</ul>';
}
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/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/river/elements/image.php b/views/default/river/elements/image.php
index 9caa44b36..6f6aeae65 100644
--- a/views/default/river/elements/image.php
+++ b/views/default/river/elements/image.php
@@ -9,4 +9,8 @@
$subject = $vars['item']->getSubjectEntity();
-echo elgg_view_entity_icon($subject, 'small');
+if (elgg_in_context('widgets')) {
+ echo elgg_view_entity_icon($subject, 'tiny');
+} else {
+ echo elgg_view_entity_icon($subject, 'small');
+}
diff --git a/views/default/widgets/control_panel/content.php b/views/default/widgets/control_panel/content.php
index d2db54bc6..a348d612f 100644
--- a/views/default/widgets/control_panel/content.php
+++ b/views/default/widgets/control_panel/content.php
@@ -11,12 +11,26 @@ elgg_register_menu_item('admin_control_panel', array(
'link_class' => 'elgg-button elgg-button-action',
));
-elgg_register_menu_item('admin_control_panel', array(
- 'name' => 'upgrade',
- 'text' => elgg_echo('upgrade'),
- 'href' => 'upgrade.php',
- 'link_class' => 'elgg-button elgg-button-action',
-));
+// @todo Move in this in ElggUpgradeManager::isLocked() when #4682 fixed
+$is_locked = _elgg_upgrade_is_locked();
+
+if (!$is_locked) {
+ elgg_register_menu_item('admin_control_panel', array(
+ 'name' => 'upgrade',
+ 'text' => elgg_echo('upgrade'),
+ 'href' => 'upgrade.php',
+ 'link_class' => 'elgg-button elgg-button-action',
+ ));
+} else {
+ elgg_register_menu_item('admin_control_panel', array(
+ 'name' => 'unlock_upgrade',
+ 'text' => elgg_echo('upgrade:unlock'),
+ 'href' => 'action/admin/site/unlock_upgrade',
+ 'is_action' => true,
+ 'link_class' => 'elgg-button elgg-button-action',
+ 'confirm' => elgg_echo('upgrade:unlock:confirm'),
+ ));
+}
echo elgg_view_menu('admin_control_panel', array(
'class' => 'elgg-menu-hz',