aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/admin/appearance/default_widgets.php2
-rw-r--r--views/default/annotation/default.php25
-rw-r--r--views/default/annotation/generic_comment.php18
-rw-r--r--views/default/core/settings/account.php2
-rw-r--r--views/default/css/admin.php100
-rw-r--r--views/default/css/elements/components.php17
-rw-r--r--views/default/css/elements/core.php6
-rw-r--r--views/default/css/elements/forms.php260
-rw-r--r--views/default/css/elements/layout.php5
-rw-r--r--views/default/css/elements/modules.php1
-rw-r--r--views/default/css/elements/navigation.php43
-rw-r--r--views/default/css/elgg.php7
-rw-r--r--views/default/forms/avatar/crop.php5
-rw-r--r--views/default/forms/avatar/upload.php2
-rw-r--r--views/default/forms/comments/add.php2
-rw-r--r--views/default/forms/friends/collections/add.php4
-rw-r--r--views/default/forms/plugins/settings/save.php4
-rw-r--r--views/default/forms/profile/edit.php2
-rw-r--r--views/default/forms/user/requestnewpassword.php2
-rw-r--r--views/default/forms/useradd.php2
-rw-r--r--views/default/forms/usersettings/save.php2
-rw-r--r--views/default/forms/widgets/save.php2
-rw-r--r--views/default/icon/user/default.php8
-rw-r--r--views/default/input/access.php18
-rw-r--r--views/default/input/autocomplete.php16
-rw-r--r--views/default/input/button.php15
-rw-r--r--views/default/input/calendar.php4
-rw-r--r--views/default/input/captcha.php2
-rw-r--r--views/default/input/checkbox.php16
-rw-r--r--views/default/input/checkboxes.php99
-rw-r--r--views/default/input/date.php48
-rw-r--r--views/default/input/dropdown.php21
-rw-r--r--views/default/input/email.php11
-rw-r--r--views/default/input/file.php15
-rw-r--r--views/default/input/form.php15
-rw-r--r--views/default/input/location.php10
-rw-r--r--views/default/input/longtext.php27
-rw-r--r--views/default/input/password.php17
-rw-r--r--views/default/input/plaintext.php21
-rw-r--r--views/default/input/radio.php49
-rw-r--r--views/default/input/tag.php14
-rw-r--r--views/default/input/tags.php12
-rw-r--r--views/default/input/text.php12
-rw-r--r--views/default/input/url.php11
-rw-r--r--views/default/navigation/menu/default.php2
-rw-r--r--views/default/navigation/menu/elements/item.php4
-rw-r--r--views/default/object/default.php1
-rw-r--r--views/default/object/elements/summary.php8
-rw-r--r--views/default/object/plugin/advanced.php8
-rw-r--r--views/default/object/plugin/invalid.php2
-rw-r--r--views/default/object/widget/elements/controls.php6
-rw-r--r--views/default/output/date.php12
-rw-r--r--views/default/page/components/gallery.php31
-rw-r--r--views/default/page/components/list.php6
-rw-r--r--views/default/page/default.php2
-rw-r--r--views/default/page/elements/head.php2
-rw-r--r--views/default/page/elements/header_logo.php6
-rw-r--r--views/default/page/elements/owner_block.php2
-rw-r--r--views/default/page/elements/shortcut_icon.php6
-rw-r--r--views/default/page/elements/wrapper.php22
-rw-r--r--views/default/page/layouts/admin.php5
-rw-r--r--views/default/page/layouts/content.php1
-rw-r--r--views/default/page/layouts/content/header.php55
-rw-r--r--views/default/page/layouts/one_column.php15
-rw-r--r--views/default/page/layouts/widgets/add_button.php11
-rw-r--r--views/default/river/annotation/generic_comment/create.php27
-rw-r--r--views/default/river/elements/body.php70
-rw-r--r--views/default/river/elements/responses.php (renamed from views/default/river/elements/footer.php)10
-rw-r--r--views/default/river/elements/summary.php41
-rw-r--r--views/default/river/item.php10
-rw-r--r--views/default/river/relationship/friend/create.php16
-rw-r--r--views/default/river/user/default/profileiconupdate.php18
-rw-r--r--views/default/widgets/content_stats/content.php4
-rw-r--r--views/default/widgets/friends/content.php16
-rw-r--r--views/installation/page/default.php2
-rw-r--r--views/json/entities/entity_list.php4
76 files changed, 829 insertions, 570 deletions
diff --git a/views/default/admin/appearance/default_widgets.php b/views/default/admin/appearance/default_widgets.php
index 5ce0d0acf..4416dc8f6 100644
--- a/views/default/admin/appearance/default_widgets.php
+++ b/views/default/admin/appearance/default_widgets.php
@@ -34,7 +34,7 @@ if (!$widget_context && $list) {
$current_info = null;
$tabs = array();
foreach ($list as $info) {
- $url = "admin/settings/default_widgets?widget_context={$info['widget_context']}";
+ $url = "admin/appearance/default_widgets?widget_context={$info['widget_context']}";
$selected = false;
if ($widget_context == $info['widget_context']) {
$selected = true;
diff --git a/views/default/annotation/default.php b/views/default/annotation/default.php
index a21fdee51..0e626ad9a 100644
--- a/views/default/annotation/default.php
+++ b/views/default/annotation/default.php
@@ -2,9 +2,9 @@
/**
* Elgg default annotation view
*
+ * @note To add or remove from the annotation menu, register handlers for the menu:annotation hook.
+ *
* @uses $vars['annotation']
- * @uses $vars['delete_action'] A custom action for the delete button.
- * The annotation ID is passed as 'annotation_id'.
*/
$annotation = $vars['annotation'];
@@ -16,28 +16,19 @@ if (!$owner) {
$icon = elgg_view_entity_icon($owner, 'tiny');
$owner_link = "<a href=\"{$owner->getURL()}\">$owner->name</a>";
-$delete_action = elgg_extract('delete_action', $vars, '');
+$menu = elgg_view_menu('annotation', array(
+ 'annotation' => $annotation,
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz right',
+));
$text = elgg_view("output/longtext", array("value" => $annotation->value));
$friendlytime = elgg_view_friendly_time($annotation->time_created);
-$delete_button = '';
-if ($delete_action && $annotation->canEdit()) {
- $url = elgg_http_add_url_query_elements($delete_action, array(
- 'annotation_id' => $annotation->id,
- ));
- $delete_button = elgg_view("output/confirmlink", array(
- 'href' => $url,
- 'text' => "<span class=\"elgg-icon elgg-icon-delete right\"></span>",
- 'confirm' => elgg_echo('deleteconfirm'),
- 'text_encode' => false,
- ));
-}
-
$body = <<<HTML
<div class="mbn">
- $delete_button
+ $menu
$owner_link
<span class="elgg-subtext">
$friendlytime
diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php
index 69520d102..a4fbf904e 100644
--- a/views/default/annotation/generic_comment.php
+++ b/views/default/annotation/generic_comment.php
@@ -29,23 +29,17 @@ $entity_title = $entity->title ? $entity->title : elgg_echo('untitled');
$entity_link = "<a href=\"{$entity->getURL()}\">$entity_title</a>";
if ($full_view) {
-
- $delete_button = '';
- if ($comment->canEdit()) {
- $url = "action/comments/delete?annotation_id=$comment->id";
- $delete_button = elgg_view("output/confirmlink", array(
- 'href' => $url,
- 'text' => "<span class=\"elgg-icon elgg-icon-delete right\"></span>",
- 'confirm' => elgg_echo('deleteconfirm'),
- 'text_encode' => false,
- ));
- }
+ $menu = elgg_view_menu('annotation', array(
+ 'annotation' => $comment,
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz right',
+ ));
$comment_text = elgg_view("output/longtext", array("value" => $comment->value));
$body = <<<HTML
<div class="mbn">
- $delete_button
+ $menu
$commenter_link
<span class="elgg-subtext">
$friendlytime
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/css/admin.php b/views/default/css/admin.php
index a4d413781..8993ec66d 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -302,7 +302,9 @@ table.mceLayout {
/* ***************************************
MODULES
*************************************** */
-
+.elgg-module {
+ overflow: hidden;
+}
.elgg-module-main {
background-color: #fff;
border: 1px solid #ccc;
@@ -383,7 +385,7 @@ table.mceLayout {
margin-left: 5px;
}
-.elgg-list-item {
+.elgg-item {
margin: 3px;
}
.elgg-menu-metadata {
@@ -426,15 +428,10 @@ input {
border-radius: 5px;
}
/* default elgg core input field classes */
-.input-text,
-.input-tags,
-.input-url,
-.input-textarea,
-<?php // until we're all on elgg-, need to duplicate ?>
.elgg-input-text,
.elgg-input-tags,
.elgg-input-url,
-.elgg-input-textarea {
+.elgg-input-plaintext {
width:98%;
}
textarea {
@@ -479,7 +476,76 @@ input[type="submit"]:hover, .elgg-button-submit:hover, .elgg-button-action:hover
.elgg-button-action.elgg-state-disabled {
background-color: #aaa;
}
-
+/* **************************************
+ DATE PICKER
+*************************************** */
+.ui-datepicker {
+ margin-top: 3px;
+ padding: 3px 3px 0;
+ border: 1px solid #ccc;
+ background-color: white;
+}
+.ui-datepicker-header {
+ padding: 2px 0;
+ border: 1px solid #ccc;
+ background-color: #eee;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+.ui-datepicker-prev, .ui-datepicker-next {
+ position: absolute;
+ top: 9px;
+ cursor: pointer;
+}
+.ui-datepicker-prev {
+ left: 6px;
+}
+.ui-datepicker-next {
+ right: 6px;
+}
+.ui-datepicker-title {
+ line-height: 1.8em;
+ margin: 0 30px;
+ text-align: center;
+ font-weight: bold;
+}
+.ui-datepicker-calendar {
+ margin-bottom: 2px;
+}
+.ui-datepicker th {
+ border: none;
+ font-weight: bold;
+ padding: 5px 6px;
+ text-align: center;
+}
+.ui-datepicker td {
+ padding: 1px;
+}
+.ui-datepicker td span, .ui-datepicker td a {
+ display: block;
+ padding: 2px;
+ line-height: 1.2em;
+ text-align: right;
+ text-decoration: none;
+}
+.ui-datepicker-calendar .ui-state-default {
+ border: 1px solid #ccc;
+ color: #555;
+ background: #fafafa;
+}
+.ui-datepicker-calendar .ui-state-hover {
+ border: 1px solid #aaa;
+ color: #333;
+ background: #ccc;
+}
+.ui-datepicker-calendar .ui-state-active,
+.ui-datepicker-calendar .ui-state-active.ui-state-hover {
+ font-weight: bold;
+ border: 1px solid #999;
+ color: #333;
+ background: #ddd;
+}
/* ***************************************
PAGINATION
*************************************** */
@@ -605,6 +671,18 @@ input[type="submit"]:hover, .elgg-button-submit:hover, .elgg-button-action:hover
}
/* ***************************************
+ TITLE MENU
+*************************************** */
+.elgg-menu-title {
+ float: right;
+}
+
+.elgg-menu-title > li {
+ display: inline-block;
+ margin-left: 4px;
+}
+
+/* ***************************************
FOOTER MENU
*************************************** */
.elgg-menu-footer {color:gray}
@@ -1102,6 +1180,10 @@ a.elgg-widget-collapsed:before {
ADMIN MISC
*************************************** */
+.elgg-instructs {
+ max-width: 600px;
+}
+
.manifest_file {
background-color:#eee;
diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php
index 0fcbe3619..4a09ca74e 100644
--- a/views/default/css/elements/components.php
+++ b/views/default/css/elements/components.php
@@ -47,10 +47,10 @@
border-bottom: 1px dotted #CCCCCC;
}
-.elgg-list-item .elgg-subtext {
+.elgg-item .elgg-subtext {
margin-bottom: 5px;
}
-.elgg-list-content {
+.elgg-item .elgg-content {
margin: 10px 5px;
}
@@ -65,9 +65,12 @@
.elgg-gallery td {
padding: 5px;
}
-.elgg-gallery-fluid li {
+.elgg-gallery-fluid > li {
float: left;
}
+.elgg-gallery-users > li {
+ margin: 0 2px;
+}
/* ***************************************
Tables
@@ -161,6 +164,9 @@
font-style: italic;
line-height: 1.2em;
}
+
+.elgg-river-attachments,
+.elgg-river-message,
.elgg-river-content {
border-left: 1px solid #CCC;
font-size: 85%;
@@ -168,9 +174,8 @@
margin: 8px 0 5px 0;
padding-left: 5px;
}
-
-<?php //@todo location-dependent styles ?>
-.elgg-river-content .elgg-avatar {
+.elgg-river-attachments .elgg-avatar,
+.elgg-river-attachments .elgg-icon {
float: left;
}
.elgg-river-layout .elgg-input-dropdown {
diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php
index 61dcdb1fe..af4a1882a 100644
--- a/views/default/css/elements/core.php
+++ b/views/default/css/elements/core.php
@@ -96,9 +96,6 @@
.elgg-menu-hz > li > span {
/* Google says do this, but why? */
position: relative;
-
- /* FF2 */
- display: -moz-inline-box;
display: inline-block;
@@ -106,6 +103,3 @@
zoom: 1;
*display: inline;
}
-
-/* Looks much better when middle-aligned with surrounding text */
-.elgg-icon {vertical-align:middle} \ No newline at end of file
diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php
index af7b2be19..1fced0196 100644
--- a/views/default/css/elements/forms.php
+++ b/views/default/css/elements/forms.php
@@ -16,9 +16,7 @@ fieldset > div {
fieldset > div:last-child {
margin-bottom: 0;
}
-.elgg-form-footer {
-}
-.elgg-form-footer-alt {
+.elgg-form-alt > fieldset > .elgg-foot {
border-top: 1px solid #CCC;
padding: 10px 0;
}
@@ -251,215 +249,81 @@ input[type="radio"] {
margin-right:10px;
}
/* ***************************************
- Datepicker
+ DATE PICKER
**************************************** */
-
-#ui-datepicker-div, .ui-datepicker-inline, .ui-datepicker-calendar{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 14px;
- padding: 0;
- margin: 0;
- background: #E4ECF5;
- width: 220px;
- color: black;
-}
-#ui-datepicker-div {
- display: none;
- border: 1px solid #777;
- z-index: 9999; /*must have*/
-}
-.ui-datepicker-inline {
- float: left;
- display: block;
- border: 0;
-}
-.ui-datepicker-rtl {
- direction: rtl;
-}
-.ui-datepicker-dialog {
- padding: 5px !important;
- border: 4px ridge #ddd !important;
-}
-button.ui-datepicker-trigger {
- width: 25px;
-}
-img.ui-datepicker-trigger {
- margin: 2px;
- vertical-align: middle;
-}
-.ui-datepicker-prompt {
- float: left;
- padding: 2px;
- background: #ddd;
- color: #000;
-}
-* html .ui-datepicker-prompt {
- width: 185px;
-}
-.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
- clear: both;
- float: left;
- width: 218px;
- color: #fff;
-}
-.ui-datepicker-control {
- background: #400;
- padding: 2px 0px;
-}
-.ui-datepicker-links {
- background: #000;
- padding: 2px 0px;
-}
-.ui-datepicker-control, .ui-datepicker-links {
- font-weight: bold;
- font-size: 80%;
-}
-.ui-datepicker-links label { /* disabled links */
- padding: 2px 5px;
- color: #888;
-}
-.ui-datepicker-clear, .ui-datepicker-prev {
- float: left;
-}
-.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev {
- float: right;
- text-align: right;
-}
-.ui-datepicker-current {
- float: left;
- width: 30%;
- text-align: center;
-}
-.ui-datepicker-close, .ui-datepicker-next {
- float: right;
- text-align: right;
- padding: 0px 0px 2px 0px;
-}
-.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl {
- float: left;
- text-align: left;
+.ui-datepicker {
+ margin-top: 3px;
+ background-color: white;
+ border: 1px solid #0054A7;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
+ box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
+ overflow: hidden;
}
+
.ui-datepicker-header {
- padding: 1px 0 3px;
background: #4690D6;
- text-align: center;
- font-weight: bold;
- height: 1.3em;
- padding: 0 2px 3px 0;
-}
-.ui-datepicker-header select {
- background: #333;
- color: #fff;
- border: 0px;
- font-weight: bold;
-}
-.ui-datepicker {
- background: #ccc;
- text-align: center;
- font-size: 100%;
+ color: white;
+ padding: 2px 0;
+ border-bottom: 1px solid #0054A7;
}
-.ui-datepicker a {
- display: block;
- width: 30px;
-}
-.ui-datepicker-title-row {
- background: #777;
-}
-.ui-datepicker-days-row {
- background: #eee;
- color: #666;
-}
-.ui-datepicker-week-col {
- background: #777;
- color: #fff;
-}
-.ui-datepicker-days-cell {
- color: #000;
- border: 1px solid #ddd;
-}
-.ui-datepicker-days-cell a{
- display: block;
+.ui-datepicker-header a {
+ color: white;
}
-.ui-datepicker-week-end-cell {
- background: #ddd;
-}
-.ui-datepicker-title-row .ui-datepicker-week-end-cell {
- background: #777;
-}
-.ui-datepicker-days-cell-over {
- background: #fff;
- border: 1px solid #777;
-}
-.ui-datepicker-unselectable {
- color: #E4ECF5;
+.ui-datepicker-prev, .ui-datepicker-next {
+ position: absolute;
+ top: 5px;
+ cursor: pointer;
}
-.ui-datepicker-today {
- background: #4690D6 !important;
+.ui-datepicker-prev {
+ left: 6px;
}
-.ui-datepicker-current-day {
- background: #999 !important;
+.ui-datepicker-next {
+ right: 6px;
}
-.ui-datepicker-status {
- background: #ddd;
- width: 100%;
- font-size: 80%;
- text-align: center;
-}
-
-/* ________ Datepicker Links _______
-
-** Reset link properties and then override them with !important */
-#ui-datepicker-div a, .ui-datepicker-inline a {
- cursor: pointer;
- margin: 0;
- padding: 0;
- background: none;
- color: #000;
- align: center !important;
+.ui-datepicker-title {
+ line-height: 1.8em;
+ margin: 0 30px;
+ text-align: center;
+ font-weight: bold;
}
-.ui-datepicker-inline .ui-datepicker-links a {
- padding: 0 5px !important;
+.ui-datepicker-calendar {
+ margin: 4px;
}
-.ui-datepicker-control a, .ui-datepicker-links a {
- padding: 2px 5px !important;
- color: #eee !important;
+.ui-datepicker th {
+ color: #0054A7;
+ border: none;
+ font-weight: bold;
+ padding: 5px 6px;
+ text-align: center;
}
-.ui-datepicker-title-row a {
- color: #eee !important;
+.ui-datepicker td {
+ padding: 1px;
}
-.ui-datepicker-control a:hover {
- background: #fdd !important;
- color: #333 !important;
+.ui-datepicker td span, .ui-datepicker td a {
+ display: block;
+ padding: 2px;
+ line-height: 1.2em;
+ text-align: right;
+ text-decoration: none;
}
-.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover {
- background: #ddd !important;
- color: #333 !important;
+.ui-datepicker-calendar .ui-state-default {
+ border: 1px solid #ccc;
+ color: #4690D6;;
+ background: #fafafa;
}
-
-/* ___________ MULTIPLE MONTHS _________*/
-
-.ui-datepicker-multi .ui-datepicker {
- border: 1px solid #777;
+.ui-datepicker-calendar .ui-state-hover {
+ border: 1px solid #aaa;
+ color: #0054A7;
+ background: #eee;
}
-.ui-datepicker-one-month {
- float: left;
- width: 185px;
-}
-.ui-datepicker-new-row {
- clear: left;
-}
-
-/* ___________ IE6 IFRAME FIX ________ */
-
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
+.ui-datepicker-calendar .ui-state-active,
+.ui-datepicker-calendar .ui-state-active.ui-state-hover {
+ font-weight: bold;
+ border: 1px solid #0054A7;
+ color: #0054A7;
+ background: #E4ECF5;
}
-
diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php
index a5854f8c1..42d898439 100644
--- a/views/default/css/elements/layout.php
+++ b/views/default/css/elements/layout.php
@@ -53,7 +53,7 @@
top: 24px;
right: 20px;
max-width: 500px;
- z-index: 1000;
+ z-index: 2000;
}
.elgg-system-messages li {
margin-top: 10px;
@@ -75,9 +75,6 @@
.elgg-layout {
min-height: 360px;
}
-.elgg-layout-one-column {
- padding: 10px 0;
-}
.elgg-layout-one-sidebar {
background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/sidebar_background.gif) repeat-y right top;
}
diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php
index c4808478b..ef85d4dd5 100644
--- a/views/default/css/elements/modules.php
+++ b/views/default/css/elements/modules.php
@@ -2,6 +2,7 @@
Modules
*************************************** */
.elgg-module {
+ overflow: hidden;
margin-bottom: 20px;
}
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index d930d3a89..b5388715e 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -144,6 +144,11 @@
float: right;
}
+.elgg-menu-topbar .elgg-icon {
+ vertical-align: middle;
+ margin-top: -1px;
+}
+
.elgg-menu-topbar > li > a.elgg-topbar-logo {
margin-top: 0;
padding-left: 5px;
@@ -160,7 +165,7 @@
SITE MENU
*************************************** */
.elgg-menu-site {
- z-index: 7000;
+ z-index: 1;
}
.elgg-menu-site > li > a {
@@ -208,7 +213,7 @@
position: relative;
left: -1px;
width: 100%;
- z-index: 7000;
+ z-index: 1;
min-width: 150px;
border: 1px solid #999;
border-top: 0;
@@ -419,22 +424,29 @@ li:hover > .elgg-menu-site-more {
}
/* ***************************************
- ENTITY
+ ENTITY AND ANNOTATION
*************************************** */
-.elgg-menu-entity {
+<?php // height depends on line height/font size ?>
+.elgg-menu-entity, elgg-menu-annotation {
float: right;
margin-left: 15px;
font-size: 90%;
color: #aaa;
+ line-height: 16px;
+ height: 16px;
}
-.elgg-menu-entity > li {
- display: inline-block;
+.elgg-menu-entity > li, .elgg-menu-annotation > li {
margin-left: 15px;
}
-<?php // height depends on line height/font size ?>
-.elgg-menu-entity > li > a {
+.elgg-menu-entity > li > a, .elgg-menu-annotation > li > a {
color: #aaa;
- height: 18px;
+}
+<?php // need to override .elgg-menu-hz ?>
+.elgg-menu-entity > li > a, .elgg-menu-annotation > li > a {
+ display: block;
+}
+.elgg-menu-entity > li > span, .elgg-menu-annotation > li > span {
+ vertical-align: baseline;
}
/* ***************************************
@@ -476,11 +488,24 @@ li:hover > .elgg-menu-site-more {
margin-left: 15px;
font-size: 90%;
color: #aaa;
+ line-height: 16px;
+ height: 16px;
}
.elgg-menu-river > li {
display: inline-block;
margin-left: 5px;
}
+.elgg-menu-river > li > a {
+ color: #aaa;
+ height: 16px;
+}
+<?php // need to override .elgg-menu-hz ?>
+.elgg-menu-river > li > a {
+ display: block;
+}
+.elgg-menu-river > li > span {
+ vertical-align: baseline;
+}
/* ***************************************
SIDEBAR EXTRAS (rss, bookmark, etc)
diff --git a/views/default/css/elgg.php b/views/default/css/elgg.php
index 675af860d..4960e6ade 100644
--- a/views/default/css/elgg.php
+++ b/views/default/css/elgg.php
@@ -26,13 +26,12 @@ if ($old_css_view != elgg_get_config('viewpath')) {
Base CSS
* CSS reset
* core
- * helpers
+ * helpers (moved to end to have a higher priority)
* grid
*******************************************************************************/
echo elgg_view('css/elements/reset', $vars);
echo elgg_view('css/elements/core', $vars);
-echo elgg_view('css/elements/helpers', $vars);
echo elgg_view('css/elements/grid', $vars);
@@ -61,5 +60,9 @@ echo elgg_view('css/elements/layout', $vars);
echo elgg_view('css/elements/misc', $vars);
+// included last to have higher priority
+echo elgg_view('css/elements/helpers', $vars);
+
+
// in case plugins are still extending the old 'css' view, display it
echo elgg_view('css', $vars);
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index 3deec66bd..dc5e3d77f 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -11,7 +11,7 @@ $master_image = $vars['entity']->getIcon('master');
<div class="clearfix">
<img id="user-avatar" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" />
</div>
-<div>
+<div class="elgg-foot">
<?php
$coords = array('x1', 'x2', 'y1', 'y2');
foreach ($coords as $coord) {
@@ -25,7 +25,8 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
?>
</div>
<!-- grab the required js for icon cropping -->
-<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.imgareaselect-0.8.min.js"></script>
+<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.imgareaselect-0.9.8/scripts/jquery.imgareaselect.min.js"></script>
+<link rel="stylesheet" type="text/css" href="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.imgareaselect-0.9.8/css/imgareaselect-deprecated.css" media="screen" />
<?php //@todo JS 1.8: no ?>
<script type="text/javascript">
diff --git a/views/default/forms/avatar/upload.php b/views/default/forms/avatar/upload.php
index b099b8c4c..d91e8575e 100644
--- a/views/default/forms/avatar/upload.php
+++ b/views/default/forms/avatar/upload.php
@@ -10,7 +10,7 @@
<label><?php echo elgg_echo("avatar:upload"); ?></label><br />
<?php echo elgg_view("input/file",array('name' => 'avatar')); ?>
</div>
-<div class="elgg-form-footer">
+<div class="elgg-foot">
<?php echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid)); ?>
<?php echo elgg_view('input/submit', array('value' => elgg_echo('upload'))); ?>
</div>
diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php
index 40e574338..9acabf3ea 100644
--- a/views/default/forms/comments/add.php
+++ b/views/default/forms/comments/add.php
@@ -22,7 +22,7 @@ if (isset($vars['entity']) && elgg_is_logged_in()) {
<label><?php echo elgg_echo("generic_comments:add"); ?></label>
<?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?>
</div>
- <div>
+ <div class="elgg-foot">
<?php
echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
?>
diff --git a/views/default/forms/friends/collections/add.php b/views/default/forms/friends/collections/add.php
index 644c7adb9..04c87346b 100644
--- a/views/default/forms/friends/collections/add.php
+++ b/views/default/forms/friends/collections/add.php
@@ -42,7 +42,7 @@ echo elgg_view('input/friendspicker', array(
));
echo "</div>";
-echo "<div>";
+echo '<div class="elgg-foot">';
if (isset($vars['collection'])) {
echo elgg_view('input/hidden', array(
'name' => 'collection_id',
@@ -50,4 +50,4 @@ if (isset($vars['collection'])) {
));
}
echo elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('save')));
-echo "</div>";
+echo '</div>';
diff --git a/views/default/forms/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php
index efe6d7792..c3d8f231f 100644
--- a/views/default/forms/plugins/settings/save.php
+++ b/views/default/forms/plugins/settings/save.php
@@ -24,8 +24,8 @@ if (elgg_view_exists("{$type}settings/$plugin_id/edit")) {
echo elgg_view("plugins/$plugin_id/{$type}settings", $vars);
}
-echo "<div>";
+echo '<div class="elgg-foot">';
echo elgg_view('input/hidden', array('name' => 'plugin_id', 'value' => $plugin_id));
echo elgg_view('input/hidden', array('name' => 'user_guid', 'value' => $user_guid));
echo elgg_view('input/submit', array('value' => elgg_echo('save')));
-echo "</div>";
+echo '</div>';
diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php
index aaf9ac01e..222935344 100644
--- a/views/default/forms/profile/edit.php
+++ b/views/default/forms/profile/edit.php
@@ -59,7 +59,7 @@ if (is_array($profile_fields) && count($profile_fields) > 0) {
}
}
?>
-<div>
+<div class="elgg-foot">
<?php
echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
echo elgg_view('input/submit', array('value' => elgg_echo('save')));
diff --git a/views/default/forms/user/requestnewpassword.php b/views/default/forms/user/requestnewpassword.php
index 970938327..22357e728 100644
--- a/views/default/forms/user/requestnewpassword.php
+++ b/views/default/forms/user/requestnewpassword.php
@@ -15,7 +15,7 @@
<?php echo elgg_view('input/text', array('name' => 'username')); ?>
</div>
<?php echo elgg_view('input/captcha'); ?>
-<div>
+<div class="elgg-foot">
<?php echo elgg_view('input/submit', array('value' => elgg_echo('request'))); ?>
</div>
<?php //@todo JS 1.8: no ?>
diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php
index fcb93a6c6..66f8846e2 100644
--- a/views/default/forms/useradd.php
+++ b/views/default/forms/useradd.php
@@ -80,6 +80,6 @@ if ($admin_option) {
}
?>
-<div>
+<div class="elgg-foot">
<?php echo elgg_view('input/submit', array('value' => elgg_echo('register'))); ?>
</div> \ No newline at end of file
diff --git a/views/default/forms/usersettings/save.php b/views/default/forms/usersettings/save.php
index 35871144b..ea53f2571 100644
--- a/views/default/forms/usersettings/save.php
+++ b/views/default/forms/usersettings/save.php
@@ -1,7 +1,7 @@
<?php
$form_body = elgg_view("forms/account/settings");
-$form_body .= '<div class="elgg-form-footer-alt">';
+$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/widgets/save.php b/views/default/forms/widgets/save.php
index aeef37429..4ba911cb5 100644
--- a/views/default/forms/widgets/save.php
+++ b/views/default/forms/widgets/save.php
@@ -32,7 +32,7 @@ $body = <<<___END
<div>
$access
</div>
- <div>
+ <div class="elgg-foot">
$hidden
$submit
</div>
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 46889e89e..6f5c6e2da 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -8,6 +8,7 @@
* @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
*/
$user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity());
@@ -16,6 +17,11 @@ if (!in_array($size, array('topbar', 'tiny', 'small', 'medium', 'large', 'master
$size = 'medium';
}
+$class = "elgg-avatar elgg-avatar-$size";
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+
if (!($user instanceof ElggUser)) {
return true;
}
@@ -40,7 +46,7 @@ $icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $js style=\"back
$show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned());
?>
-<div class="elgg-avatar elgg-avatar-<?php echo $size; ?>">
+<div class="<?php echo $class; ?>">
<?php
if ($show_menu) {
diff --git a/views/default/input/access.php b/views/default/input/access.php
index 40a93aaa4..137eea288 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -3,15 +3,21 @@
* Elgg access level input
* Displays a dropdown input field
*
- * @uses $vars['value'] The current value, if any
- * @uses $vars['options_values']
- * @uses $vars['name'] The name of the input field
- * @uses $vars['entity'] Optional. The entity for this access control (uses access_id)
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['options_values'] Array of value => label pairs (overrides default)
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['entity'] Optional. The entity for this access control (uses access_id)
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-access {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-access";
+}
+
$defaults = array(
- 'class' => 'elgg-input-access',
- 'disabled' => FALSE,
+ 'disabled' => false,
'value' => get_default_access(),
'options_values' => get_write_access_array(),
);
diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php
index 0a4057ddf..421541e24 100644
--- a/views/default/input/autocomplete.php
+++ b/views/default/input/autocomplete.php
@@ -7,20 +7,25 @@
*
* @todo This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page.
*
- * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype)
+ * @uses $vars['value'] Current value for the text input
+ * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype)
* @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user.
- *
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-autocomplete {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-autocomplete";
+}
+
$defaults = array(
- 'class' => '',
'value' => '',
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
-$vars['class'] = trim("elgg-input-autocomplete {$vars['class']}");
-
$ac_url_params = http_build_query(array(
'match_on' => $vars['match_on'],
'match_owner' => $vars['match_owner'],
@@ -38,4 +43,3 @@ elgg.provide('elgg.autocomplete');
elgg.autocomplete.url = "<?php echo elgg_get_site_url() . 'livesearch?' . $ac_url_params; ?>";
</script>
<input type="text" <?php echo elgg_format_attributes($vars); ?> />
-
diff --git a/views/default/input/button.php b/views/default/input/button.php
index 3122068ca..c21989919 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -6,20 +6,21 @@
* @subpackage Core
*
* @uses $vars['src'] Src of an image
- * @uses $vars['class'] Class to add to elgg-button
- *
- * @todo Handle classes better
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-button {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-button";
+}
+
$defaults = array(
'type' => 'button',
- 'class' => '',
);
$vars = array_merge($defaults, $vars);
-$vars['class'] = trim("elgg-button {$vars['class']}");
-
switch ($vars['type']) {
case 'button':
case 'reset':
@@ -36,4 +37,4 @@ if (strpos($vars['src'], elgg_get_site_url()) === false) {
$vars['src'] = "";
}
?>
-<input <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input <?php echo elgg_format_attributes($vars); ?> />
diff --git a/views/default/input/calendar.php b/views/default/input/calendar.php
index 553a254ce..52c84ff82 100644
--- a/views/default/input/calendar.php
+++ b/views/default/input/calendar.php
@@ -1,6 +1,6 @@
<?php
-// @deprecated Use datepicker instead.
+// @deprecated Use input/date instead.
-elgg_deprecated_notice('view: input/calendar is deprecated by input/datepicker', 1.8);
+elgg_deprecated_notice('view: input/calendar is deprecated by input/date', 1.8);
echo elgg_view('input/datepicker', $vars); \ No newline at end of file
diff --git a/views/default/input/captcha.php b/views/default/input/captcha.php
index 210e0f50a..1c2e22aaa 100644
--- a/views/default/input/captcha.php
+++ b/views/default/input/captcha.php
@@ -1,6 +1,6 @@
<?php
/**
- * This view provides a hook for third parties to provide captcha behaviour.
+ * This view provides a hook for third parties to provide a CAPTCHA.
*
* @package Elgg
* @subpackage Core
diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php
index 898fe8458..3dc75c6c3 100644
--- a/views/default/input/checkbox.php
+++ b/views/default/input/checkbox.php
@@ -10,13 +10,20 @@
* Pass input tag attributes as key value pairs. For a list of allowable
* attributes, see http://www.w3schools.com/tags/tag_input.asp
*
- * @uses mixed $vars['default'] The default value to submit if not checked.
- * Optional, defaults to 0. Set to false for no default.
+ * @uses $vars['default'] The default value to submit if not checked.
+ * Optional, defaults to 0. Set to false for no default.
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-checkbox {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-checkbox";
+}
+
$defaults = array(
- 'class' => 'elgg-input-checkbox',
'default' => 0,
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
@@ -29,5 +36,4 @@ if (isset($vars['name']) && $default !== false) {
}
?>
-
-<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
+<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> />
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index c78fe4db0..985858b85 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -15,68 +15,77 @@
* @package Elgg
* @subpackage Core
*
- * @uses string $vars['name'] The name of the input fields
- * (Forced to an array by appending [])
- * @uses array $vars['options'] An array of strings representing the
- * label => option for the each checkbox field
- * @uses string $vars['id'] The id for each input field. Optional.
- * (Only use this with a single value.)
- * @uses string $vars['default'] The default value to send if nothing is checked.
- * Optional, defaults to 0. Set to FALSE for no default.
- * @uses bool $vars['disabled'] Make all input elements disabled. Optional.
- * @uses string $vars['value'] The current value. Optional.
- * @uses string $vars['class'] Additional class of the list. Optional.
- * @uses string $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
+ * @uses string $vars['name'] The name of the input fields
+ * (Forced to an array by appending [])
+ * @uses array $vars['options'] An array of strings representing the
+ * label => option for the each checkbox field
+ * @uses string $vars['default'] The default value to send if nothing is checked.
+ * Optional, defaults to 0. Set to FALSE for no default.
+ * @uses bool $vars['disabled'] Make all input elements disabled. Optional.
+ * @uses string $vars['value'] The current value. Single value or array. Optional.
+ * @uses string $vars['class'] Additional class of the list. Optional.
+ * @uses string $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
*
*/
-$additional_class = elgg_extract('class', $vars);
-$align = elgg_extract('align', $vars, 'vertical');
-$value = (isset($vars['value'])) ? $vars['value'] : NULL;
-$value_array = (is_array($value)) ? array_map('elgg_strtolower', $value) : array(elgg_strtolower($value));
-$name = (isset($vars['name'])) ? $vars['name'] : '';
-$options = (isset($vars['options']) && is_array($vars['options'])) ? $vars['options'] : array();
-$default = (isset($vars['default'])) ? $vars['default'] : 0;
+$defaults = array(
+ 'align' => 'vertical',
+ 'value' => array(),
+ 'default' => 0,
+ 'disabled' => false,
+ 'options' => array(),
+ 'name' => '',
+);
-$id = (isset($vars['id'])) ? $vars['id'] : '';
-$disabled = (isset($vars['disabled'])) ? $vars['disabled'] : FALSE;
-$js = (isset($vars['js'])) ? $vars['js'] : '';
+$vars = array_merge($defaults, $vars);
-$class = "elgg-input-checkboxes elgg-$align";
-if ($additional_class) {
- $class = " $additional_class";
+$class = "elgg-input-checkboxes elgg-{$vars['align']}";
+if (isset($vars['class'])) {
+ $class .= " {$vars['class']}";
+ unset($vars['class']);
}
-if ($options && count($options) > 0) {
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+ unset($vars['id']);
+ unset($vars['internalid']);
+}
+
+if (is_array($vars['value'])) {
+ $values = array_map('elgg_strtolower', $vars['value']);
+} else {
+ $values = array(elgg_strtolower($vars['value']));
+}
+
+$input_vars = $vars;
+$input_vars['default'] = false;
+if ($vars['name']) {
+ $input_vars['name'] = "{$vars['name']}[]";
+}
+unset($input_vars['align']);
+unset($input_vars['options']);
+
+if (count($vars['options']) > 0) {
// include a default value so if nothing is checked 0 will be passed.
- if ($name && $default !== FALSE) {
- echo "<input type=\"hidden\" name=\"$name\" value=\"$default\" />";
+ if ($vars['name'] && $vars['default'] !== false) {
+ echo "<input type=\"hidden\" name=\"{$vars['name']}\" value=\"{$vars['default']}\" />";
}
- echo "<ul class=\"$class\">";
- foreach ($options as $label => $option) {
+ echo "<ul class=\"$class\" $id>";
+ foreach ($vars['options'] as $label => $value) {
// @deprecated 1.8 Remove in 1.9
if (is_integer($label)) {
elgg_deprecated_notice('$vars[\'options\'] must be an associative array in input/checkboxes', 1.8);
- $label = $option;
+ $label = $value;
}
- $input_vars = array(
- 'checked' => in_array(elgg_strtolower($option), $value_array),
- 'value' => $option,
- 'disabled' => $disabled,
- 'id' => $id,
- 'js' => $js,
- 'default' => false,
- );
-
- if ($name) {
- $input_vars['name'] = "{$name}[]";
- }
+ $input_vars['checked'] = in_array(elgg_strtolower($value), $values);
+ $input_vars['value'] = $value;
$input = elgg_view('input/checkbox', $input_vars);
- echo "<li><label>{$input}{$label}</label></li>";
+ echo "<li><label>$input$label</label></li>";
}
echo '</ul>';
-} \ No newline at end of file
+}
diff --git a/views/default/input/date.php b/views/default/input/date.php
index afc40e899..ceeb2105c 100644
--- a/views/default/input/date.php
+++ b/views/default/input/date.php
@@ -3,28 +3,54 @@
* Elgg date input
* Displays a text field with a popup date picker.
*
- * @package Elgg
- * @subpackage Core
+ * The elgg.ui JavaScript library initializes the jQueryUI datepicker based
+ * on the CSS class .elgg-input-date. It uses the ISO 8601 standard for date
+ * representation: yyyy-mm-dd.
*
- * @uses $vars['value'] The current value, if any (as a unix timestamp)
+ * Unix timestamps are supported by setting the 'timestamp' parameter to true.
+ * The date is still displayed to the user in a text format but is submitted as
+ * a unix timestamp in seconds.
*
+ * @uses $vars['value'] The current value, if any (as a unix timestamp)
+ * @uses $vars['class'] Additional CSS class
+ * @uses $vars['timestamp'] Store as a Unix timestamp in seconds. Default = false
+ * Note: you cannot use an id with the timestamp option.
*/
+//@todo popup_calendar deprecated in 1.8. Remove in 2.0
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-date popup_calendar {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-date popup_calendar";
+}
+
$defaults = array(
'value' => '',
- 'class' => '',
+ 'disabled' => false,
+ 'timestamp' => false,
);
$vars = array_merge($defaults, $vars);
-//@todo popup_calendar deprecated in 1.8. Remove in 2.0
-$vars['class'] = trim("elgg-input-date popup_calendar {$vars['class']}");
+$timestamp = $vars['timestamp'];
+unset($vars['timestamp']);
-if ($vars['value'] > 86400) {
- $vars['value'] = date('n/d/Y', $vars['value']);
+if ($timestamp) {
+ echo elgg_view('input/hidden', array(
+ 'name' => $vars['name'],
+ 'value' => $vars['value'],
+ ));
+
+ $vars['class'] = "{$vars['class']} elgg-input-timestamp";
+ $vars['id'] = $vars['name'];
+ unset($vars['name']);
+ unset($vars['internalname']);
}
-$attributes = elgg_format_attributes($vars);
+// convert timestamps to text for display
+if (is_numeric($vars['value'])) {
+ $vars['value'] = gmdate('Y/m/d', $vars['value']);
+}
-?>
-<input type="text" <?php echo $attributes; ?> /> \ No newline at end of file
+$attributes = elgg_format_attributes($vars);
+echo "<input type=\"text\" $attributes />";
diff --git a/views/default/input/dropdown.php b/views/default/input/dropdown.php
index fccccb888..4673a9301 100644
--- a/views/default/input/dropdown.php
+++ b/views/default/input/dropdown.php
@@ -3,7 +3,7 @@
* Elgg dropdown input
* Displays a dropdown (select) input field
*
- * @warning Default values of FALSE or NULL will match '' (empty string) and not 0.
+ * @warning Default values of FALSE or NULL will match '' (empty string) but not 0.
*
* @package Elgg
* @subpackage Core
@@ -14,13 +14,24 @@
* where "value" is an internal name and "option" is
* the value displayed on the button. Replaces
* $vars['options'] when defined.
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-dropdown {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-dropdown";
+}
+
$defaults = array(
- 'class' => 'elgg-input-dropdown',
- 'disabled' => FALSE,
+ 'disabled' => false,
+ 'value' => '',
+ 'options_values' => array(),
+ 'options' => array(),
);
+$vars = array_merge($defaults, $vars);
+
$options_values = $vars['options_values'];
unset($vars['options_values']);
@@ -30,10 +41,8 @@ unset($vars['options']);
$value = $vars['value'];
unset($vars['value']);
-$attrs = array_merge($defaults, $vars);
-
?>
-<select <?php echo elgg_format_attributes($attrs); ?>>
+<select <?php echo elgg_format_attributes($vars); ?>>
<?php
if ($options_values) {
diff --git a/views/default/input/email.php b/views/default/input/email.php
index a6097143a..190fb88c6 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -5,11 +5,18 @@
*
* @package Elgg
* @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-email {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-email";
+}
+
$defaults = array(
- 'class' => 'elgg-input-email',
- 'disabled' => FALSE,
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
diff --git a/views/default/input/file.php b/views/default/input/file.php
index 4c42042e8..452fe72b9 100644
--- a/views/default/input/file.php
+++ b/views/default/input/file.php
@@ -7,20 +7,25 @@
* @subpackage Core
*
* @uses $vars['value'] The current value if any
- *
+ * @uses $vars['class'] Additional CSS class
*/
if (!empty($vars['value'])) {
echo elgg_echo('fileexists') . "<br />";
}
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-file {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-file";
+}
+
$defaults = array(
- 'class' => 'elgg-input-file',
- 'disabled' => FALSE,
- 'size' => 30,
+ 'disabled' => false,
+ 'size' => 30,
);
$attrs = array_merge($defaults, $vars);
?>
-<input type="file" <?php echo elgg_format_attributes($attrs)?> /> \ No newline at end of file
+<input type="file" <?php echo elgg_format_attributes($attrs); ?> />
diff --git a/views/default/input/form.php b/views/default/input/form.php
index 6d5824cd8..df30133b3 100644
--- a/views/default/input/form.php
+++ b/views/default/input/form.php
@@ -1,14 +1,17 @@
<?php
/**
* Create a form for data submission.
- * Use this view for forms rather than creating a form tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
+ * Use this view for forms as it provides protection against CSRF attacks.
*
* @package Elgg
* @subpackage Core
*
* @uses $vars['body'] The body of the form (made up of other input/xxx views and html
+ * @uses $vars['action'] The action URL of the form
+ * @uses $vars['method'] The submit method: post (default) or get
+ * @uses $vars['enctype'] Set to 'multipart/form-data' if uploading a file
* @uses $vars['disable_security'] turn off CSRF security by setting to true
+ * @uses $vars['class'] Additional class for the form
*/
$defaults = array(
@@ -18,6 +21,12 @@ $defaults = array(
$vars = array_merge($defaults, $vars);
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-form {$vars['class']}";
+} else {
+ $vars['class'] = 'elgg-form';
+}
+
$vars['action'] = elgg_normalize_url($vars['action']);
$vars['method'] = strtolower($vars['method']);
@@ -32,4 +41,4 @@ unset($vars['disable_security']);
$attributes = elgg_format_attributes($vars);
-echo "<form $attributes><fieldset>$body</fieldset></form>"; \ No newline at end of file
+echo "<form $attributes><fieldset>$body</fieldset></form>";
diff --git a/views/default/input/location.php b/views/default/input/location.php
index d7ae2bbbd..4cf05c72a 100644
--- a/views/default/input/location.php
+++ b/views/default/input/location.php
@@ -4,11 +4,17 @@
*
* @uses $vars['entity'] The ElggEntity that has a location
* @uses $vars['value'] The default value for the location
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-location {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-location";
+}
+
$defaults = array(
- 'class' => 'elgg-input-location',
- 'disabled' => FALSE,
+ 'disabled' => false,
);
if (isset($vars['entity'])) {
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index bd61b86ce..2b1462635 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -1,29 +1,40 @@
<?php
/**
* Elgg long text input
- * Displays a long text input field
+ * Displays a long text input field that can use WYSIWYG editor
*
* @package Elgg
* @subpackage Core
*
- * @uses $vars['value'] The current value, if any - will be html encoded
+ * @uses $vars['value'] The current value, if any - will be html encoded
* @uses $vars['disabled'] Is the input field disabled?
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-longtext {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-longtext";
+}
+
$defaults = array(
- 'class' => 'elgg-input-longtext',
+ 'value' => '',
'id' => 'elgg-input-' . rand(), //@todo make this more robust
);
-// work around for deprecation code in elgg_views()
-unset($vars['internalname']);
-unset($vars['internalid']);
-
$vars = array_merge($defaults, $vars);
+$value = $vars['value'];
+unset($vars['value']);
+
echo elgg_view_menu('longtext', array(
'sort_by' => 'priority',
'class' => 'elgg-menu-hz',
'id' => $vars['id'],
));
-echo elgg_view('input/plaintext', $vars);
+
+?>
+
+<textarea <?php echo elgg_format_attributes($vars); ?>>
+<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); ?>
+</textarea>
diff --git a/views/default/input/password.php b/views/default/input/password.php
index 62c8fb53d..45f2b20a6 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -7,17 +7,22 @@
* @subpackage Core
*
* @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['name'] The name of the input field
- *
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-password {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-password";
+}
+
$defaults = array(
- 'class' => 'elgg-input-password',
- 'disabled' => FALSE,
+ 'disabled' => false,
+ 'value' => '',
);
$attrs = array_merge($defaults, $vars);
?>
-<input type="password" <?php echo elgg_format_attributes($attrs); ?> /> \ No newline at end of file
+<input type="password" <?php echo elgg_format_attributes($attrs); ?> />
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
index 3be9ed0d8..cd0aaafcf 100644
--- a/views/default/input/plaintext.php
+++ b/views/default/input/plaintext.php
@@ -6,23 +6,30 @@
* @package Elgg
* @subpackage Core
*
- * @uses $vars['value'] The current value, if any
- * @uses $vars['name'] The name of the input field
- * @uses $vars['class']
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
* @uses $vars['disabled']
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-plaintext {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-plaintext";
+}
+
$defaults = array(
- 'class' => 'elgg-input-textarea',
- 'disabled' => FALSE,
+ 'value' => '',
+ 'disabled' => false,
);
+$vars = array_merge($defaults, $vars);
+
$value = $vars['value'];
unset($vars['value']);
-$attrs = array_merge($defaults, $vars);
?>
-<textarea <?php echo elgg_format_attributes($attrs); ?>>
+<textarea <?php echo elgg_format_attributes($vars); ?>>
<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); ?>
</textarea>
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
index 0ad28423f..a8b278efd 100644
--- a/views/default/input/radio.php
+++ b/views/default/input/radio.php
@@ -10,24 +10,43 @@
* @package Elgg
* @subpackage Core
*
- * @uses $vars['value'] The current value, if any
- * @uses $vars['name'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the
- * radio field as "label" => option
- * @uses $vars['class'] Additional class of the list. Optional.
- * @uses $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the
+ * radio field as "label" => option
+ * @uses $vars['class'] Additional class of the list. Optional.
+ * @uses $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
*/
-$additional_class = elgg_extract('class', $vars);
-$align = elgg_extract('align', $vars, 'vertical');
-$class = "elgg-input-radio elgg-$align";
-if ($additional_class) {
- $class = " $additional_class";
+$defaults = array(
+ 'align' => 'vertical',
+ 'value' => array(),
+ 'disabled' => false,
+ 'options' => array(),
+ 'name' => '',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+ unset($vars['id']);
+ unset($vars['internalid']);
+}
+
+$class = "elgg-input-radios elgg-{$vars['align']}";
+if (isset($vars['class'])) {
+ $class .= " {$vars['class']}";
unset($vars['class']);
}
+unset($vars['align']);
+$vars['class'] = 'elgg-input-radio';
-if (isset($vars['align'])) {
- unset($vars['align']);
+if (is_array($vars['value'])) {
+ $vars['value'] = array_map('elgg_strtolower', $vars['value']);
+} else {
+ $vars['value'] = array(elgg_strtolower($vars['value']));
}
$options = $vars['options'];
@@ -37,10 +56,10 @@ $value = $vars['value'];
unset($vars['value']);
if ($options && count($options) > 0) {
- echo "<ul class=\"$class\">";
+ echo "<ul class=\"$class\" $id>";
foreach ($options as $label => $option) {
- $vars['checked'] = elgg_strtolower($option) == elgg_strtolower($value);
+ $vars['checked'] = in_array(elgg_strtolower($option), $value);
$vars['value'] = $option;
$attributes = elgg_format_attributes($vars);
diff --git a/views/default/input/tag.php b/views/default/input/tag.php
index a78ec3163..8893a18ff 100644
--- a/views/default/input/tag.php
+++ b/views/default/input/tag.php
@@ -5,13 +5,21 @@
* Accepts a single tag value
*
* @uses $vars['value'] The default value for the tag
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-tag {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-tag";
+}
+
$defaults = array(
- 'class' => 'elgg-input-tag',
- 'disabled' => FALSE,
+ 'value' => '',
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
+?>
-echo elgg_view('input/text', $vars); \ No newline at end of file
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/views/default/input/tags.php b/views/default/input/tags.php
index 7cda958aa..261cf9f97 100644
--- a/views/default/input/tags.php
+++ b/views/default/input/tags.php
@@ -4,14 +4,20 @@
* Displays a tag input field
*
* @uses $vars['disabled']
- * @uses $vars['class']
+ * @uses $vars['class'] Additional CSS class
* @uses $vars['value'] Array of tags or a string
* @uses $vars['entity'] Optional. Entity whose tags are being displayed (metadata ->tags)
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-tags {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-tags";
+}
+
$defaults = array(
- 'class' => 'elgg-input-tags',
- 'disabled' => FALSE,
+ 'value' => '',
+ 'disabled' => false,
);
if (isset($vars['entity'])) {
diff --git a/views/default/input/text.php b/views/default/input/text.php
index e5af723be..707a50179 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -5,11 +5,19 @@
*
* @package Elgg
* @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-text {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-text";
+}
+
$defaults = array(
- 'class' => 'elgg-input-text',
- 'disabled' => FALSE,
+ 'value' => '',
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
diff --git a/views/default/input/url.php b/views/default/input/url.php
index a93db718f..e97a316d8 100644
--- a/views/default/input/url.php
+++ b/views/default/input/url.php
@@ -5,10 +5,19 @@
*
* @package Elgg
* @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
*/
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-url {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-url";
+}
+
$defaults = array(
- 'class' => 'elgg-input-url',
+ 'value' => '',
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php
index 0dc6dd6b3..0fa391433 100644
--- a/views/default/navigation/menu/default.php
+++ b/views/default/navigation/menu/default.php
@@ -9,7 +9,7 @@
*/
// we want css classes to use dashes
-$vars['name'] = str_replace('_', '-', $vars['name']);
+$vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']);
$headers = elgg_extract('show_section_headers', $vars, false);
$class = "elgg-menu elgg-menu-{$vars['name']}";
diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php
index f3e46315b..5d6a7e367 100644
--- a/views/default/navigation/menu/elements/item.php
+++ b/views/default/navigation/menu/elements/item.php
@@ -16,8 +16,8 @@ if ($item->getSelected()) {
$children = $item->getChildren();
if ($children) {
- $item->setLinkClass($link_class);
- $item->setLinkClass('elgg-menu-parent');
+ $item->addLinkClass($link_class);
+ $item->addLinkClass('elgg-menu-parent');
}
$item_class = $item->getItemClass();
diff --git a/views/default/object/default.php b/views/default/object/default.php
index 27bb1890e..a50f19387 100644
--- a/views/default/object/default.php
+++ b/views/default/object/default.php
@@ -42,6 +42,7 @@ $params = array(
'subtitle' => $subtitle,
'tags' => $vars['entity']->tags,
);
+$params = $params + $vars;
$body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($icon, $body);
diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php
index d3a6ea862..10cf0b148 100644
--- a/views/default/object/elements/summary.php
+++ b/views/default/object/elements/summary.php
@@ -3,15 +3,15 @@
* Object summary
*
* Sample output
- * <ul class="elgg-menu elgg-menu-metadata"><li>Public</li><li>Like this</li></ul>
+ * <ul class="elgg-menu elgg-menu-entity"><li>Public</li><li>Like this</li></ul>
* <h3><a href="">Title</a></h3>
* <p class="elgg-subtext">Posted 3 hours ago by George</p>
* <p class="elgg-tags"><a href="">one</a>, <a href="">two</a></p>
- * <div class="elgg-list-content">Excerpt text</div>
+ * <div class="elgg-content">Excerpt text</div>
*
* @uses $vars['entity'] ElggEntity
* @uses $vars['title'] Title link (optional) false = no title, '' = default
- * @uses $vars['metadata'] HTML for entity metadata and actions (optional)
+ * @uses $vars['metadata'] HTML for entity menu and metadata (optional)
* @uses $vars['subtitle'] HTML for the subtitle (optional)
* @uses $vars['tags'] HTML for the tags (optional)
* @uses $vars['content'] HTML for the entity content (optional)
@@ -49,5 +49,5 @@ echo "<h3>$title_link</h3>";
echo "<div class=\"elgg-subtext\">$subtitle</div>";
echo $tags;
if ($content) {
- echo "<div class=\"elgg-list-content\">$content</div>";
+ echo "<div class=\"elgg-content\">$content</div>";
}
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php
index 51fb69d17..08da89c01 100644
--- a/views/default/object/plugin/advanced.php
+++ b/views/default/object/plugin/advanced.php
@@ -98,7 +98,7 @@ $options = array(
if ($active) {
$active_class = 'elgg-state-active';
$action = 'deactivate';
- $options['text'] = elgg_echo('deactivate');
+ $options['text'] = elgg_echo('admin:plugins:deactivate');
$options['class'] = "elgg-button elgg-button-cancel";
if (!$can_activate) {
@@ -108,7 +108,7 @@ if ($active) {
} else if ($can_activate) {
$active_class = 'elgg-state-inactive';
$action = 'activate';
- $options['text'] = elgg_echo('activate');
+ $options['text'] = elgg_echo('admin:plugins:activate');
$options['class'] = "elgg-button elgg-button-submit";
} else {
$active_class = 'elgg-state-inactive';
@@ -189,7 +189,7 @@ if ($files) {
?>
-<div class="<?php echo $draggable; ?> elgg-plugin <?php echo $active_class ?>" id="elgg-plugin-<?php echo $plugin->guid; ?>">
+<div class="<?php echo $draggable; ?> elgg-plugin <?php echo $active_class ?>" id="<?php echo $plugin->getID(); ?>">
<div class="elgg-image-block">
<div class="elgg-image-alt">
<?php if ($links) : ?>
@@ -242,7 +242,7 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/plugin/invalid.php b/views/default/object/plugin/invalid.php
index 9e239b7ca..f29ee8d12 100644
--- a/views/default/object/plugin/invalid.php
+++ b/views/default/object/plugin/invalid.php
@@ -29,7 +29,7 @@ $error = $plugin->getError();
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php
index 83a2f5767..abf2154fc 100644
--- a/views/default/object/widget/elements/controls.php
+++ b/views/default/object/widget/elements/controls.php
@@ -12,7 +12,8 @@ $show_edit = elgg_extract('show_edit', $vars, true);
$params = array(
'text' => ' ',
'href' => "#elgg-widget-content-$widget->guid",
- 'class' => 'elgg-widget-collapse-button elgg-toggler',
+ 'class' => 'elgg-widget-collapse-button',
+ 'rel' => 'toggle',
);
$collapse_link = elgg_view('output/url', $params);
@@ -33,7 +34,8 @@ if ($widget->canEdit()) {
'text' => elgg_view_icon('settings-alt'),
'title' => elgg_echo('widget:edit'),
'href' => "#widget-edit-$widget->guid",
- 'class' => "elgg-toggler elgg-widget-edit-button",
+ 'class' => "elgg-widget-edit-button",
+ 'rel' => 'toggle',
);
$edit_link = elgg_view('output/url', $params);
}
diff --git a/views/default/output/date.php b/views/default/output/date.php
index fda7668e7..7c98dddc9 100644
--- a/views/default/output/date.php
+++ b/views/default/output/date.php
@@ -6,10 +6,12 @@
* @package Elgg
* @subpackage Core
*
- * @uses $vars['value'] A UNIX epoch timestamp
- *
+ * @uses $vars['value'] Date as text or a Unix timestamp in seconds
*/
-if ($vars['value'] > 86400) {
- echo date("n/d/Y", $vars['value']);
-} \ No newline at end of file
+// convert timestamps to text for display
+if (is_numeric($vars['value'])) {
+ $vars['value'] = gmdate('Y/m/d', $vars['value']);
+}
+
+echo $vars['value'];
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index e86b9f885..f03eb1109 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -2,7 +2,17 @@
/**
* Gallery view
*
- * @uses $vars['items']
+ * Implemented as an unorder list
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['gallery_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
*/
$items = $vars['items'];
@@ -19,6 +29,16 @@ $pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
+$gallery_class = 'elgg-gallery';
+if (isset($vars['gallery_class'])) {
+ $gallery_class = "$gallery_class {$vars['gallery_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
@@ -33,10 +53,15 @@ if ($position == 'before' || $position == 'both') {
}
?>
-<ul class="elgg-gallery">
+<ul class="<?php echo $gallery_class; ?>">
<?php
foreach ($items as $item) {
- echo '<li>';
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ echo "<li id=\"$id\" class=\"$item_class\">";
echo elgg_view_list_item($item, $vars);
echo "</li>";
}
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index ae951c89f..c83fa0966 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -27,12 +27,12 @@ $position = elgg_extract('position', $vars, 'after');
$list_class = 'elgg-list';
if (isset($vars['list_class'])) {
- $list_class = "{$vars['list_class']} $list_class";
+ $list_class = "$list_class {$vars['list_class']}";
}
-$item_class = 'elgg-list-item';
+$item_class = 'elgg-item';
if (isset($vars['item_class'])) {
- $item_class = "{$vars['item_class']} $item_class";
+ $item_class = "$item_class {$vars['item_class']}";
}
$html = "";
diff --git a/views/default/page/default.php b/views/default/page/default.php
index 9effce1ec..0e27cda52 100644
--- a/views/default/page/default.php
+++ b/views/default/page/default.php
@@ -17,7 +17,7 @@ if (elgg_get_context() == 'admin') {
elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
elgg_admin_add_plugin_settings_menu();
elgg_unregister_css('elgg');
- echo elgg_view('page/shells/admin', $vars);
+ echo elgg_view('page/admin', $vars);
return true;
}
diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php
index 048edec40..8776f07a7 100644
--- a/views/default/page/elements/head.php
+++ b/views/default/page/elements/head.php
@@ -40,7 +40,7 @@ $release = get_version(true);
<meta name="ElggRelease" content="<?php echo $release; ?>" />
<meta name="ElggVersion" content="<?php echo $version; ?>" />
<title><?php echo $title; ?></title>
- <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
+ <?php echo elgg_view('page/elements/shortcut_icon', $vars); ?>
<?php foreach ($css as $link) { ?>
<link rel="stylesheet" href="<?php echo $link; ?>" type="text/css" />
diff --git a/views/default/page/elements/header_logo.php b/views/default/page/elements/header_logo.php
index 4295deaa4..7fe721c40 100644
--- a/views/default/page/elements/header_logo.php
+++ b/views/default/page/elements/header_logo.php
@@ -1,13 +1,15 @@
<?php
/**
* Elgg header logo
- * The logo to display in elgg-header.
*/
$site = elgg_get_site_entity();
$site_name = $site->name;
+$site_url = elgg_get_site_url();
?>
<h1>
- <a class="elgg-heading-site" href="<?php echo elgg_get_site_url(); ?>"><?php echo $site_name; ?></a>
+ <a class="elgg-heading-site" href="<?php echo $site_url; ?>">
+ <?php echo $site_name; ?>
+ </a>
</h1>
diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php
index c525a38aa..fc7f0f6d2 100644
--- a/views/default/page/elements/owner_block.php
+++ b/views/default/page/elements/owner_block.php
@@ -15,7 +15,7 @@ $owner = elgg_get_page_owner_entity();
if ($owner instanceof ElggGroup ||
($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) {
- $header = elgg_view_entity($owner, false);
+ $header = elgg_view_entity($owner, array('full_view' => false));
$body = elgg_view_menu('owner_block', array('entity' => $owner));
diff --git a/views/default/page/elements/shortcut_icon.php b/views/default/page/elements/shortcut_icon.php
new file mode 100644
index 000000000..12fe9c1f8
--- /dev/null
+++ b/views/default/page/elements/shortcut_icon.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Displays the default shortcut icon
+ */
+?>
+<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> \ No newline at end of file
diff --git a/views/default/page/elements/wrapper.php b/views/default/page/elements/wrapper.php
new file mode 100644
index 000000000..61828832d
--- /dev/null
+++ b/views/default/page/elements/wrapper.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Deprecated content wrapper view from Elgg 1.5 through 1.7
+ *
+ * @uses $vars['body'] The content to display inside content wrapper
+ * @uses $vars['subclass'] Additional css class
+ */
+
+elgg_deprecated_notice("The 'page_elements/contentwrapper' has been deprecated", 1.8);
+?>
+
+<div class="contentWrapper<?php
+
+ if (isset($vars['subclass'])) {
+ echo ' ' . $vars['subclass'];
+ }
+
+?>">
+<?php
+ echo $vars['body'];
+?>
+</div>
diff --git a/views/default/page/layouts/admin.php b/views/default/page/layouts/admin.php
index 890c8a06e..8dbdc27e6 100644
--- a/views/default/page/layouts/admin.php
+++ b/views/default/page/layouts/admin.php
@@ -21,6 +21,11 @@
<div class="elgg-main elgg-body">
<div class="elgg-head">
<?php
+ echo elgg_view_menu('title', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+
if (isset($vars['title'])) {
echo elgg_view_title($vars['title']);
}
diff --git a/views/default/page/layouts/content.php b/views/default/page/layouts/content.php
index 35d695f0a..c406c9faf 100644
--- a/views/default/page/layouts/content.php
+++ b/views/default/page/layouts/content.php
@@ -10,7 +10,6 @@
* @uses $vars['filter'] HTML of the content area filter (override)
* @uses $vars['title'] Title text (override)
* @uses $vars['context'] Page context (override)
- * @uses $vars['buttons'] Content header buttons (override)
* @uses $vars['filter_context'] Filter context: everyone, friends, mine
* @uses $vars['class'] Additional class to apply to layout
*/
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
index 403da8a0a..1e66e52db 100644
--- a/views/default/page/layouts/content/header.php
+++ b/views/default/page/layouts/content/header.php
@@ -2,51 +2,42 @@
/**
* Main content header
*
- * This includes a title and a new content button by default
+ * Title and title menu
*
* @uses $vars['header_override'] HTML for overriding the default header (override)
* @uses $vars['title'] Title text (override)
* @uses $vars['context'] Page context (override)
- * @uses $vars['buttons'] Content header buttons (override)
*/
+if (isset($vars['buttons'])) {
+ // it was a bad idea to implement buttons with a pass through
+ elgg_deprecated_notice("Use elgg_register_menu_item() to register for the title menu", 1.0);
+}
+
if (isset($vars['header_override'])) {
echo $vars['header_override'];
return true;
}
$context = elgg_extract('context', $vars, elgg_get_context());
-if ($context) {
- $title = elgg_extract('title', $vars, '');
- if (!$title) {
- $title = elgg_echo($context);
- }
- if (isset($vars['buttons'])) {
- $buttons = $vars['buttons'];
- } else {
- if (elgg_is_logged_in() && $context) {
- $owner = elgg_get_page_owner_entity();
- if (!$owner) {
- // this is probably an all page
- $owner = elgg_get_logged_in_user_entity();
- }
- if ($owner && $owner->canWriteToContainer()) {
- $guid = $owner->getGUID();
- elgg_register_menu_item('title', array(
- 'name' => 'add',
- 'href' => elgg_extract('new_link', $vars, "$context/add/$guid"),
- 'text' => elgg_echo("$context:add"),
- 'link_class' => 'elgg-button elgg-button-action',
- ));
- }
- }
-
- $buttons = elgg_view_menu('title', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
- }
- echo <<<HTML
+$title = elgg_extract('title', $vars, '');
+if (!$title) {
+ $title = elgg_echo($context);
+}
+$title = elgg_view_title($title, array('class' => 'elgg-heading-main'));
+
+if (isset($vars['buttons']) && $vars['buttons']) {
+ $buttons = $vars['buttons'];
+} else {
+ $buttons = elgg_view_menu('title', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ ));
+}
+
+echo <<<HTML
<div class="elgg-head clearfix">
- <h2 class="elgg-heading-main">$title</h2>$buttons
+ $title$buttons
</div>
HTML;
-}
diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php
index c59a574e7..7546a4cdf 100644
--- a/views/default/page/layouts/one_column.php
+++ b/views/default/page/layouts/one_column.php
@@ -13,11 +13,22 @@ $class = 'elgg-layout elgg-layout-one-column clearfix';
if (isset($vars['class'])) {
$class = "$class {$vars['class']}";
}
+
+// navigation defaults to breadcrumbs
+$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+
?>
<div class="<?php echo $class; ?>">
- <div class="elgg-body">
- <?php echo $vars['content']; ?>
+ <div class="elgg-body elgg-main">
<?php
+ echo $nav;
+
+ if (isset($vars['title'])) {
+ echo elgg_view_title($vars['title']);
+ }
+
+ echo $vars['content'];
+
// @deprecated 1.8
echo $vars['area1'];
?>
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
index a8670146b..89e83b096 100644
--- a/views/default/page/layouts/widgets/add_button.php
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -4,7 +4,12 @@
*/
?>
<div class="elgg-widget-add-control">
- <a class="elgg-button elgg-button-action elgg-toggler" href="#widgets-add-panel">
- <?php echo elgg_echo('widgets:add'); ?>
- </a>
+<?php
+ echo elgg_view('output/url', array(
+ 'href' => '#widgets-add-panel',
+ 'text' => elgg_echo('widgets:add'),
+ 'class' => 'elgg-button elgg-button-action',
+ 'rel' => 'toggle',
+ ));
+?>
</div>
diff --git a/views/default/river/annotation/generic_comment/create.php b/views/default/river/annotation/generic_comment/create.php
index aabb6a9c6..d3db68e41 100644
--- a/views/default/river/annotation/generic_comment/create.php
+++ b/views/default/river/annotation/generic_comment/create.php
@@ -5,26 +5,7 @@
$object = $vars['item']->getObjectEntity();
$comment = $vars['item']->getAnnotation();
-$url = $object->getURL();
-$title = $object->title;
-if (!$title) {
- $title = elgg_echo('untitled');
-}
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $title,
-);
-$object_link = elgg_view('output/url', $params);
-
-$type = $object->getType();
-$subtype = $object->getSubtype();
-
-$type_string = elgg_echo("river:commented:$type:$subtype");
-echo elgg_echo('river:generic_comment', array($type_string, $object_link));
-
-if ($comment) {
- $excerpt = elgg_get_excerpt($comment->value);
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => elgg_get_excerpt($comment->value),
+));
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
index f9ecbc03c..c5a525733 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -2,32 +2,64 @@
/**
* Body of river item
*
- * @uses $vars['item']
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['summary'] Alternate summary (the short text summary of action)
+ * @uses $vars['message'] Optional message (usually excerpt of text)
+ * @uses $vars['attachments'] Optional attachments (displaying icons or other non-text data)
+ * @uses $vars['responses'] Alternate respones (comments, replies, etc.)
*/
$item = $vars['item'];
-$subject = $item->getSubjectEntity();
+
+$menu = elgg_view_menu('river', array(
+ 'item' => $item,
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
// river item header
-$params = array(
- 'href' => $subject->getURL(),
- 'text' => $subject->name,
-);
-$subject_link = elgg_view('output/url', $params);
$timestamp = elgg_get_friendly_time($item->getPostedTime());
-$header = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority'));
-$header .= "$subject_link <span class=\"elgg-river-timestamp\">$timestamp</span>";
+$summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item'])));
+if ($summary === false) {
+ $subject = $item->getSubjectEntity();
+ $summary = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ ));
+}
+
+$message = elgg_extract('message', $vars, false);
+if ($message !== false) {
+ $message = "<div class=\"elgg-river-message\">$message</div>";
+}
+
+$attachments = elgg_extract('attachments', $vars, false);
+if ($attachments !== false) {
+ $attachments = "<div class=\"elgg-river-attachments clearfix\">$attachments</div>";
+}
-// body
-$body = elgg_view($item->getView(), array('item' => $item));
+$responses = elgg_view('river/elements/responses', $vars);
+if ($responses) {
+ $responses = "<div class=\"elgg-river-responses\">$responses</div>";
+}
-// footer
-$footer = elgg_view('river/elements/footer', $vars);
+$group_string = '';
+$object = $item->getObjectEntity();
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) {
+ $group_link = elgg_view('output/url', array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ ));
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
-echo elgg_view('page/components/module', array(
- 'header' => $header,
- 'body' => $body,
- 'footer' => $footer,
- 'class' => 'mbn',
-)); \ No newline at end of file
+echo <<<RIVER
+$menu
+<div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div>
+$message
+$attachments
+$responses
+RIVER;
diff --git a/views/default/river/elements/footer.php b/views/default/river/elements/responses.php
index f1e79f131..8c5be6316 100644
--- a/views/default/river/elements/footer.php
+++ b/views/default/river/elements/responses.php
@@ -1,8 +1,18 @@
<?php
/**
* River item footer
+ *
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['responses'] Alternate override for this item
*/
+// allow river views to override the response content
+$responses = elgg_extract('responses', $vars, false);
+if ($responses) {
+ echo $responses;
+ return true;
+}
+
$item = $vars['item'];
$object = $item->getObjectEntity();
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
new file mode 100644
index 000000000..4d80c29a6
--- /dev/null
+++ b/views/default/river/elements/summary.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Short summary of the action that occurred
+ *
+ * @vars['item'] ElggRiverItem
+ */
+
+$item = $vars['item'];
+
+$subject = $item->getSubjectEntity();
+$object = $item->getObjectEntity();
+$target = $object->getContainerEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+));
+
+$object_link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => $object->title ? $object->title : $object->name,
+ 'class' => 'elgg-river-object',
+));
+
+$action = $item->action_type;
+$type = $item->type;
+$subtype = $item->subtype ? $item->subtype : 'default';
+
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup) {
+ $params = array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ );
+ $group_link = elgg_view('output/url', $params);
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
+
+
+echo elgg_echo("river:$action:$type:$subtype", array($subject_link, $object_link)); \ No newline at end of file
diff --git a/views/default/river/item.php b/views/default/river/item.php
index bf7c80b03..94622e272 100644
--- a/views/default/river/item.php
+++ b/views/default/river/item.php
@@ -7,10 +7,8 @@
$item = $vars['item'];
-$vars = array(
- 'image' => elgg_view('river/elements/image', array('item' => $item)),
- 'body' => elgg_view('river/elements/body', array('item' => $item)),
+echo elgg_view('page/components/image_block', array(
+ 'image' => elgg_view('river/elements/image', $vars),
+ 'body' => elgg_view('river/elements/body', $vars),
'class' => 'elgg-river-item',
-);
-
-echo elgg_view('page/components/image_block', $vars);
+));
diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php
index 14dab4451..a191e7b1e 100644
--- a/views/default/river/relationship/friend/create.php
+++ b/views/default/river/relationship/friend/create.php
@@ -5,18 +5,10 @@
$subject = $vars['item']->getSubjectEntity();
$object = $vars['item']->getObjectEntity();
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->name,
-);
-$object_link = elgg_view('output/url', $params);
$subject_icon = elgg_view_entity_icon($subject, 'tiny');
$object_icon = elgg_view_entity_icon($object, 'tiny');
-echo elgg_echo("friends:river:add", array($object_link));
-
-echo '<div class="elgg-river-content clearfix">';
-echo $subject_icon;
-echo elgg_view_icon('arrow-right', true);
-echo $object_icon;
-echo '</div>';
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => $subject_icon . elgg_view_icon('arrow-right') . $object_icon,
+));
diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php
index a723c5335..c7f691533 100644
--- a/views/default/river/user/default/profileiconupdate.php
+++ b/views/default/river/user/default/profileiconupdate.php
@@ -2,12 +2,20 @@
/**
* Update avatar river view
*/
+
+
$subject = $vars['item']->getSubjectEntity();
-$subject_icon = elgg_view_entity_icon($subject, 'tiny');
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+));
-echo elgg_echo("profile:river:iconupdate");
+$string = elgg_echo('river:update:user:avatar', array($subject_link));
-echo '<div class="elgg-river-content clearfix">';
-echo $subject_icon;
-echo '</div>';
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'summary' => $string,
+ 'attachments' => elgg_view_entity_icon($subject, 'tiny'),
+));
diff --git a/views/default/widgets/content_stats/content.php b/views/default/widgets/content_stats/content.php
index 7086e4b9e..6a652166c 100644
--- a/views/default/widgets/content_stats/content.php
+++ b/views/default/widgets/content_stats/content.php
@@ -19,7 +19,9 @@ foreach ($object_stats as $subtype => $num) {
}
echo '</table>';
+echo '<div class="mtm">';
echo elgg_view('output/url', array(
'href' => 'admin/statistics/overview',
- 'text' => 'more',
+ 'text' => elgg_echo('more'),
));
+echo '</div>';
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php
index 4c5ef5b4a..bb5bd7a8d 100644
--- a/views/default/widgets/friends/content.php
+++ b/views/default/widgets/friends/content.php
@@ -13,12 +13,12 @@ $num = (int) $vars['entity']->num_display;
// get the correct size
$size = $vars['entity']->icon_size;
-$html = $owner->listFriends('', $num, array(
- 'size' => $size,
- 'gallery' => true,
-));
-if ($html) {
- echo $html;
-} else {
-
+if (elgg_instanceof($owner, 'user')) {
+ $html = $owner->listFriends('', $num, array(
+ 'size' => $size,
+ 'list_type' => 'gallery',
+ ));
+ if ($html) {
+ echo $html;
+ }
}
diff --git a/views/installation/page/default.php b/views/installation/page/default.php
index a41a5b688..10499ed27 100644
--- a/views/installation/page/default.php
+++ b/views/installation/page/default.php
@@ -29,7 +29,7 @@ header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE);
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
<link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>install/css/install.css" type="text/css" />
- <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.5.min.js"></script>
+ <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>install/js/install.js"></script>
</head>
<body>
diff --git a/views/json/entities/entity_list.php b/views/json/entities/entity_list.php
index b583588c3..d5b134a71 100644
--- a/views/json/entities/entity_list.php
+++ b/views/json/entities/entity_list.php
@@ -4,7 +4,7 @@ $entities = $vars['entities'];
$full_view = $vars['full_view'];
if (is_array($entities) && sizeof($entities) > 0) {
- foreach($entities as $entity) {
- echo elgg_view_entity($entity, $full_view);
+ foreach ($entities as $entity) {
+ echo elgg_view_entity($entity, array('full_view' => $full_view));
}
}