diff options
Diffstat (limited to 'views/default')
62 files changed, 558 insertions, 464 deletions
diff --git a/views/default/admin/appearance/menu_items.php b/views/default/admin/appearance/menu_items.php index 4e35e032f..1d5c95cf9 100644 --- a/views/default/admin/appearance/menu_items.php +++ b/views/default/admin/appearance/menu_items.php @@ -7,4 +7,4 @@ */ -echo elgg_view_form('admin/menu/save'); +echo elgg_view_form('admin/menu/save', array('class' => 'elgg-form-settings')); diff --git a/views/default/admin/appearance/profile_fields.php b/views/default/admin/appearance/profile_fields.php index 8371ce83c..91d14b874 100644 --- a/views/default/admin/appearance/profile_fields.php +++ b/views/default/admin/appearance/profile_fields.php @@ -3,7 +3,7 @@ * Admin area: edit default profile fields */ -$add = elgg_view_form('profile/fields/add', array(), array()); +$add = elgg_view_form('profile/fields/add', array('class' => 'elgg-form-settings'), array()); $list = elgg_view('admin/appearance/profile_fields/list'); $reset = elgg_view_form('profile/fields/reset', array(), array()); diff --git a/views/default/admin/plugin_settings.php b/views/default/admin/plugin_settings.php index c75492270..1c6e9e206 100644 --- a/views/default/admin/plugin_settings.php +++ b/views/default/admin/plugin_settings.php @@ -19,7 +19,7 @@ $settings = false; if (elgg_view_exists("settings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/settings")) { $title = $plugin->getManifest()->getName(); - $params = array('id' => "$plugin_id-settings"); + $params = array('id' => "$plugin_id-settings", 'class' => 'elgg-form-settings'); $body = elgg_view_form("plugins/settings/save", $params, $vars); echo elgg_view_module('info', $title, $body); diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index c3e7e3ab0..b793175e0 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -8,6 +8,9 @@ * @subpackage Admin.Plugins */ +elgg_load_js('lightbox'); +elgg_load_css('lightbox'); + elgg_generate_plugin_entities(); $installed_plugins = elgg_get_plugins('any'); $show_category = get_input('category', 'all'); diff --git a/views/default/admin/settings/advanced.php b/views/default/admin/settings/advanced.php index 12e4303e7..a262740f2 100644 --- a/views/default/admin/settings/advanced.php +++ b/views/default/admin/settings/advanced.php @@ -6,4 +6,4 @@ * @subpackage Core */ -echo elgg_view_form('admin/site/update_advanced'); +echo elgg_view_form('admin/site/update_advanced', array('class' => 'elgg-form-settings')); diff --git a/views/default/admin/settings/basic.php b/views/default/admin/settings/basic.php index 3b8f4f183..9334ba81b 100644 --- a/views/default/admin/settings/basic.php +++ b/views/default/admin/settings/basic.php @@ -6,4 +6,4 @@ * @subpackage Core */ -echo elgg_view_form('admin/site/update_basic'); +echo elgg_view_form('admin/site/update_basic', array('class' => 'elgg-form-settings')); diff --git a/views/default/annotation/default.php b/views/default/annotation/default.php index 0e626ad9a..5d29a53e2 100644 --- a/views/default/annotation/default.php +++ b/views/default/annotation/default.php @@ -19,7 +19,7 @@ $owner_link = "<a href=\"{$owner->getURL()}\">$owner->name</a>"; $menu = elgg_view_menu('annotation', array( 'annotation' => $annotation, 'sort_by' => 'priority', - 'class' => 'elgg-menu-hz right', + 'class' => 'elgg-menu-hz float-alt', )); $text = elgg_view("output/longtext", array("value" => $annotation->value)); diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 56a06f842..9891510e0 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -32,7 +32,7 @@ if ($full_view) { $menu = elgg_view_menu('annotation', array( 'annotation' => $comment, 'sort_by' => 'priority', - 'class' => 'elgg-menu-hz right', + 'class' => 'elgg-menu-hz float-alt', )); $comment_text = elgg_view("output/longtext", array("value" => $comment->value)); diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php index 8c586d425..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,4 +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); +echo elgg_view_module($module, $title, $body); 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 1606b9592..000000000 --- a/views/default/core/account/login_walled_garden.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * Walled Garden Login Form - * - * @todo still requires clean up - */ - -$reg_url = elgg_normalize_url('register'); -$forgot_url = elgg_normalize_url('forgotpassword'); -$cancel_button = elgg_view('input/button', array( - 'value' => elgg_echo('cancel'), - 'class' => 'elgg-button-cancel mlm', -)); - -$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", -)); - -if (elgg_get_config('allow_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 id="elgg-walledgarden-registration" class="hidden clearfix"> - <div class="elgg-hiddenform-body" class="clearfix"> - <h2>$title</h2> - $body - </div> - <div class="elgg-hiddenform-bottom"></div> -</div> -__HTML; -} - -$title = elgg_echo('user:password:lost'); -$body = elgg_view_form('user/requestnewpassword'); -echo <<<__HTML -<div id="elgg-walledgarden-lostpassword" class="hidden clearfix"> - <div class="elgg-hiddenform-body" class="clearfix"> - <h2>$title</h2> - $body - </div> - <div class="elgg-hiddenform-bottom"></div> -</div> -__HTML; - -//@todo JS 1.8: no -?> -<script type="text/javascript"> -$(document).ready(function() { - $('input.username').focus(); - - // add cancel button to inline forms - $('#elgg-walledgarden-registration').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - $('#elgg-walledgarden-lostpassword').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - - function elgg_slide_hiddenform(activateLink, parentElement, toggleElement) { - $(activateLink).closest(parentElement).find(toggleElement).fadeToggle('medium'); - } - - $('a[href="<?php echo $reg_url; ?>"]').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-registration'); - $('input.name').focus(); - }); - - $('a[href="<?php echo $forgot_url; ?>"]').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-lostpassword'); - $('input.lostusername').focus(); - }); - - $('input.elgg-button-cancel').click(function() { - if ($('#elgg-walledgarden-lostpassword').is(':visible')) { - $('a[href="<?php echo $forgot_url; ?>"]').click(); - } else if ($('#elgg-walledgarden-registration').is(':visible')) { - $('a[href="<?php echo $reg_url; ?>"]').click(); - } - return false; - }); -}); -</script> diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php index 11902cf4a..4aa86373a 100644 --- a/views/default/core/avatar/upload.php +++ b/views/default/core/avatar/upload.php @@ -5,7 +5,10 @@ * @uses $vars['entity'] */ -$user_avatar = $vars['entity']->getIconUrl('medium'); +$user_avatar = elgg_view('output/img', array( + 'src' => $vars['entity']->getIconUrl('medium'), + 'alt' => elgg_echo('avatar'), +)); $current_label = elgg_echo('avatar:current'); @@ -23,7 +26,7 @@ $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> HTML; diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php index 69ffcecaf..f719a84de 100644 --- a/views/default/core/settings/account/name.php +++ b/views/default/core/settings/account/name.php @@ -4,12 +4,23 @@ * * @package Elgg * @subpackage Core - - */ $user = elgg_get_page_owner_entity(); - -// all hidden, but necessary for properly updating user details -echo elgg_view('input/hidden', array('name' => 'name', 'value' => $user->name)); +?> +<div class="elgg-module elgg-module-info"> + <div class="elgg-head"> + <h3><?php echo elgg_echo('user:name:label'); ?></h3> + </div> + <div class="elgg-body"> + <p> + <?php echo elgg_echo('name'); ?>: + <?php + echo elgg_view('input/text', array('name' => 'name', 'value' => $user->name)); + ?> + </p> + </div> +</div> +<?php +// 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/walled_garden/body.php b/views/default/core/walled_garden/body.php new file mode 100644 index 000000000..67d8e0c37 --- /dev/null +++ b/views/default/core/walled_garden/body.php @@ -0,0 +1,11 @@ +<?php +/** + * Walled garden body + */ + +echo elgg_view('core/walled_garden/login'); +echo elgg_view('core/walled_garden/lost_password'); + +if (elgg_get_config('allow_registration')) { + echo elgg_view('core/walled_garden/register'); +} diff --git a/views/default/core/walled_garden/login.php b/views/default/core/walled_garden/login.php new file mode 100644 index 000000000..0a8b4a908 --- /dev/null +++ b/views/default/core/walled_garden/login.php @@ -0,0 +1,37 @@ +<?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')); + +$content = <<<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; + +echo elgg_view_module('walledgarden', '', $content, array( + 'class' => 'elgg-walledgarden-double', + 'header' => ' ', + 'footer' => ' ', +)); 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..ce75b558b --- /dev/null +++ b/views/default/core/walled_garden/lost_password.php @@ -0,0 +1,19 @@ +<?php +/** + * Walled garden lost password + */ + +$title = elgg_echo('user:password:lost'); +$body = elgg_view_form('user/requestnewpassword'); +$lost = <<<HTML +<div class="elgg-inner"> + <h3>$title</h3> + $body +</div> +HTML; + +echo elgg_view_module('walledgarden', '', $lost, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-password hidden', + 'header' => ' ', + 'footer' => ' ', +)); diff --git a/views/default/core/walled_garden/register.php b/views/default/core/walled_garden/register.php new file mode 100644 index 000000000..7f6aac99b --- /dev/null +++ b/views/default/core/walled_garden/register.php @@ -0,0 +1,23 @@ +<?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'), +)); + +$content = <<<__HTML +<div class="elgg-inner"> + <h2>$title</h2> + $body +</div> +__HTML; + +echo elgg_view_module('walledgarden', '', $content, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-register hidden', + 'header' => ' ', + 'footer' => ' ', +));
\ No newline at end of file diff --git a/views/default/css/admin.php b/views/default/css/admin.php index 73996a199..dc1b503cb 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -138,27 +138,10 @@ p { visibility: hidden; height: 0 !important; line-height: 0; + overflow: hidden; font-size: xx-large; content: " x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x "; } -.hidden { - display: none; -} -.centered { - margin: 0 auto; -} -.center { - text-align: center; -} -.float { - float: left; -} -.float-alt { - float: right; -} -.elgg-toggle { - cursor: pointer; -} /* *************************************** PAGE WRAPPER @@ -338,6 +321,9 @@ p { .elgg-module-main > .elgg-head { margin-bottom: 5px; } +.elgg-module-info > .elgg-head { + margin-bottom: 10px; +} .elgg-module-inline { margin: 20px 0; } @@ -412,9 +398,17 @@ p { .elgg-item { margin: 3px; } -.elgg-simple-list li { +.elgg-list-simple li { margin-bottom: 5px; } +.elgg-list-distinct { + border-top: 1px dotted #CCCCCC; + margin: 5px 0; + clear: both; +} +.elgg-list-distinct > li { + border-bottom: 1px dotted #CCCCCC; +} /* *************************************** FORMS AND INPUT @@ -453,6 +447,9 @@ textarea { .elgg-input-thin { width: 400px; } +.elgg-input-natural { + width: auto; +} .elgg-button { font-size: 14px; @@ -512,7 +509,7 @@ a.elgg-button { } .elgg-form-settings { - max-width: 600px; + max-width: 800px; } /* ************************************** @@ -737,6 +734,20 @@ a.elgg-button { } /* *************************************** + GENERAL MENU +*************************************** */ +.elgg-menu-general > li, +.elgg-menu-general > li > a { + display: inline-block; + color: #999; +} + +.elgg-menu-general > li:after { + content: "\007C"; + padding: 0 4px; +} + +/* *************************************** HOVER MENU *************************************** */ .elgg-menu-hover { @@ -819,6 +830,9 @@ a.elgg-button { .elgg-menu-hz .elgg-body:after { content: '.'; } +.elgg-menu > li:last-child::after { + display: none; +} .elgg-menu-admin-footer a { color: #eee; } @@ -1002,66 +1016,6 @@ a.elgg-widget-collapsed:before { } /* *************************************** - SPACING (from OOCSS) -*************************************** */ -.pan{padding:0} -.pas{padding:5px} -.pam{padding:10px} -.pal{padding:20px} -.ptn{padding-top:0} -.pts{padding-top:5px} -.ptm{padding-top:10px} -.ptl{padding-top:20px} -.prn{padding-right:0} -.prs{padding-right:5px} -.prm{padding-right:10px} -.prl{padding-right:20px} -.pbn{padding-bottom:0} -.pbs{padding-bottom:5px} -.pbm{padding-bottom:10px} -.pbl{padding-bottom:20px} -.pln{padding-left:0} -.pls{padding-left:5px} -.plm{padding-left:10px} -.pll{padding-left:20px} -.phn{padding-left:0;padding-right:0} -.phs{padding-left:5px;padding-right:5px} -.phm{padding-left:10px;padding-right:10px} -.phl{padding-left:20px;padding-right:20px} -.pvn{padding-top:0;padding-bottom:0} -.pvs{padding-top:5px;padding-bottom:5px} -.pvm{padding-top:10px;padding-bottom:10px} -.pvl{padding-top:20px;padding-bottom:20px} -.man{margin:0} -.mas{margin:5px} -.mam{margin:10px} -.mal{margin:20px} -.mtn{margin-top:0} -.mts{margin-top:5px} -.mtm{margin-top:10px} -.mtl{margin-top:20px} -.mrn{margin-right:0} -.mrs{margin-right:5px} -.mrm{margin-right:10px} -.mrl{margin-right:20px} -.mbn{margin-bottom:0} -.mbs{margin-bottom:5px} -.mbm{margin-bottom:10px} -.mbl{margin-bottom:20px} -.mln{margin-left:0} -.mls{margin-left:5px} -.mlm{margin-left:10px} -.mll{margin-left:20px} -.mhn{margin-left:0;margin-right:0} -.mhs{margin-left:5px;margin-right:5px} -.mhm{margin-left:10px;margin-right:10px} -.mhl{margin-left:20px;margin-right:20px} -.mvn{margin-top:0;margin-bottom:0} -.mvs{margin-top:5px;margin-bottom:5px} -.mvm{margin-top:10px;margin-bottom:10px} -.mvl{margin-top:20px;margin-bottom:20px} - -/* *************************************** ICONS *************************************** */ .elgg-icon { @@ -1351,3 +1305,116 @@ table.mceLayout { .elgg-output dd { margin: 0 0 1em 2em; } + +/* *************************************** + HELPERS +*************************************** */ +.hidden { + display: none; +} +.centered { + margin: 0 auto; +} +.center { + text-align: center; +} +.float { + float: left; +} +.float-alt { + float: right; +} +.elgg-toggle { + cursor: pointer; +} +.elgg-discover .elgg-discoverable { + display: none; +} +.elgg-discover:hover .elgg-discoverable { + display: block; +} +.elgg-transition:hover { + opacity: .7; +} + +/* *************************************** + BORDERS AND SEPARATORS +*************************************** */ +.elgg-border-plain { + border: 1px solid #eeeeee; +} +.elgg-border-transition { + border: 1px solid #eeeeee; +} +.elgg-divide-top { + border-top: 1px solid #CCCCCC; +} +.elgg-divide-bottom { + border-bottom: 1px solid #CCCCCC; +} +.elgg-divide-left { + border-left: 1px solid #CCCCCC; +} +.elgg-divide-right { + border-right: 1px solid #CCCCCC; +} + +/* *************************************** + SPACING (from OOCSS) +*************************************** */ +.pan{padding:0} +.pas{padding:5px} +.pam{padding:10px} +.pal{padding:20px} +.ptn{padding-top:0} +.pts{padding-top:5px} +.ptm{padding-top:10px} +.ptl{padding-top:20px} +.prn{padding-right:0} +.prs{padding-right:5px} +.prm{padding-right:10px} +.prl{padding-right:20px} +.pbn{padding-bottom:0} +.pbs{padding-bottom:5px} +.pbm{padding-bottom:10px} +.pbl{padding-bottom:20px} +.pln{padding-left:0} +.pls{padding-left:5px} +.plm{padding-left:10px} +.pll{padding-left:20px} +.phn{padding-left:0;padding-right:0} +.phs{padding-left:5px;padding-right:5px} +.phm{padding-left:10px;padding-right:10px} +.phl{padding-left:20px;padding-right:20px} +.pvn{padding-top:0;padding-bottom:0} +.pvs{padding-top:5px;padding-bottom:5px} +.pvm{padding-top:10px;padding-bottom:10px} +.pvl{padding-top:20px;padding-bottom:20px} +.man{margin:0} +.mas{margin:5px} +.mam{margin:10px} +.mal{margin:20px} +.mtn{margin-top:0} +.mts{margin-top:5px} +.mtm{margin-top:10px} +.mtl{margin-top:20px} +.mrn{margin-right:0} +.mrs{margin-right:5px} +.mrm{margin-right:10px} +.mrl{margin-right:20px} +.mbn{margin-bottom:0} +.mbs{margin-bottom:5px} +.mbm{margin-bottom:10px} +.mbl{margin-bottom:20px} +.mln{margin-left:0} +.mls{margin-left:5px} +.mlm{margin-left:10px} +.mll{margin-left:20px} +.mhn{margin-left:0;margin-right:0} +.mhs{margin-left:5px;margin-right:5px} +.mhm{margin-left:10px;margin-right:10px} +.mhl{margin-left:20px;margin-right:20px} +.mvn{margin-top:0;margin-bottom:0} +.mvs{margin-top:5px;margin-bottom:5px} +.mvm{margin-top:10px;margin-bottom:10px} +.mvl{margin-top:20px;margin-bottom:20px} diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index f675ab7cb..77313fa1a 100644 --- a/views/default/css/elements/components.php +++ b/views/default/css/elements/components.php @@ -7,17 +7,6 @@ * @package Elgg.Core * @subpackage UI */ -/** - * elgg-body fills the space available to it. - * It uses hidden text to expand itself. The combination of auto width, overflow - * hidden, and the hidden text creates this effect. - * - * This allows us to float fixed width divs to either side of an .elgg-body div - * without having to specify the body div's width. - * - * @todo check what happens with long <pre> tags or large images - * @todo Move this to its own file -- it is very complicated and should not have to be overridden. - */ ?> /* *************************************** diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php index 627cae55c..74f21ee59 100644 --- a/views/default/css/elements/core.php +++ b/views/default/css/elements/core.php @@ -46,13 +46,28 @@ *overflow:visible; } -<?php //@todo isn't this only needed if we use display:table-cell? ?> +<?php +/** + * elgg-body fills the space available to it. + * It uses hidden text to expand itself. The combination of auto width, overflow + * hidden, and the hidden text creates this effect. + * + * This allows us to float fixed width divs to either side of an .elgg-body div + * without having to specify the body div's width. + * + * @todo check what happens with long <pre> tags or large images + * @todo Move this to its own file -- it is very complicated and should not have to be overridden. + */ + +//@todo isn't this only needed if we use display:table-cell? +?> .elgg-body:after, .elgg-col-last:after { display: block; visibility: hidden; height: 0 !important; line-height: 0; + overflow: hidden; /* Stretch to fill up available space */ font-size: xx-large; @@ -68,8 +83,9 @@ /* Enabled nesting of dropdown/flyout menus */ .elgg-menu > li { position: relative; } -/* Separators should only come between list items */ -.elgg-menu > li:last-child:after { display: none } +.elgg-menu > li:last-child::after { + display: none; +} /* Maximize click target */ .elgg-menu > li > a { display: block } diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index d14c341a7..81db81747 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -41,7 +41,7 @@ input, textarea { box-sizing: border-box; } -input:focus, textarea:focus { +input[type=text]:focus, textarea:focus { border: solid 1px #4690d6; background: #e4ecf5; color:#333; @@ -72,7 +72,7 @@ input[type="radio"] { width:auto; } .elgg-input-checkboxes.elgg-horizontal li, -.elgg-input-radio.elgg-horizontal li { +.elgg-input-radios.elgg-horizontal li { display: inline; padding-right: 10px; } diff --git a/views/default/css/elements/helpers.php b/views/default/css/elements/helpers.php index e6f59260d..e9a9e0a30 100644 --- a/views/default/css/elements/helpers.php +++ b/views/default/css/elements/helpers.php @@ -33,27 +33,10 @@ float: right; } -.right { - float: right; -} - -.left { - float: left; -} - .link { cursor: pointer; } -<?php @todo // do we need something like large and small? ?> -.large { - font-size: 120%; -} - -.small { - font-size: 80%; -} - .elgg-discover .elgg-discoverable { display: none; } diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index bf1046dda..d5b20896a 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -130,9 +130,9 @@ } .elgg-menu-topbar > li > a { - padding: 2px 15px 0; + padding-top: 2px; color: #eee; - margin-top: 1px; + margin: 1px 15px 0; } .elgg-menu-topbar > li > a:hover { @@ -372,7 +372,10 @@ position: absolute; z-index: 10000; - width: 165px; + overflow: hidden; + + min-width: 165px; + max-width: 250px; border: solid 1px; border-color: #E5E5E5 #999 #999 #E5E5E5; background-color: #FFF; diff --git a/views/default/css/elements/typography.php b/views/default/css/elements/typography.php index f080a29b2..d93b28d2c 100644 --- a/views/default/css/elements/typography.php +++ b/views/default/css/elements/typography.php @@ -139,7 +139,7 @@ h6 { font-size: 0.8em; } .elgg-output dt { font-weight: bold } .elgg-output dd { margin: 0 0 1em 1em } -.elgg-output ul, ol { +.elgg-output ul, .elgg-output ol { margin: 0 1.5em 1.5em 0; padding-left: 1.5em; } diff --git a/views/default/css/ie7.php b/views/default/css/ie7.php index 754ed3664..db0125b4b 100644 --- a/views/default/css/ie7.php +++ b/views/default/css/ie7.php @@ -53,4 +53,13 @@ .elgg-avatar { display: inline; +} + +.elgg-body-walledgarden .elgg-col-1of2 { + width: 255px; +} + +.elgg-module-walledgarden > .elgg-head, +.elgg-module-walledgarden > .elgg-foot { + width: 530px; }
\ No newline at end of file diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 47850425b..ea2543587 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -6,36 +6,65 @@ $url = elgg_get_site_url(); ?> -#elgg-walledgarden { +.elgg-body-walledgarden { margin: 100px auto 0 auto; - width: 563px; - min-height: 230px; - background: url(<?php echo $url; ?>_graphics/walled_garden_background_top.gif) no-repeat left top; - padding: 0; position: relative; + width: 530px; } - -#elgg-walledgarden-bottom { - margin:0 auto; - background: url(<?php echo $url; ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom; - width:563px; - height:54px; +.elgg-module-walledgarden { + position: absolute; + top: 0; + left: 0; +} +.elgg-module-walledgarden > .elgg-head { + height: 17px; +} +.elgg-module-walledgarden > .elgg-body { + padding: 0 10px; +} +.elgg-module-walledgarden > .elgg-foot { + height: 17px; +} +.elgg-walledgarden-double > .elgg-head { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_top.png) no-repeat left top; +} +.elgg-walledgarden-double > .elgg-body { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-double > .elgg-foot { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_bottom.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-head { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_top.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-body { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-single > .elgg-foot { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_bottom.png) no-repeat left top; } -#elgg-walledgarden-intro { - width: 230px; - float: left; - margin: 35px 15px 15px 35px; +.elgg-col > .elgg-inner { + margin: 0 0 0 5px; +} +.elgg-col:first-child > .elgg-inner { + margin: 0 5px 0 0; +} +.elgg-col > .elgg-inner { + padding: 0 8px; } -#elgg-walledgarden-intro ul { - float: left; +.elgg-walledgarden-single > .elgg-body > .elgg-inner { + padding: 0 8px; } -#elgg-walledgarden-login { - width: 230px; - float: left; - margin: 30px 15px 45px 19px; +.elgg-module-walledgarden-login { + margin: 0; +} +.elgg-body-walledgarden h3 { + font-size: 1.5em; + line-height: 1.1em; + padding-bottom: 5px; } .elgg-heading-walledgarden { @@ -43,27 +72,3 @@ $url = elgg_get_site_url(); margin-top: 60px; line-height: 1.1em; } - -#elgg-walledgarden-lostpassword, -#elgg-walledgarden-registration { - position: absolute; - right: 0; - top: 0; - width: 563px; - background-color: white; - padding: 0; - background: url(<?php echo $url; ?>_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top; - height: auto; -} - -.elgg-hiddenform-body { - padding: 30px 40px 0 40px; - height: auto; -} -.elgg-hiddenform-bottom { - margin: 0 auto; - background: url(<?php echo $url; ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom; - width: 563px; - height: 54px; - position: relative; -} diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php index 92a0784df..1a67ffcc4 100644 --- a/views/default/forms/admin/menu/save.php +++ b/views/default/forms/admin/menu/save.php @@ -64,7 +64,7 @@ $custom_items = elgg_get_config('site_custom_menu_items'); $name_str = elgg_echo('name'); $url_str = elgg_echo('admin:plugins:label:website'); -echo '<ul class="elgg-simple-list">'; +echo '<ul class="elgg-list elgg-list-simple">'; if (is_array($custom_items)) { foreach ($custom_items as $title => $url) { diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php index e12764092..5155fc415 100644 --- a/views/default/forms/admin/site/update_advanced.php +++ b/views/default/forms/admin/site/update_advanced.php @@ -91,7 +91,7 @@ $form_body .= "</div>"; $form_body .= elgg_view('input/hidden', array('name' => 'settings', 'value' => 'go')); -$form_body .= '<div class="elgg-divide-top">'; +$form_body .= '<div class="elgg-foot">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); $form_body .= '</div>'; diff --git a/views/default/forms/admin/site/update_basic.php b/views/default/forms/admin/site/update_basic.php index 66722aef2..88870bc60 100644 --- a/views/default/forms/admin/site/update_basic.php +++ b/views/default/forms/admin/site/update_basic.php @@ -24,7 +24,7 @@ $form_body .= elgg_view("input/dropdown", array( 'options_values' => $languages, )) . "</div>"; -$form_body .= '<div class="elgg-divide-top">'; +$form_body .= '<div class="elgg-foot">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); $form_body .= '</div>'; diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php index f622fd60f..3e798cb27 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -9,14 +9,23 @@ elgg_load_js('jquery.imgareaselect'); elgg_load_js('elgg.avatar_cropper'); elgg_load_css('jquery.imgareaselect'); -$master_image = $vars['entity']->getIconUrl('master'); +$master_img = elgg_view('output/img', array( + 'src' => $vars['entity']->getIconUrl('master'), + 'alt' => elgg_echo('avatar'), + 'class' => 'mrl', + 'id' => 'user-avatar-cropper', +)); + +$preview_img = elgg_view('output/img', array( + 'src' => $vars['entity']->getIconUrl('master'), + 'alt' => elgg_echo('avatar'), +)); ?> <div class="clearfix"> - <img id="user-avatar-cropper" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" /> + <?php echo $master_img; ?> <div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div> - <div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div> - + <div id="user-avatar-preview"><?php echo $preview_img; ?></div> </div> <div class="elgg-foot"> <?php diff --git a/views/default/forms/login.php b/views/default/forms/login.php index 07f084660..6f6cc9906 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -23,15 +23,15 @@ <?php echo elgg_view('login/extend'); ?> <div class="elgg-foot"> - <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?> - - <label class="right mtm"> + <label class="mtm float-alt"> <input type="checkbox" name="persistent" value="true" /> <?php echo elgg_echo('user:persistent'); ?> </label> + <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?> + <?php - if ($vars['returntoreferer']) { + if (isset($vars['returntoreferer'])) { echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true')); } ?> @@ -42,7 +42,7 @@ echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'register">' . elgg_echo('register') . '</a></li>'; } ?> - <li><a href="<?php echo elgg_get_site_url(); ?>forgotpassword"> + <li><a class="forgot_link" href="<?php echo elgg_get_site_url(); ?>forgotpassword"> <?php echo elgg_echo('user:password:lost'); ?> </a></li> </ul> diff --git a/views/default/forms/user/requestnewpassword.php b/views/default/forms/user/requestnewpassword.php index 8a5a18734..c90971eaf 100644 --- a/views/default/forms/user/requestnewpassword.php +++ b/views/default/forms/user/requestnewpassword.php @@ -11,7 +11,7 @@ <?php echo elgg_echo('user:password:text'); ?> </div> <div> - <label><?php echo elgg_echo('username'); ?></label><br /> + <label><?php echo elgg_echo('loginusername'); ?></label><br /> <?php echo elgg_view('input/text', array( 'name' => 'username', 'class' => 'elgg-autofocus', diff --git a/views/default/icon/default.php b/views/default/icon/default.php index 533b92c43..22c20b3a7 100644 --- a/views/default/icon/default.php +++ b/views/default/icon/default.php @@ -5,10 +5,11 @@ * @package Elgg * @subpackage Core * - * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method - * @uses $vars['size'] topbar, tiny, small, medium (default), large, master - * @uses $vars['href'] Optional override for link + * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method + * @uses $vars['size'] topbar, tiny, small, medium (default), large, master + * @uses $vars['href'] Optional override for link * @uses $vars['img_class'] Optional CSS class added to img + * @uses $vars['link_class'] Optional CSS class for the link */ $entity = $vars['entity']; @@ -26,21 +27,31 @@ if (isset($entity->name)) { } else { $title = $entity->title; } +$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false); $url = $entity->getURL(); if (isset($vars['href'])) { $url = $vars['href']; } -$img_src = $entity->getIconURL($vars['size']); -$img = "<img $class src=\"$img_src\" alt=\"$title\" />"; +$img = elgg_view('output/img', array( + 'src' => $entity->getIconURL($vars['size']), + 'alt' => $title, + 'class' => $class, +)); if ($url) { - echo elgg_view('output/url', array( + $params = array( 'href' => $url, 'text' => $img, 'is_trusted' => true, - )); + ); + $class = elgg_extract('link_class', $vars, ''); + if ($class) { + $params['class'] = $class; + } + + echo elgg_view('output/url', $params); } else { echo $img; } diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index 0eb3691bd..c0b0e7483 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -5,10 +5,14 @@ * Rounded avatar corners - CSS3 method * uses avatar as background image so we can clip it with border-radius in supported browsers * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - * @uses $vars['size'] The size - tiny, small, medium or large. (medium) - * @uses $vars['hover'] Display the hover menu? (true) - * @uses $vars['class'] Optional class added to the .elgg-avatar div + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + * @uses $vars['size'] The size - tiny, small, medium or large. (medium) + * @uses $vars['use_hover'] Display the hover menu? (true) + * @uses $vars['use_link'] Wrap a link around image? (true) + * @uses $vars['class'] Optional class added to the .elgg-avatar div + * @uses $vars['img_class'] Optional CSS class added to img + * @uses $vars['link_class'] Optional CSS class for the link + * @uses $vars['href'] Optional override of the link href */ $user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity()); @@ -22,11 +26,13 @@ if (isset($vars['class'])) { $class = "$class {$vars['class']}"; } +$use_link = elgg_extract('use_link', $vars, true); + if (!($user instanceof ElggUser)) { return true; } -$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8'); +$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8', false); $username = $user->username; $icontime = $user->icontime; @@ -35,19 +41,37 @@ if (!$icontime) { } $js = elgg_extract('js', $vars, ''); +if ($js) { + elgg_deprecated_notice("Passing 'js' to icon views is deprecated.", 1.8, 5); +} + +$img_class = ''; +if (isset($vars['img_class'])) { + $img_class = $vars['img_class']; +} -$hover = elgg_extract('hover', $vars, true); +$use_hover = elgg_extract('use_hover', $vars, true); if (isset($vars['override'])) { - elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5); - $hover = false; + elgg_deprecated_notice("Use 'use_hover' rather than 'override' with user avatars", 1.8, 5); + $use_hover = false; +} +if (isset($vars['hover'])) { + // only 1.8.0 was released with 'hover' as the key + $use_hover = $vars['hover']; } $spacer_url = elgg_get_site_url() . '_graphics/spacer.gif'; -$icon_url = $user->getIconURL($size); -$icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $js style=\"background: url($icon_url) no-repeat;\" />"; +$icon_url = elgg_format_url($user->getIconURL($size)); +$icon = elgg_view('output/img', array( + 'src' => $spacer_url, + 'alt' => $name, + 'title' => $name, + 'class' => $img_class, + 'style' => "background: url($icon_url) no-repeat;", +)); -$show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned()); +$show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned()); ?> <div class="<?php echo $class; ?>"> @@ -63,10 +87,17 @@ if ($show_menu) { echo elgg_view_menu('user_hover', $params); } -echo elgg_view('output/url', array( - 'href' => $user->getURL(), - 'text' => $icon, - 'is_trusted' => true, -)); +if ($use_link) { + $class = elgg_extract('link_class', $vars, ''); + $url = elgg_extract('href', $vars, $user->getURL()); + echo elgg_view('output/url', array( + 'href' => $url, + 'text' => $icon, + 'is_trusted' => true, + 'class' => $class, + )); +} else { + echo "<a>$icon</a>"; +} ?> </div> diff --git a/views/default/input/button.php b/views/default/input/button.php index c21989919..9957fdc54 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -33,7 +33,7 @@ switch ($vars['type']) { } // blank src if trying to access an offsite image. @todo why? -if (strpos($vars['src'], elgg_get_site_url()) === false) { +if (isset($vars['src']) && strpos($vars['src'], elgg_get_site_url()) === false) { $vars['src'] = ""; } ?> diff --git a/views/default/input/date.php b/views/default/input/date.php index ceeb2105c..828ce5520 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -49,7 +49,7 @@ if ($timestamp) { // convert timestamps to text for display if (is_numeric($vars['value'])) { - $vars['value'] = gmdate('Y/m/d', $vars['value']); + $vars['value'] = gmdate('Y-m-d', $vars['value']); } $attributes = elgg_format_attributes($vars); diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php index ecf468da3..b41449fbf 100644 --- a/views/default/input/friendspicker.php +++ b/views/default/input/friendspicker.php @@ -187,7 +187,7 @@ if (!isset($vars['replacement'])) { } //echo "<p>" . $user->name . "</p>"; - $label = elgg_view_entity_icon($friend, 'tiny', array('hover' => false)); + $label = elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false)); $options[$label] = $friend->getGUID(); if ($vars['highlight'] == 'all' diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index 5c4b297b1..246c462da 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -27,7 +27,7 @@ function user_picker_add_user($user_id) { return false; } - $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => false)); + $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => false)); // this html must be synced with the userpicker.js library $code = '<li><div class="elgg-image-block">'; diff --git a/views/default/js/admin.php b/views/default/js/admin.php index d4dd06822..5cefba512 100644 --- a/views/default/js/admin.php +++ b/views/default/js/admin.php @@ -17,9 +17,6 @@ elgg.admin.init = function () { $(this).stop().slideUp('medium'); }); - // plugin screenshot modal - $('.elgg-plugin-screenshot a').click(elgg.admin.displayPluginScreenshot); - // draggable plugin reordering $('#elgg-plugin-list > ul').sortable({ items: 'li:has(> .elgg-state-draggable)', @@ -74,48 +71,6 @@ elgg.admin.movePlugin = function(e, ui) { }; /** - * Display a plugin screenshot. - * - * @param {Object} e The event object. - * @return void - */ -elgg.admin.displayPluginScreenshot = function(e) { - e.preventDefault(); - var lb = $('.elgg-plugin-screenshot-lightbox'); - - if (lb.length < 1) { - $('body').append('<div class="elgg-plugin-screenshot-lightbox"></div>'); - lb = $('.elgg-plugin-screenshot-lightbox'); - - lb.click(function() { - lb.hide(); - }); - - $(document).click(function(e) { - var target = $(e.target); - if (target.is('a') && target.hasClass('elgg-plugin-screenshot-lightbox')) { - lb.hide(); - e.preventDefault(); - } - }); - } - - var html = '<img class="pas" src="' + $(this).attr('href') + '">'; - var desc = $(this).find('img').attr('alt'); - - if (desc) { - html = '<h2 class="pam">' + desc + '</h2>' + html; - } - - lb.html(html); - - top_pos = $(window).scrollTop() + 10 + 'px'; - left_pos = $(window).scrollLeft() + 5 + 'px'; - - lb.css('top', top_pos).css('left', left_pos).show(); -}; - -/** * In-line editing for custom profile fields * * @param string value The new value diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php index 09e0b27bc..f8234f84f 100644 --- a/views/default/js/initialize_elgg.php +++ b/views/default/js/initialize_elgg.php @@ -41,6 +41,7 @@ if ($user instanceof ElggUser) { $user_json['subtype'] = $user->getSubtype(); $user_json['url'] = $user->getURL(); + $user_json['admin'] = $user->isAdmin(); echo 'elgg.session.user = new elgg.ElggUser(' . json_encode($user_json) . ');'; } diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php index 5f3764756..c45d46098 100644 --- a/views/default/js/lightbox.php +++ b/views/default/js/lightbox.php @@ -5,6 +5,10 @@ * Usage * Apply the class elgg-lightbox to links. * + * Advanced Usage + * Elgg is distributed with the Fancybox jQuery library. Please go to + * http://fancybox.net for more information on the options of this lightbox. + * * Overriding * In a plugin, override this view and override the registration for the * lightbox JavaScript and CSS (@see elgg_views_boot()). diff --git a/views/default/js/walled_garden.php b/views/default/js/walled_garden.php new file mode 100644 index 000000000..46c2934ff --- /dev/null +++ b/views/default/js/walled_garden.php @@ -0,0 +1,40 @@ +<?php +/** + * Walled garden JavaScript + * + * @todo update for new JS lib + */ + +$cancel_button = elgg_view('input/button', array( + 'value' => elgg_echo('cancel'), + 'class' => 'elgg-button-cancel mlm', +)); +$cancel_button = trim($cancel_button); + +?> + +$(document).ready(function() { + + // add cancel button to inline forms + $(".elgg-walledgarden-password").find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + $('.elgg-walledgarden-register').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + + $(".forgot_link").click(function(event) { + event.preventDefault(); + $(".elgg-walledgarden-password").fadeToggle(); + }); + + $(".registration_link").click(function(event) { + event.preventDefault(); + $(".elgg-walledgarden-register").fadeToggle(); + }); + + $('input.elgg-button-cancel').click(function(event) { + if ($(".elgg-walledgarden-password").is(':visible')) { + $(".forgot_link").click(); + } else if ($('.elgg-walledgarden-register').is(':visible')) { + $(".registration_link").click(); + } + event.preventDefault(); + }); +});
\ No newline at end of file diff --git a/views/default/navigation/listtype.php b/views/default/navigation/listtype.php deleted file mode 100644 index e90667e8d..000000000 --- a/views/default/navigation/listtype.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Elgg list view switcher - * - * @package Elgg - * @subpackage Core - */ - -$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], 'search_listtype'); - -if ($vars['listtype'] == "list") { - $listtype = "gallery"; -} else { - $listtype = "list"; -} - -if (substr_count($baseurl,'?')) { - $baseurl .= "&search_listtype=" . $listtype; -} else { - $baseurl .= "?search_listtype=" . $listtype; -} - -?> - -<p class="mtm"> - <?php echo elgg_echo("listtype:change") ?>: - <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("listtype:{$listtype}"); ?></a> -</p>
\ No newline at end of file diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php index 38b42bda9..24c21dd57 100644 --- a/views/default/navigation/menu/site.php +++ b/views/default/navigation/menu/site.php @@ -6,12 +6,15 @@ * @uses $vars['menu']['more'] */ +$default_items = elgg_extract('default', $vars['menu'], array()); +$more_items = elgg_extract('more', $vars['menu'], array()); + echo '<ul class="elgg-menu elgg-menu-site elgg-menu-site-default clearfix">'; -foreach ($vars['menu']['default'] as $menu_item) { +foreach ($default_items as $menu_item) { echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); } -if (isset($vars['menu']['more']) && !empty($vars['menu']['more'])) { +if ($more_items) { echo '<li class="elgg-more">'; $more = elgg_echo('more'); @@ -19,7 +22,7 @@ if (isset($vars['menu']['more']) && !empty($vars['menu']['more'])) { echo elgg_view('navigation/menu/elements/section', array( 'class' => 'elgg-menu elgg-menu-site elgg-menu-site-more', - 'items' => $vars['menu']['more'], + 'items' => $more_items, )); echo '</li>'; diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php index 69d29dc32..6dfa4ebc7 100644 --- a/views/default/navigation/viewtype.php +++ b/views/default/navigation/viewtype.php @@ -5,9 +5,7 @@ * @package Elgg * @subpackage Core * - * @deprecated 1.8 Use navigation/listtype + * @deprecated 1.8 See how file plugin adds a toggle in function file_register_toggle() */ -elgg_deprecated_notice('navigation/viewtype was deprecated by navigation/listtype', 1.8); - -echo elgg_view('navigation/listtype', $vars);
\ No newline at end of file +elgg_deprecated_notice('navigation/viewtype was deprecated', 1.8); diff --git a/views/default/object/elements/full.php b/views/default/object/elements/full.php index 4a2991442..9b89f9706 100644 --- a/views/default/object/elements/full.php +++ b/views/default/object/elements/full.php @@ -2,8 +2,7 @@ /** * Object full rendering * - * Sample output - * <h2>Title</h3> + * Sample output: * <div class="elgg-content"> * <div class="elgg-image-block"> * </div> @@ -12,14 +11,12 @@ * </div> * * @uses $vars['entity'] ElggEntity - * @uses $vars['title'] Title (false for no title) * @uses $vars['icon'] HTML for the content icon * @uses $vars['summary'] HTML for the content summary * @uses $vars['body'] HTML for the content body * @uses $vars['class'] Optional additional class for the content wrapper */ -$title = elgg_extract('title', $vars); $icon = elgg_extract('icon', $vars); $summary = elgg_extract('summary', $vars); $body = elgg_extract('body', $vars); @@ -30,14 +27,9 @@ if ($class) { $class = "elgg-content"; } -if ($title) { - $title = elgg_view_title($title); -} - $header = elgg_view_image_block($icon, $summary); echo <<<HTML -$title <div class="$class"> $header $body diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 8d82bc52a..22db03f51 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -46,7 +46,9 @@ if ($tags !== false) { if ($metadata) { echo $metadata; } -echo "<h3>$title_link</h3>"; +if ($title_link) { + echo "<h3>$title_link</h3>"; +} echo "<div class=\"elgg-subtext\">$subtitle</div>"; echo $tags; diff --git a/views/default/object/plugin/full.php b/views/default/object/plugin/full.php index db4e4dbcc..8955178a6 100644 --- a/views/default/object/plugin/full.php +++ b/views/default/object/plugin/full.php @@ -156,7 +156,7 @@ if ($screenshots) { $screenshot_full = "{$vars['url']}admin_plugin_screenshot/{$plugin->getID()}/full/{$screenshot['path']}"; $screenshot_src = "{$vars['url']}admin_plugin_screenshot/{$plugin->getID()}/thumbnail/{$screenshot['path']}"; - $screenshots_html .= "<li class=\"elgg-plugin-screenshot prm ptm\"><a href=\"$screenshot_full\">" + $screenshots_html .= "<li class=\"elgg-plugin-screenshot prm ptm\"><a class=\"elgg-lightbox\" href=\"$screenshot_full\">" . "<img src=\"$screenshot_src\" alt=\"$alt\"></a></li>"; } } diff --git a/views/default/output/access.php b/views/default/output/access.php index f312608d5..811948323 100644 --- a/views/default/output/access.php +++ b/views/default/output/access.php @@ -20,7 +20,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { // we decided to show that the item is in a group, rather than its actual access level // not required. Group ACLs are prepended with "Group: " when written. //$access_id_string = elgg_echo('groups:group') . $container->name; - $membership = $is_group->membership; + $membership = $container->membership; if ($membership == ACCESS_PUBLIC) { $access_class .= ' elgg-access-group-open'; diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index 953c15f1b..532790a38 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -41,6 +41,7 @@ if (isset($vars['class'])) { unset($vars['encode_text']); unset($vars['text']); unset($vars['confirm']); +unset($vars['is_trusted']); $attributes = elgg_format_attributes($vars); echo "<a $attributes>$text</a>"; diff --git a/views/default/output/date.php b/views/default/output/date.php index 7c98dddc9..1644a3480 100644 --- a/views/default/output/date.php +++ b/views/default/output/date.php @@ -11,7 +11,7 @@ // convert timestamps to text for display if (is_numeric($vars['value'])) { - $vars['value'] = gmdate('Y/m/d', $vars['value']); + $vars['value'] = gmdate('Y-m-d', $vars['value']); } echo $vars['value']; diff --git a/views/default/output/img.php b/views/default/output/img.php new file mode 100644 index 000000000..d3f596801 --- /dev/null +++ b/views/default/output/img.php @@ -0,0 +1,12 @@ +<?php +/** + * Elgg image view + * + * @uses string $vars['src'] The image src url. + */ + +$vars['src'] = elgg_normalize_url($vars['src']); +$vars['src'] = elgg_format_url($vars['src']); + +$attributes = elgg_format_attributes($vars); +echo "<img $attributes/>"; diff --git a/views/default/output/text.php b/views/default/output/text.php index 2c9242c1d..5cbfc35b0 100644 --- a/views/default/output/text.php +++ b/views/default/output/text.php @@ -6,8 +6,7 @@ * @package Elgg * @subpackage Core * - * @uses $vars['text'] The text to display - * + * @uses $vars['value'] The text to display */ echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8', false);
\ No newline at end of file diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php index f03eb1109..e8b3f477e 100644 --- a/views/default/page/components/gallery.php +++ b/views/default/page/components/gallery.php @@ -16,7 +16,7 @@ */ $items = $vars['items']; -if (!is_array($items) && sizeof($items) == 0) { +if (!is_array($items) || sizeof($items) == 0) { return true; } @@ -39,6 +39,7 @@ if (isset($vars['item_class'])) { $item_class = "$item_class {$vars['item_class']}"; } +$nav = ''; if ($pagination && $count) { $nav .= elgg_view('navigation/pagination', array( 'offset' => $offset, diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php index c83fa0966..c0db50bc5 100644 --- a/views/default/page/components/list.php +++ b/views/default/page/components/list.php @@ -17,10 +17,10 @@ */ $items = $vars['items']; -$offset = $vars['offset']; -$limit = $vars['limit']; -$count = $vars['count']; -$base_url = $vars['base_url']; +$offset = elgg_extract('offset', $vars); +$limit = elgg_extract('limit', $vars); +$count = elgg_extract('count', $vars); +$base_url = elgg_extract('base_url', $vars, ''); $pagination = elgg_extract('pagination', $vars, true); $offset_key = elgg_extract('offset_key', $vars, 'offset'); $position = elgg_extract('position', $vars, 'after'); diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php index b1198ee9a..7e1eaff20 100644 --- a/views/default/page/components/module.php +++ b/views/default/page/components/module.php @@ -2,10 +2,10 @@ /** * Elgg module element * - * @uses $vars['title'] Title text - * @uses $vars['header'] HTML content of the header + * @uses $vars['title'] Optional title text (do not pass header with this option) + * @uses $vars['header'] Optional HTML content of the header * @uses $vars['body'] HTML content of the body - * @uses $vars['footer'] HTML content of the footer + * @uses $vars['footer'] Optional HTML content of the footer * @uses $vars['class'] Optional additional class for module * @uses $vars['id'] Optional id for module * @uses $vars['show_inner'] Optional flag to leave out inner div (default: false) @@ -29,21 +29,15 @@ if (isset($vars['id'])) { } if (isset($vars['header'])) { - if ($vars['header']) { - $header = "<div class=\"elgg-head\">$header</div>"; - } -} else { + $header = "<div class=\"elgg-head\">$header</div>"; +} elseif ($title) { $header = "<div class=\"elgg-head\"><h3>$title</h3></div>"; } $body = "<div class=\"elgg-body\">$body</div>"; -if (isset($vars['footer'])) { - if ($vars['footer']) { - $footer = "<div class=\"elgg-foot\">$footer</div>"; - } -} else { - $footer = "<div class=\"elgg-foot\"></div>"; +if ($footer) { + $footer = "<div class=\"elgg-foot\">$footer</div>"; } $contents = $header . $body . $footer; diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php index 596d17bd3..ded2cea9a 100644 --- a/views/default/page/elements/footer.php +++ b/views/default/page/elements/footer.php @@ -12,7 +12,7 @@ echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-me $powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif"; -echo '<div class="mts clearfloat right">'; +echo '<div class="mts clearfloat float-alt">'; echo elgg_view('output/url', array( 'href' => 'http://elgg.org', 'text' => "<img src=\"$powered_url\" alt=\"Powered by Elgg\" width=\"106\" height=\"15\" />", diff --git a/views/default/page/elements/sidebar.php b/views/default/page/elements/sidebar.php index e1d25eed5..fe6bb450e 100644 --- a/views/default/page/elements/sidebar.php +++ b/views/default/page/elements/sidebar.php @@ -6,7 +6,7 @@ */ echo elgg_view_menu('extras', array( - 'sort_by' => 'name', + 'sort_by' => 'priority', 'class' => 'elgg-menu-hz', )); diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php index 7546a4cdf..491d5b459 100644 --- a/views/default/page/layouts/one_column.php +++ b/views/default/page/layouts/one_column.php @@ -30,7 +30,9 @@ $nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs')); echo $vars['content']; // @deprecated 1.8 - echo $vars['area1']; + if (isset($vars['area1'])) { + echo $vars['area1']; + } ?> </div> </div>
\ No newline at end of file diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php index b2c54e854..e3819cc20 100644 --- a/views/default/page/layouts/widgets.php +++ b/views/default/page/layouts/widgets.php @@ -39,10 +39,14 @@ echo $vars['content']; $widget_class = "elgg-col-1of{$num_columns}"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { - $column_widgets = $widgets[$column_index]; + if (isset($widgets[$column_index])) { + $column_widgets = $widgets[$column_index]; + } else { + $column_widgets = array(); + } echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">"; - if (is_array($column_widgets) && sizeof($column_widgets) > 0) { + if (sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { if (array_key_exists($widget->handler, $widget_types)) { echo elgg_view_entity($widget, array('show_access' => $show_access)); diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 625c63ddb..ff8e317c7 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -7,12 +7,9 @@ // Set the content type header("Content-type: text/html; charset=UTF-8"); - -$site = elgg_get_site_entity(); -$title = $site->name; - ?> -<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); ?> </head> @@ -21,28 +18,8 @@ $title = $site->name; <div class="elgg-page-messages"> <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?> </div> - <div class="elgg-page-body"> - <div id="elgg-walledgarden"> - <div id="elgg-walledgarden-intro"> - <h1 class="elgg-heading-walledgarden"> - <?php - echo elgg_echo('walled_garden:welcome'); - echo ': <br/>'; - echo $title; - ?> - </h1> - <?php - echo elgg_view_menu('walled_garden', array( - 'sort_by' => 'priority', - 'class' => 'elgg-menu-general elgg-menu-hz', - )); - ?> - </div> - <div id="elgg-walledgarden-login"> - <?php echo $vars['body']; ?> - </div> - </div> - <div id="elgg-walledgarden-bottom"></div> + <div class="elgg-body-walledgarden"> + <?php echo $vars['body']; ?> </div> </div> <?php echo elgg_view('page/elements/foot'); ?> diff --git a/views/default/profile/icon.php b/views/default/profile/icon.php index a69c41f1e..5f06cfd54 100644 --- a/views/default/profile/icon.php +++ b/views/default/profile/icon.php @@ -12,6 +12,6 @@ elgg_deprecated_notice('The profile/icon view was deprecated. Use elgg_view_entity_icon()', 1.8); $override = elgg_extract('override', $vars, false); -$vars['hover'] = !$override; +$vars['use_hover'] = !$override; echo elgg_view('icon/user/default', $vars); diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php index 160ffd252..271064a06 100644 --- a/views/default/river/user/default/profileiconupdate.php +++ b/views/default/river/user/default/profileiconupdate.php @@ -17,5 +17,8 @@ $string = elgg_echo('river:update:user:avatar', array($subject_link)); echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'summary' => $string, - 'attachments' => elgg_view_entity_icon($subject, 'tiny', array('hover' => false)), + 'attachments' => elgg_view_entity_icon($subject, 'tiny', array( + 'use_hover' => false, + 'use_link' => false, + )), )); |