diff options
Diffstat (limited to 'views/default/core')
23 files changed, 229 insertions, 445 deletions
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php index 40b5f5637..f39113653 100644 --- a/views/default/core/account/login_box.php +++ b/views/default/core/account/login_box.php @@ -4,8 +4,12 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['module'] The module name. Default: aside */ +$module = elgg_extract('module', $vars, 'aside'); + $login_url = elgg_get_site_url(); if (elgg_get_config('https_login')) { $login_url = str_replace("http:", "https:", $login_url); @@ -14,13 +18,4 @@ if (elgg_get_config('https_login')) { $title = elgg_echo('login'); $body = elgg_view_form('login', array('action' => "{$login_url}action/login")); -echo elgg_view_module('aside', $title, $body); - -?> - - -<script type="text/javascript"> - elgg.register_event_handler('init', 'system', function() { - $('input[name=username]').focus(); - }); -</script> +echo elgg_view_module($module, $title, $body); diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php index 3c62a5448..e90cbf106 100644 --- a/views/default/core/account/login_dropdown.php +++ b/views/default/core/account/login_dropdown.php @@ -1,8 +1,6 @@ <?php /** * Elgg drop-down login form - * - * @todo Forms 1.8: Convert to use elgg_view_form() */ if (elgg_is_logged_in()) { @@ -11,7 +9,7 @@ if (elgg_is_logged_in()) { $login_url = elgg_get_site_url(); if (elgg_get_config('https_login')) { - $login_url = str_replace("http", "https", elgg_get_site_url()); + $login_url = str_replace("http:", "https:", elgg_get_site_url()); } $body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE)); @@ -19,12 +17,11 @@ $body = elgg_view_form('login', array('action' => "{$login_url}action/login"), a <div id="login-dropdown"> <?php echo elgg_view('output/url', array( - 'href' => 'pg/login', + 'href' => 'login#login-dropdown-box', + 'rel' => 'popup', + 'class' => 'elgg-button elgg-button-dropdown', 'text' => elgg_echo('login'), )); echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box')); ?> </div> -<script> - $('#login-dropdown > a').attr('href', '#login-dropdown-box').addClass('elgg-toggler elgg-button elgg-button-dropdown'); -</script>
\ No newline at end of file diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php deleted file mode 100644 index 93aa87782..000000000 --- a/views/default/core/account/login_walled_garden.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** -* Walled Garden Login Form -*/ - -$form_body = elgg_view('forms/login'); -$form_body .= elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true')); - -$login_url = elgg_get_site_url(); -if (elgg_get_config('https_login')) { - $login_url = str_replace("http", "https", elgg_get_site_url()); -} -?> -<h2><?php echo elgg_echo('login'); ?></h2> -<?php - //@todo Forms 1.8: Convert to use elgg_view_form() - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login")); - echo elgg_view('login/extend'); // view for plugins to extend -?> - -<?php -if (elgg_get_config('allow_registration')) { - $title = elgg_echo('register'); - $body = elgg_view("account/forms/register", array( - 'friend_guid' => (int) get_input('friend_guid', 0), - 'invitecode' => get_input('invitecode'), - )); - - echo <<<__HTML -<div id="registration_form" class="hidden clearfix"> -<div id="hiddenform_body" class="clearfix"> - <h2>$title</h2> - $body -</div><div id="hiddenform_bottom"></div></div> -__HTML; -} -?> - <?php - $lostpassword_form_body = "<div>" . elgg_echo('user:password:text') . "</div>"; - $lostpassword_form_body .= "<div class='margin-none'><label>". elgg_echo('username') . " " - . elgg_view('input/text', array('name' => 'username', 'class' => 'login-textarea lostusername')) . "</label></div>"; - $lostpassword_form_body .= elgg_view('input/captcha'); - $lostpassword_form_body .= "<div>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "<input class='elgg-button-action elgg-state-disabled cancel_request' type='reset' value='Cancel'></div>"; - - ?> -<div id="lostpassword_form" class="hidden clearfix"> - <div id="hiddenform_body" class="clearfix"> - <h2><?php echo elgg_echo('user:password:lost'); ?></h2> - <?php - //@todo Forms 1.8: Use elgg_view_form() - echo elgg_view('input/form', array( - 'action' => "action/user/requestnewpassword", - 'body' => $lostpassword_form_body - )); - ?> -</div><div id="hiddenform_bottom"></div></div> -<?php //@todo JS 1.8: no ?> -<script type="text/javascript"> -$(document).ready(function() { - $('input.username').focus(); - - // add cancel button to inline register form - $('#registration_form').find('input.elgg-button-submit').after("<input class='elgg-button-action elgg-state-disabled cancel_request' type='reset' value='Cancel'>"); - - function elgg_slide_hiddenform(activateLink, parentElement, toggleElement) { - $(activateLink).closest(parentElement).find(toggleElement).animate({"width": "563px", duration: 400}); - $(activateLink).closest(parentElement).animate({"height": "256px", duration: 400}, function() { - // ewwww dirty. Webkit has problems when showing images that were hidden. - // forcing a reload of all the images. - $('.visual_captcha img').each(function() { $(this).attr('src', $(this).attr('src')); }); - }); - return false; - } - - $('a.registration_link').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '.walledgardenlogin', '#registration_form'); - $('input.name').focus(); - }); - - $('a.forgotten_password_link').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '.walledgardenlogin', '#lostpassword_form'); - $('input.lostusername').focus(); - }); - - $('input.cancel_request').click(function() { - if ($('#lostpassword_form').is(':visible')) { - $('#lostpassword_form').fadeOut(400); - location.reload(); - } else if ($('#registration_form').is(':visible')) { - $('#registration_form').fadeOut(400); - location.reload(); - } - return false; - }); -}); -</script> diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php index 6887eab5c..6f9124192 100644 --- a/views/default/core/avatar/upload.php +++ b/views/default/core/avatar/upload.php @@ -5,10 +5,24 @@ * @uses $vars['entity'] */ -$user_avatar = $vars['entity']->getIcon('medium'); +$user_avatar = elgg_view('output/img', array( + 'src' => $vars['entity']->getIconUrl('medium'), + 'alt' => elgg_echo('avatar'), +)); $current_label = elgg_echo('avatar:current'); +$remove_button = ''; +if ($vars['entity']->icontime) { + $remove_button = elgg_view('output/url', array( + 'text' => elgg_echo('remove'), + 'title' => elgg_echo('avatar:remove'), + 'href' => 'action/avatar/remove?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); @@ -23,8 +37,9 @@ $upload_form = elgg_view_form('avatar/upload', $form_params, $vars); $image = <<<HTML <div id="current-user-avatar" class="mrl prl"> <label>$current_label</label><br /> - <img src="$user_avatar" alt="avatar" /> + $user_avatar </div> +$remove_button HTML; $body = <<<HTML diff --git a/views/default/core/dashboard/blurb.php b/views/default/core/dashboard/blurb.php deleted file mode 100644 index 0c4e3947a..000000000 --- a/views/default/core/dashboard/blurb.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Elgg dashboard blurb - * - */ -?> - -<div class="elgg-col elgg-col-2of3"> -<?php - echo elgg_view('output/longtext', array( - 'id' => 'dashboard-info', - 'class' => 'elgg-inner pas mhs mbl', - 'value' => elgg_echo("dashboard:nowidgets"), - )); - -?> -</div>
\ No newline at end of file diff --git a/views/default/core/friends/collection.php b/views/default/core/friends/collection.php index dac98bc5d..1a330af01 100644 --- a/views/default/core/friends/collection.php +++ b/views/default/core/friends/collection.php @@ -25,7 +25,7 @@ if ($coll->owner_guid == elgg_get_logged_in_user_guid()) { 'href' => 'action/friends/collections/delete?collection=' . $coll->id, 'class' => 'delete_collection', 'text' => elgg_view_icon('delete'), - 'text_encode' => false, + 'encode_text' => false, )); echo "</div>"; } @@ -43,7 +43,7 @@ if ($friends) { echo elgg_view('input/friendspicker', array( 'entities' => $friends, - 'value' => $members, + 'value' => $vars['collection']->members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker'], diff --git a/views/default/core/likes/display.php b/views/default/core/likes/display.php deleted file mode 100644 index 014796928..000000000 --- a/views/default/core/likes/display.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -/** - * Elgg likes display - * - * @package Elgg - * - * @uses $vars['entity'] - */ - -if (!isset($vars['entity'])) { - return true; -} - -$guid = $vars['entity']->getGUID(); - -// check to see if the user has already liked this -if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) { - if (!elgg_annotation_exists($guid, 'likes')) { - $url = elgg_get_site_url() . "action/likes/add?guid={$guid}"; - $params = array( - 'href' => $url, - 'text' => elgg_view_icon('likes'), - 'title' => elgg_echo('likes:likethis'), - 'is_action' => true, - ); - $likes_button = elgg_view('output/url', $params); - } else { - $options = array( - 'guid' => $guid, - 'annotation_name' => 'likes', - 'owner_guid' => elgg_get_logged_in_user_guid() - ); - $likes = elgg_get_annotations($options); - $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; - $params = array( - 'href' => $url, - 'text' => elgg_view_icon('liked'), - 'title' => elgg_echo('likes:remove'), - 'is_action' => true, - ); - $likes_button = elgg_view('output/url', $params); - } -} - -$list = ''; -$num_of_likes = $vars['entity']->countLikes(); -if ($num_of_likes) { - // display the number of likes - if ($num_of_likes == 1) { - $likes_string = elgg_echo('likes:userlikedthis'); - } else { - $likes_string = elgg_echo('likes:userslikedthis'); - } - $params = array( - 'text' => "$num_of_likes $likes_string", - 'title' => elgg_echo('likes:see'), - 'class' => 'elgg-like-toggle', - ); - $list = elgg_view('output/url', $params); - $list .= "<div class='elgg-module elgg-module-popup elgg-likes-list hidden clearfix'>"; - $list .= elgg_list_annotations(array('guid' => $guid, 'annotation_name' => 'likes', 'limit' => 99)); - $list .= "</div>"; -} - -echo elgg_view_image_block($likes_button, $list);
\ No newline at end of file diff --git a/views/default/core/members/nav.php b/views/default/core/members/nav.php deleted file mode 100644 index a713fa8a3..000000000 --- a/views/default/core/members/nav.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * Members navigation - */ - -$tabs = array( - 'newest' => array( - 'title' => elgg_echo('members:label:newest'), - 'url' => "pg/members/newest/", - 'selected' => $vars['selected'] == 'newest', - ), - 'popular' => array( - 'title' => elgg_echo('members:label:popular'), - 'url' => "pg/members/popular/", - 'selected' => $vars['selected'] == 'popular', - ), - 'online' => array( - 'title' => elgg_echo('members:label:online'), - 'url' => "pg/members/online/", - 'selected' => $vars['selected'] == 'online', - ), -); - -echo elgg_view('navigation/tabs', array('tabs' => $tabs)); diff --git a/views/default/core/members/sidebar.php b/views/default/core/members/sidebar.php deleted file mode 100644 index 3a00bf700..000000000 --- a/views/default/core/members/sidebar.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Members sidebar - */ - -// Tag search -$params = array( - 'method' => 'get', - 'action' => elgg_get_site_url() . 'pg/members/search/tag/', - 'disable_security' => true, -); - -$body = elgg_view_form('members/tag_search', $params); - -echo elgg_view_module('aside', elgg_echo('members:searchtag'), $body); - -// name search -$params = array( - 'method' => 'get', - 'action' => elgg_get_site_url() . 'pg/members/search/name/', - 'disable_security' => true, -); -$body = elgg_view_form('members/name_search', $params); - -echo elgg_view_module('aside', elgg_echo('members:searchname'), $body);
\ No newline at end of file diff --git a/views/default/core/river/filter.php b/views/default/core/river/filter.php index 0df10675c..9b7fadaa8 100644 --- a/views/default/core/river/filter.php +++ b/views/default/core/river/filter.php @@ -34,17 +34,5 @@ if ($selector) { $params['value'] = $selector; } echo elgg_view('input/dropdown', $params); -?> -<?php //@todo JS 1.8: no ?> -<script type="text/javascript"> -elgg.register_event_handler('init', 'system', function() { - $('#elgg-river-selector').change(function() { - var url = window.location.href; - if (window.location.search.length) { - url = url.substring(0, url.indexOf('?')); - } - url += '?' + $(this).val(); - elgg.forward(url); - }); -}); -</script> + +elgg_load_js('elgg.ui.river'); diff --git a/views/default/core/settings/account.php b/views/default/core/settings/account.php index 22a58c58a..0c3792ece 100644 --- a/views/default/core/settings/account.php +++ b/views/default/core/settings/account.php @@ -6,4 +6,4 @@ * @subpackage Core */ -echo elgg_view_form('usersettings/save');
\ No newline at end of file +echo elgg_view_form('usersettings/save', array('class' => 'elgg-form-alt'));
\ No newline at end of file diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php index e33211460..690f2714a 100644 --- a/views/default/core/settings/account/default_access.php +++ b/views/default/core/settings/account/default_access.php @@ -12,22 +12,14 @@ if (elgg_get_config('allow_user_default_access')) { if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) { $default_access = elgg_get_config('default_access'); } -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('default_access:settings'); ?></h3> - </div> - <div class="elgg-body"> - <p> - <?php echo elgg_echo('default_access:label'); ?>: - <?php - echo elgg_view('input/access', array('name' => 'default_access', 'value' => $default_access)); + $title = elgg_echo('default_access:settings'); + $content = elgg_echo('default_access:label') . ': '; + $content .= elgg_view('input/access', array( + 'name' => 'default_access', + 'value' => $default_access, + )); - ?> - </p> - </div> -</div> -<?php + echo elgg_view_module('info', $title, $content); } -}
\ No newline at end of file +} diff --git a/views/default/core/settings/account/email.php b/views/default/core/settings/account/email.php index fda83e795..4bcdbb100 100644 --- a/views/default/core/settings/account/email.php +++ b/views/default/core/settings/account/email.php @@ -9,19 +9,11 @@ $user = elgg_get_page_owner_entity(); if ($user) { -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('email:settings'); ?></h3> - </div> - <div class="elgg-body"> - <p> - <?php echo elgg_echo('email:address:label'); ?>: - <?php - echo elgg_view('input/email',array('name' => 'email', 'value' => $user->email)); - ?> - </p> - </div> -</div> -<?php -}
\ No newline at end of file + $title = elgg_echo('email:settings'); + $content = elgg_echo('email:address:label') . ': '; + $content .= elgg_view('input/email', array( + 'name' => 'email', + 'value' => $user->email, + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php index 3a992966f..b36057422 100644 --- a/views/default/core/settings/account/language.php +++ b/views/default/core/settings/account/language.php @@ -9,23 +9,12 @@ $user = elgg_get_page_owner_entity(); if ($user) { -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('user:set:language'); ?></h3> - </div> - <div class="elgg-body"> - <p> - <?php echo elgg_echo('user:language:label'); ?>: - <?php - echo elgg_view("input/dropdown", array( - 'name' => 'language', - 'value' => $user->language, - 'options_values' => get_installed_translations() - )); - ?> - </p> - </div> -</div> -<?php -}
\ No newline at end of file + $title = elgg_echo('user:set:language'); + $content = elgg_echo('user:language:label') . ': '; + $content .= elgg_view("input/dropdown", array( + 'name' => 'language', + 'value' => $user->language, + 'options_values' => get_installed_translations() + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php index 69ffcecaf..e356146a3 100644 --- a/views/default/core/settings/account/name.php +++ b/views/default/core/settings/account/name.php @@ -4,12 +4,18 @@ * * @package Elgg * @subpackage Core - - */ $user = elgg_get_page_owner_entity(); +if ($user) { + $title = elgg_echo('user:name:label'); + $content = elgg_echo('name') . ': '; + $content .= elgg_view('input/text', array( + 'name' => 'name', + 'value' => $user->name, + )); + echo elgg_view_module('info', $title, $content); -// all hidden, but necessary for properly updating user details -echo elgg_view('input/hidden', array('name' => 'name', 'value' => $user->name)); -echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid)); + // need the user's guid to make sure the correct user gets updated + echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid)); +} diff --git a/views/default/core/settings/account/notifications.php b/views/default/core/settings/account/notifications.php index ae5fe40bb..c212b3886 100644 --- a/views/default/core/settings/account/notifications.php +++ b/views/default/core/settings/account/notifications.php @@ -9,33 +9,20 @@ global $NOTIFICATION_HANDLERS; $notification_settings = get_user_notification_settings(elgg_get_page_owner_guid()); -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('notifications:usersettings'); ?></h3> - </div> - <div class="elgg-body"> +$title = elgg_echo('notifications:usersettings'); -<p><?php echo elgg_echo('notifications:methods'); ?> +$rows = ''; -<table> -<?php - // Loop through options - foreach ($NOTIFICATION_HANDLERS as $k => $v) { -?> - <tr> - <td><?php echo elgg_echo($k); ?>: </td> - - <td> -<?php +// Loop through options +foreach ($NOTIFICATION_HANDLERS as $k => $v) { if ($notification_settings->$k) { $val = "yes"; } else { $val = "no"; } - - echo elgg_view('input/radio', array( + + $radio = elgg_view('input/radio', array( 'name' => "method[$k]", 'value' => $val, 'options' => array( @@ -44,12 +31,14 @@ $notification_settings = get_user_notification_settings(elgg_get_page_owner_guid ), )); -?> - </td> - </tr> -<?php - } -?> -</table> - </div> -</div>
\ No newline at end of file + $cells = '<td class="prm pbl">' . elgg_echo("notification:method:$k") . ': </td>'; + $cells .= "<td>$radio</td>"; + + $rows .= "<tr>$cells</tr>"; +} + + +$content = elgg_echo('notifications:methods'); +$content .= "<table>$rows</table>"; + +echo elgg_view_module('info', $title, $content); diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php index a80f3df6b..4857034b2 100644 --- a/views/default/core/settings/account/password.php +++ b/views/default/core/settings/account/password.php @@ -1,45 +1,33 @@ <?php + /** * Provide a way of setting your password * * @package Elgg * @subpackage Core */ - $user = elgg_get_page_owner_entity(); if ($user) { -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('user:set:password'); ?></h3> - </div> - <div class="elgg-body"> - <?php - // only make the admin user enter current password for changing his own password. - if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { - ?> - <p> - <?php echo elgg_echo('user:current_password:label'); ?>: - <?php - echo elgg_view('input/password', array('name' => 'current_password')); - ?> - </p> - <?php } ?> + $title = elgg_echo('user:set:password'); - <p> - <?php echo elgg_echo('user:password:label'); ?>: - <?php - echo elgg_view('input/password', array('name' => 'password')); - ?> - </p> + // only make the admin user enter current password for changing his own password. + $admin = ''; + if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { + $admin .= elgg_echo('user:current_password:label') . ': '; + $admin .= elgg_view('input/password', array('name' => 'current_password')); + $admin = "<p>$admin</p>"; + } - <p> - <?php echo elgg_echo('user:password2:label'); ?>: <?php - echo elgg_view('input/password', array('name' => 'password2')); - ?> - </p> - </div> -</div> -<?php -}
\ No newline at end of file + $password = elgg_echo('user:password:label') . ': '; + $password .= elgg_view('input/password', array('name' => 'password')); + $password = "<p>$password</p>"; + + $password2 = elgg_echo('user:password2:label') . ': '; + $password2 .= elgg_view('input/password', array('name' => 'password2')); + $password2 = "<p>$password2</p>"; + + $content = $admin . $password . $password2; + + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/statistics/numentities.php b/views/default/core/settings/statistics/numentities.php index 245fd67be..3782fd8bc 100644 --- a/views/default/core/settings/statistics/numentities.php +++ b/views/default/core/settings/statistics/numentities.php @@ -7,45 +7,38 @@ */ // 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) { -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('usersettings:statistics:label:numentities'); ?></h3> - </div> - <div class="elgg-body"> - <table class="elgg-table-alt"> - <?php - foreach ($entity_stats as $k => $entry) { - foreach ($entry as $a => $b) { + $rows = ''; + foreach ($entity_stats as $k => $entry) { + foreach ($entry as $a => $b) { - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + // This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - if ($a == "__base__") { - $a = elgg_echo("item:{$k}"); - if (empty($a)) { - $a = $k; - } - } else { - $a = elgg_echo("item:{$k}:{$a}"); - if (empty($a)) { - $a = "$k $a"; - } - } - echo <<< END - <tr class="{$even_odd}"> - <td class="column-one"><b>{$a}:</b></td> - <td>{$b}</td> - </tr> -END; + if ($a == "__base__") { + $a = elgg_echo("item:{$k}"); + if (empty($a)) { + $a = $k; + } + } else { + $a = elgg_echo("item:{$k}:{$a}"); + if (empty($a)) { + $a = "$k $a"; } } - ?> - </table> - </div> -</div> -<?php -}
\ No newline at end of file + $rows .= <<< END + <tr class="{$even_odd}"> + <td class="column-one"><b>{$a}:</b></td> + <td>{$b}</td> + </tr> +END; + } + } + + $title = elgg_echo('usersettings:statistics:label:numentities'); + $content = "<table class=\"elgg-table-alt\">$rows</table>"; + + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php index 65db42cb1..1385ff60f 100644 --- a/views/default/core/settings/statistics/online.php +++ b/views/default/core/settings/statistics/online.php @@ -1,31 +1,42 @@ <?php /** - * Elgg statistics screen showing online users. + * Statistics about this user. * * @package Elgg * @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); +$label_name = elgg_echo('usersettings:statistics:label:name'); +$label_email = elgg_echo('usersettings:statistics:label:email'); +$label_member_since = elgg_echo('usersettings:statistics:label:membersince'); +$label_last_login = elgg_echo('usersettings:statistics:label:lastlogin'); -if ($log) { - $logged_in = $log[0]->time_created; -} +$time_created = date("r", $user->time_created); +$last_login = date("r", $user->last_login); -?> -<div class="elgg-module elgg-module-info"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('usersettings:statistics:yourdetails'); ?></h3> - </div> - <div class="elgg-body"> - <table class="elgg-table-alt"> - <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:name'); ?></td><td><?php echo $user->name; ?></td></tr> - <tr class="even"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:email'); ?></td><td><?php echo $user->email; ?></td></tr> - <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:membersince'); ?></td><td><?php echo date("r",$user->time_created); ?></td></tr> - <tr class="even"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:lastlogin'); ?></td><td><?php echo date("r",$logged_in); ?></td></tr> - </table> - </div> -</div>
\ No newline at end of file +$title = elgg_echo('usersettings:statistics:yourdetails'); + +$content = <<<__HTML +<table class="elgg-table-alt"> + <tr class="odd"> + <td class="column-one">$label_name</td> + <td>$user->name</td> + </tr> + <tr class="even"> + <td class="column-one">$label_email</td> + <td>$user->email</td> + </tr> + <tr class="odd"> + <td class="column-one">$label_member_since</td> + <td>$time_created</td> + </tr> + <tr class="even"> + <td class="column-one">$label_last_login</td> + <td>$last_login</td> + </tr> +</table> +__HTML; + +echo elgg_view_module('info', $title, $content); diff --git a/views/default/core/settings/tools.php b/views/default/core/settings/tools.php index ff02c9183..195db1d61 100644 --- a/views/default/core/settings/tools.php +++ b/views/default/core/settings/tools.php @@ -11,12 +11,9 @@ // Description of what's going on echo elgg_view('output/longtext', array( 'value' => elgg_echo("usersettings:plugins:description"), - 'class' => 'user-settings mtm', + 'class' => 'user-settings mtn mbm', )); -$limit = get_input('limit', 10); -$offset = get_input('offset', 0); - // Get the installed plugins $installed_plugins = $vars['installed_plugins']; $count = count($installed_plugins); @@ -29,7 +26,7 @@ foreach ($installed_plugins as $plugin) { if (elgg_view_exists("usersettings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/usersettings")) { - $title = $plugin->manifest->getName(); + $title = $plugin->getManifest()->getName(); $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin)); echo elgg_view_module('info', $title, $body); } diff --git a/views/default/core/walled_garden/login.php b/views/default/core/walled_garden/login.php new file mode 100644 index 000000000..42b79607d --- /dev/null +++ b/views/default/core/walled_garden/login.php @@ -0,0 +1,31 @@ +<?php +/** + * Walled garden login + */ + +$title = elgg_get_site_entity()->name; +$welcome = elgg_echo('walled_garden:welcome'); +$welcome .= ': <br/>' . $title; + +$menu = elgg_view_menu('walled_garden', array( + 'sort_by' => 'priority', + 'class' => 'elgg-menu-general elgg-menu-hz', +)); + +$login_box = elgg_view('core/account/login_box', array('module' => 'walledgarden-login')); + +echo <<<HTML +<div class="elgg-col elgg-col-1of2"> + <div class="elgg-inner"> + <h1 class="elgg-heading-walledgarden"> + $welcome + </h1> + $menu + </div> +</div> +<div class="elgg-col elgg-col-1of2"> + <div class="elgg-inner"> + $login_box + </div> +</div> +HTML; diff --git a/views/default/core/walled_garden/lost_password.php b/views/default/core/walled_garden/lost_password.php new file mode 100644 index 000000000..82f8caf50 --- /dev/null +++ b/views/default/core/walled_garden/lost_password.php @@ -0,0 +1,13 @@ +<?php +/** + * Walled garden lost password + */ + +$title = elgg_echo('user:password:lost'); +$body = elgg_view_form('user/requestnewpassword'); +echo <<<HTML +<div class="elgg-inner"> + <h3>$title</h3> + $body +</div> +HTML; diff --git a/views/default/core/walled_garden/register.php b/views/default/core/walled_garden/register.php new file mode 100644 index 000000000..1ce2f8716 --- /dev/null +++ b/views/default/core/walled_garden/register.php @@ -0,0 +1,17 @@ +<?php +/** + * Walled garden registration + */ + +$title = elgg_echo('register'); +$body = elgg_view_form('register', array(), array( + 'friend_guid' => (int) get_input('friend_guid', 0), + 'invitecode' => get_input('invitecode'), +)); + +echo <<<__HTML +<div class="elgg-inner"> + <h2>$title</h2> + $body +</div> +__HTML; |
