aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/admin/statistics/overview.php4
-rw-r--r--views/default/admin/statistics/overview/basic.php (renamed from views/default/admin/statistics/basic.php)0
-rw-r--r--views/default/admin/statistics/overview/numentities.php (renamed from views/default/admin/statistics/numentities.php)0
-rw-r--r--views/default/admin/statistics/server.php8
-rw-r--r--views/default/admin/statistics/server/php.php33
-rw-r--r--views/default/admin/statistics/server/web_server.php16
-rw-r--r--views/default/core/avatar/upload.php12
-rw-r--r--views/default/css/admin.php46
-rw-r--r--views/default/css/elements/modules.php2
-rw-r--r--views/default/navigation/tabs.php95
-rw-r--r--views/default/object/widget.php3
-rw-r--r--views/default/output/access.php5
-rw-r--r--views/failsafe/messages/exceptions/admin_exception.php30
-rw-r--r--views/failsafe/messages/exceptions/exception.php26
14 files changed, 194 insertions, 86 deletions
diff --git a/views/default/admin/statistics/overview.php b/views/default/admin/statistics/overview.php
index 2f5b25121..ac5aaac36 100644
--- a/views/default/admin/statistics/overview.php
+++ b/views/default/admin/statistics/overview.php
@@ -8,6 +8,6 @@
echo elgg_view('admin/statistics/extend');
-echo elgg_view_module('inline', elgg_echo('admin:statistics:label:basic'), elgg_view('admin/statistics/basic'));
+echo elgg_view_module('inline', elgg_echo('admin:statistics:label:basic'), elgg_view('admin/statistics/overview/basic'));
-echo elgg_view_module('inline', elgg_echo('admin:statistics:label:numentities'), elgg_view('admin/statistics/numentities')); \ No newline at end of file
+echo elgg_view_module('inline', elgg_echo('admin:statistics:label:numentities'), elgg_view('admin/statistics/overview/numentities'));
diff --git a/views/default/admin/statistics/basic.php b/views/default/admin/statistics/overview/basic.php
index 2c9b3b88e..2c9b3b88e 100644
--- a/views/default/admin/statistics/basic.php
+++ b/views/default/admin/statistics/overview/basic.php
diff --git a/views/default/admin/statistics/numentities.php b/views/default/admin/statistics/overview/numentities.php
index af4ae2773..af4ae2773 100644
--- a/views/default/admin/statistics/numentities.php
+++ b/views/default/admin/statistics/overview/numentities.php
diff --git a/views/default/admin/statistics/server.php b/views/default/admin/statistics/server.php
new file mode 100644
index 000000000..9d21addc1
--- /dev/null
+++ b/views/default/admin/statistics/server.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Server information
+ */
+
+echo elgg_view_module('inline', elgg_echo('admin:server:label:web_server'), elgg_view('admin/statistics/server/web_server'));
+
+echo elgg_view_module('inline', elgg_echo('admin:server:label:php'), elgg_view('admin/statistics/server/php'));
diff --git a/views/default/admin/statistics/server/php.php b/views/default/admin/statistics/server/php.php
new file mode 100644
index 000000000..4a59b95fb
--- /dev/null
+++ b/views/default/admin/statistics/server/php.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Server PHP info
+ */
+
+$php_log = ini_get('error_log');
+if (!$php_log) {
+ $php_log = elgg_echo('admin:server:error_log');
+}
+
+?>
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:php_version'); ?> :</b></td>
+ <td><?php echo phpversion(); ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:php_ini'); ?> :</b></td>
+ <td><?php echo php_ini_loaded_file(); ?></td>
+ </tr>
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:php_log'); ?> :</b></td>
+ <td><?php echo $php_log; ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:mem_avail'); ?> :</b></td>
+ <td><?php echo number_format(elgg_get_ini_setting_in_bytes('memory_limit')); ?></td>
+ </tr>
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:mem_used'); ?> :</b></td>
+ <td><?php echo number_format(memory_get_peak_usage()); ?></td>
+ </tr>
+</table>
diff --git a/views/default/admin/statistics/server/web_server.php b/views/default/admin/statistics/server/web_server.php
new file mode 100644
index 000000000..904a54f4b
--- /dev/null
+++ b/views/default/admin/statistics/server/web_server.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Web server info
+ */
+
+?>
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td><b><?php echo elgg_echo('admin:server:label:server'); ?> :</b></td>
+ <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
+ </tr>
+ <tr class="even">
+ <td><b><?php echo elgg_echo('admin:server:label:log_location'); ?> :</b></td>
+ <td><?php echo getenv('APACHE_LOG_DIR'); ?></td>
+ </tr>
+</table>
diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php
index 4aa86373a..29aa59c9c 100644
--- a/views/default/core/avatar/upload.php
+++ b/views/default/core/avatar/upload.php
@@ -12,6 +12,17 @@ $user_avatar = elgg_view('output/img', array(
$current_label = elgg_echo('avatar:current');
+$revert_button = '';
+if ($vars['entity']->icontime) {
+ $revert_button = elgg_view('output/url', array(
+ 'text' => elgg_echo('revert'),
+ 'title' => elgg_echo('avatar:revert'),
+ 'href' => 'action/avatar/revert?guid=' . elgg_get_page_owner_guid(),
+ 'is_action' => true,
+ 'class' => 'elgg-button elgg-button-cancel mll',
+ ));
+}
+
$form_params = array('enctype' => 'multipart/form-data');
$upload_form = elgg_view_form('avatar/upload', $form_params, $vars);
@@ -28,6 +39,7 @@ $image = <<<HTML
<label>$current_label</label><br />
$user_avatar
</div>
+$revert_button
HTML;
$body = <<<HTML
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index dc1b503cb..6deceb14e 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -106,7 +106,12 @@ a:hover {
text-decoration: underline;
}
pre, code {
- background: #EBF5FF;
+ background-color: #EEE;
+ border: 1px solid #DDD;
+ color: #444;
+ overflow: auto;
+ margin: 15px 0;
+ padding: 5px;
}
blockquote {
background: #EBF5FF;
@@ -817,6 +822,27 @@ a.elgg-button {
}
/* ***************************************
+ WIDGET MENU
+*************************************** */
+.elgg-menu-widget > li {
+ position: absolute;
+ top: 4px;
+ display: inline-block;
+ width: 18px;
+ height: 18px;
+ padding: 2px 2px 0 0;
+}
+.elgg-menu-widget > .elgg-menu-item-collapse {
+ left: 5px;
+}
+.elgg-menu-widget > .elgg-menu-item-delete {
+ right: 5px;
+}
+.elgg-menu-widget > .elgg-menu-item-settings {
+ right: 25px;
+}
+
+/* ***************************************
MORE MENUS
*************************************** */
/* Horizontal menus w/ separator support */
@@ -915,22 +941,16 @@ a.elgg-button {
height: 26px;
overflow: hidden;
}
+.elgg-module-widget.elgg-state-draggable .elgg-widget-handle {
+ cursor: move;
+}
.elgg-module-widget > .elgg-head h3 {
float: left;
padding: 4px 45px 0 20px;
color: #333;
}
-.elgg-module-widget > .elgg-head a {
- position: absolute;
- top: 4px;
- display: inline-block;
- width: 18px;
- height: 18px;
- padding: 2px 2px 0 0;
-}
.elgg-widget-collapse-button {
- left: 5px;
color: #c5c5c5;
text-decoration: none;
}
@@ -945,12 +965,6 @@ a.elgg-widget-collapse-button:before {
a.elgg-widget-collapsed:before {
content: "\25BA";
}
-.elgg-widget-delete-button {
- right: 5px;
-}
-.elgg-widget-edit-button {
- right: 25px;
-}
.elgg-module-widget > .elgg-body {
border-top: 1px solid #dedede;
background-color: white;
diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php
index 7750c208f..74092c774 100644
--- a/views/default/css/elements/modules.php
+++ b/views/default/css/elements/modules.php
@@ -155,7 +155,7 @@
padding: 4px 45px 0 20px;
color: #666;
}
-.elgg-module-widget.elgg-state-draggable > .elgg-head {
+.elgg-module-widget.elgg-state-draggable .elgg-widget-handle {
cursor: move;
}
a.elgg-widget-collapse-button {
diff --git a/views/default/navigation/tabs.php b/views/default/navigation/tabs.php
index e8fde3579..95e3f2669 100644
--- a/views/default/navigation/tabs.php
+++ b/views/default/navigation/tabs.php
@@ -5,68 +5,77 @@
* @uses string $vars['type'] horizontal || vertical - Defaults to horizontal
* @uses string $vars['class'] Additional class to add to ul
* @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array(
- * 'title' => string, // Title of link
- * 'url' => string, // URL for the link
+ * 'text' => string, // The string between the <a></a> tags
+ * 'href' => string, // URL for the link
* 'class' => string // Class of the li element
* 'id' => string, // ID of the li element
- * 'selected' => bool // if this li element is currently selected
- * 'url_class' => string, // Class to pass to the link
- * 'url_id' => string, // ID to pass to the link
+ * 'selected' => bool // if this tab is currently selected (applied to li element)
+ * 'link_class' => string, // Class to pass to the link
+ * 'link_id' => string, // ID to pass to the link
* )
*/
+$options = elgg_clean_vars($vars);
$type = elgg_extract('type', $vars, 'horizontal');
+
if ($type == 'horizontal') {
- $type_class = "elgg-tabs elgg-htabs";
+ $options['class'] = "elgg-tabs elgg-htabs";
} else {
- $type_class = "elgg-tabs elgg-vtabs";
+ $options['class'] = "elgg-tabs elgg-vtabs";
}
-
if (isset($vars['class'])) {
- $type_class = "$type_class {$vars['class']}";
+ $options['class'] = "{$options['class']} {$vars['class']}";
}
+unset($options['tabs']);
+unset($options['type']);
+
+$attributes = elgg_format_attributes($options);
+
if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) {
-?>
- <ul class="<?php echo $type_class; ?>">
- <?php
- foreach ($vars['tabs'] as $info) {
- $class = elgg_extract('class', $info, '');
- $id = elgg_extract('id', $info, '');
-
- $selected = elgg_extract('selected', $info, FALSE);
- if ($selected) {
- $class .= ' elgg-state-selected';
- }
+ ?>
+ <ul <?php echo $attributes; ?>>
+ <?php
+ foreach ($vars['tabs'] as $info) {
+ $class = elgg_extract('class', $info, '');
+ $id = elgg_extract('id', $info, '');
- $class_str = ($class) ? "class=\"$class\"" : '';
- $id_str = ($id) ? "id=\"$id\"" : '';
- $title = htmlspecialchars($info['title'], ENT_QUOTES, 'UTF-8');
- $url = htmlspecialchars($info['url'], ENT_QUOTES, 'UTF-8');
+ $selected = elgg_extract('selected', $info, FALSE);
+ if ($selected) {
+ $class .= ' elgg-state-selected';
+ }
- $options = array(
- 'href' => $url,
- 'title' => $title,
- 'text' => $title,
- );
+ $class_str = ($class) ? "class=\"$class\"" : '';
+ $id_str = ($id) ? "id=\"$id\"" : '';
- if (isset($info['url_class'])) {
- $options['class'] = $info['url_class'];
- }
+ $options = $info;
+ unset($options['class']);
+ unset($options['id']);
+ unset($options['selected']);
- if (isset($info['url_id'])) {
- $options['id'] = $info['url_id'];
- }
+ if (!isset($info['href']) && isset($info['url'])) {
+ $options['href'] = $info['url'];
+ unset($options['url']);
+ }
+ if (!isset($info['text']) && isset($info['title'])) {
+ $options['text'] = $options['title'];
+ unset($options['title']);
+ }
+ if (isset($info['link_class'])) {
+ $options['class'] = $options['link_class'];
+ unset($options['link_class']);
+ }
- if (!isset($info['rel']) && !isset($info['is_trusted'])) {
- $options['is_trusted'] = true;
- }
+ if (isset($info['link_id'])) {
+ $options['id'] = $options['link_id'];
+ unset($options['link_id']);
+ }
- $link = elgg_view('output/url', $options);
+ $link = elgg_view('output/url', $options);
- echo "<li $class_str $js>$link</li>";
- }
- ?>
- </ul>
+ echo "<li $id_str $class_str>$link</li>";
+ }
+ ?>
+ </ul>
<?php
}
diff --git a/views/default/object/widget.php b/views/default/object/widget.php
index f84c44e1c..0c7994f2b 100644
--- a/views/default/object/widget.php
+++ b/views/default/object/widget.php
@@ -55,8 +55,9 @@ if ($can_edit) {
}
$widget_header = <<<HEADER
- <h3>$title</h3>
+ <div class="elgg-widget-handle clearfix"><h3>$title</h3>
$controls
+ </div>
HEADER;
$widget_body = <<<BODY
diff --git a/views/default/output/access.php b/views/default/output/access.php
index 811948323..91c5c721e 100644
--- a/views/default/output/access.php
+++ b/views/default/output/access.php
@@ -11,6 +11,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) {
$access_id = $vars['entity']->access_id;
$access_class = 'elgg-access';
$access_id_string = get_readable_access_level($access_id);
+ $access_id_string = htmlentities($access_id_string, ENT_QUOTES, 'UTF-8');
// if within a group or shared access collection display group name and open/closed membership status
// @todo have a better way to do this instead of checking against subtype / class.
@@ -35,5 +36,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) {
$access_class .= ' elgg-access-private';
}
- echo "<span class=\"$access_class\">$access_id_string</span>";
+ $help_text = elgg_echo('access:help');
+
+ echo "<span title=\"$help_text\" class=\"$access_class\">$access_id_string</span>";
}
diff --git a/views/failsafe/messages/exceptions/admin_exception.php b/views/failsafe/messages/exceptions/admin_exception.php
new file mode 100644
index 000000000..57665d9c0
--- /dev/null
+++ b/views/failsafe/messages/exceptions/admin_exception.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Elgg exception (failsafe mode)
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+?>
+
+<p class="elgg-messages-exception">
+ <span title="<?php echo get_class($vars['object']); ?>">
+ <?php
+
+ echo nl2br($vars['object']->getMessage());
+
+ ?>
+ </span>
+</p>
+
+<p class="elgg-messages-exception">
+ <?php
+
+ echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'));
+
+ ?>
+</p> \ No newline at end of file
diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php
index c35d80c87..1873ca0d9 100644
--- a/views/failsafe/messages/exceptions/exception.php
+++ b/views/failsafe/messages/exceptions/exception.php
@@ -12,27 +12,9 @@
?>
<p class="elgg-messages-exception">
- <span title="<?php echo get_class($vars['object']); ?>">
- <?php
-
- echo nl2br($vars['object']->getMessage());
-
- ?>
+ <span title="Unrecoverable Error">
+ <?php echo elgg_echo('exception:contact_admin'); ?>
+ <br /><br />
+ Exception #<?php echo $vars['ts']; ?>.
</span>
</p>
-
-<?php
-
-if (elgg_get_config('debug')) {
-?>
-
-<p class="elgg-messages-exception">
- <?php
-
- echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'));
-
- ?>
-</p>
-<?php
-
-}