From 1fd8bd6e296e2b1fc960fde1dd204b6c4e3e8aec Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 8 Jun 2011 02:31:30 -0700 Subject: River revamp for 1.8 --- .../river/annotation/generic_comment/create.php | 27 ++--------- views/default/river/elements/body.php | 55 +++++++++++++++------- views/default/river/elements/summary.php | 36 ++++++++++++++ views/default/river/item.php | 10 ++-- views/default/river/relationship/friend/create.php | 16 ++----- 5 files changed, 86 insertions(+), 58 deletions(-) create mode 100644 views/default/river/elements/summary.php (limited to 'views') 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 '
'; - echo $excerpt; - echo '
'; -} +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..a76cae909 100644 --- a/views/default/river/elements/body.php +++ b/views/default/river/elements/body.php @@ -6,28 +6,49 @@ */ $item = $vars['item']; -$subject = $item->getSubjectEntity(); + +$menu = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority')); // 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 $timestamp"; +$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 = "
$message
"; +} -// body -$body = elgg_view($item->getView(), array('item' => $item)); +$attachments = elgg_extract('attachments', $vars, false); +if ($attachments !== false) { + $attachments = "
$attachments
"; +} -// footer $footer = elgg_view('river/elements/footer', $vars); -echo elgg_view('page/components/module', array( - 'header' => $header, - 'body' => $body, - 'footer' => $footer, - 'class' => 'mbn', -)); \ No newline at end of file +$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 <<$summary $group_string $timestamp +$message +$attachments +$footer +RIVER; diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php new file mode 100644 index 000000000..eee8754e2 --- /dev/null +++ b/views/default/river/elements/summary.php @@ -0,0 +1,36 @@ +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..f3f4a9b14 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 '
'; -echo $subject_icon; -echo elgg_view_icon('arrow-right', true); -echo $object_icon; -echo '
'; +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'attachments' => $subject_icon . elgg_view_icon('arrow-right', true) . $object_icon, +)); -- cgit v1.2.3 From dea90f2e6af72473e24e5e67b154754faf84513e Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 13 Jun 2011 19:47:17 -0700 Subject: elgg-river-message and elgg-river-attachments now get the old elgg-river-content styling --- views/default/css/elements/components.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index 0fcbe3619..4b0034dd3 100644 --- a/views/default/css/elements/components.php +++ b/views/default/css/elements/components.php @@ -161,12 +161,15 @@ font-style: italic; line-height: 1.2em; } + +.elgg-river-attachments, +.elgg-river-message, .elgg-river-content { - border-left: 1px solid #CCC; - font-size: 85%; - line-height: 1.5em; - margin: 8px 0 5px 0; - padding-left: 5px; + border-left: 1px solid #CCC; + font-size: 85%; + line-height: 1.5em; + margin: 8px 0 5px 0; + padding-left: 5px; } -- cgit v1.2.3 From b766230d132bedf68ec3c63f72538fefa54c62e2 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 13 Jun 2011 22:23:09 -0700 Subject: Renamed river footer to a more semantic "responses". Fixed discussion to work inline again with this new layout. --- mod/groups/start.php | 3 +- .../river/object/groupforumtopic/create.php | 7 --- views/default/river/elements/body.php | 4 +- views/default/river/elements/footer.php | 52 ---------------------- views/default/river/elements/responses.php | 52 ++++++++++++++++++++++ 5 files changed, 56 insertions(+), 62 deletions(-) delete mode 100644 views/default/river/elements/footer.php create mode 100644 views/default/river/elements/responses.php (limited to 'views') diff --git a/mod/groups/start.php b/mod/groups/start.php index 73bdd08a9..5aaba017c 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -621,7 +621,8 @@ function discussion_init() { // commenting not allowed on discussion topics (use a different annotation) elgg_register_plugin_hook_handler('permissions_check:comment', 'object', 'discussion_comment_override'); - + elgg_extend_view('river/elements/responses', 'discussion/river'); + $action_base = elgg_get_plugins_path() . 'groups/actions/discussion'; elgg_register_action('discussion/save', "$action_base/save.php"); elgg_register_action('discussion/delete', "$action_base/delete.php"); diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php index cca44e523..f92e54a5c 100644 --- a/mod/groups/views/default/river/object/groupforumtopic/create.php +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -11,10 +11,3 @@ echo elgg_view('river/item', array( 'item' => $vars['item'], 'message' => $excerpt, )); - -if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) { - // inline comment form - $form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden'); - $body_vars = array('entity' => $object, 'inline' => true); - echo elgg_view_form('discussion/reply/save', $form_vars, $body_vars); -} diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php index a76cae909..080c04644 100644 --- a/views/default/river/elements/body.php +++ b/views/default/river/elements/body.php @@ -32,7 +32,7 @@ if ($attachments !== false) { $attachments = "
$attachments
"; } -$footer = elgg_view('river/elements/footer', $vars); +$responses = elgg_view('river/elements/responses', $vars); $group_string = ''; $object = $item->getObjectEntity(); @@ -50,5 +50,5 @@ $menu
$summary $group_string $timestamp
$message $attachments -$footer +$responses RIVER; diff --git a/views/default/river/elements/footer.php b/views/default/river/elements/footer.php deleted file mode 100644 index f1e79f131..000000000 --- a/views/default/river/elements/footer.php +++ /dev/null @@ -1,52 +0,0 @@ -getObjectEntity(); - -// annotations do not have comments -if ($item->annotation_id != 0 || !$object) { - return true; -} - -$comment_count = $object->countComments(); - -$options = array( - 'guid' => $object->getGUID(), - 'annotation_name' => 'generic_comment', - 'limit' => 3, - 'order_by' => 'n_table.time_created desc' -); -$comments = elgg_get_annotations($options); - -if ($comments) { - // why is this reversing it? because we're asking for the 3 latest - // comments by sorting desc and limiting by 3, but we want to display - // these comments with the latest at the bottom. - $comments = array_reverse($comments); - -?> - - - 'elgg-river-comments')); - - if ($comment_count > count($comments)) { - $num_more_comments = $comment_count - count($comments); - $url = $object->getURL(); - $params = array( - 'href' => $url, - 'text' => elgg_echo('river:comments:more', array($num_more_comments)), - ); - $link = elgg_view('output/url', $params); - echo "
$link
"; - } -} - -// inline comment form -$form_vars = array('id' => "comments-add-{$object->getGUID()}", 'class' => 'hidden'); -$body_vars = array('entity' => $object, 'inline' => true); -echo elgg_view_form('comments/add', $form_vars, $body_vars); diff --git a/views/default/river/elements/responses.php b/views/default/river/elements/responses.php new file mode 100644 index 000000000..f1e79f131 --- /dev/null +++ b/views/default/river/elements/responses.php @@ -0,0 +1,52 @@ +getObjectEntity(); + +// annotations do not have comments +if ($item->annotation_id != 0 || !$object) { + return true; +} + +$comment_count = $object->countComments(); + +$options = array( + 'guid' => $object->getGUID(), + 'annotation_name' => 'generic_comment', + 'limit' => 3, + 'order_by' => 'n_table.time_created desc' +); +$comments = elgg_get_annotations($options); + +if ($comments) { + // why is this reversing it? because we're asking for the 3 latest + // comments by sorting desc and limiting by 3, but we want to display + // these comments with the latest at the bottom. + $comments = array_reverse($comments); + +?> + + + 'elgg-river-comments')); + + if ($comment_count > count($comments)) { + $num_more_comments = $comment_count - count($comments); + $url = $object->getURL(); + $params = array( + 'href' => $url, + 'text' => elgg_echo('river:comments:more', array($num_more_comments)), + ); + $link = elgg_view('output/url', $params); + echo "
$link
"; + } +} + +// inline comment form +$form_vars = array('id' => "comments-add-{$object->getGUID()}", 'class' => 'hidden'); +$body_vars = array('entity' => $object, 'inline' => true); +echo elgg_view_form('comments/add', $form_vars, $body_vars); -- cgit v1.2.3 From cf85a49c7e74133feaec7d52d8f289d22b59a56c Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 13 Jun 2011 22:31:48 -0700 Subject: Using tabs, not spaces for indentation --- views/default/css/elements/components.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index 4b0034dd3..203f6d257 100644 --- a/views/default/css/elements/components.php +++ b/views/default/css/elements/components.php @@ -165,11 +165,11 @@ .elgg-river-attachments, .elgg-river-message, .elgg-river-content { - border-left: 1px solid #CCC; - font-size: 85%; - line-height: 1.5em; - margin: 8px 0 5px 0; - padding-left: 5px; + border-left: 1px solid #CCC; + font-size: 85%; + line-height: 1.5em; + margin: 8px 0 5px 0; + padding-left: 5px; } -- cgit v1.2.3 From 755187045527c5c15ea3b9e70fe7a451d7796585 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 18 Jun 2011 17:56:44 -0400 Subject: using the new lightbox and hacking away at the complicated embed/embed view --- mod/embed/start.php | 7 +++- mod/embed/views/default/embed/css.php | 61 +++++++++++++++++++++++++++++++ mod/embed/views/default/embed/embed.php | 38 ++----------------- mod/embed/views/default/embed/tabs.php | 40 ++++++++++++++++++++ views/default/css/elements/navigation.php | 4 +- 5 files changed, 112 insertions(+), 38 deletions(-) create mode 100644 mod/embed/views/default/embed/tabs.php (limited to 'views') diff --git a/mod/embed/start.php b/mod/embed/start.php index f6f49a53f..ce6c6ec11 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -36,10 +36,13 @@ function embed_longtext_menu($hook, $type, $items, $vars) { 'name' => 'embed', 'href' => "embed?{$active_section}internal_id={$vars['id']}", 'text' => elgg_echo('media:insert'), - 'rel' => 'facebox', - 'link_class' => 'elgg-longtext-control', + 'rel' => 'lightbox', + 'link_class' => 'elgg-longtext-control elgg-lightbox', 'priority' => 1, )); + + elgg_load_js('lightbox'); + elgg_load_css('lightbox'); return $items; } diff --git a/mod/embed/views/default/embed/css.php b/mod/embed/views/default/embed/css.php index 44491846b..c20116bf2 100644 --- a/mod/embed/views/default/embed/css.php +++ b/mod/embed/views/default/embed/css.php @@ -5,6 +5,67 @@ * @package embed */ ?> +.embed-wrapper { + width: 730px; + min-height: 400px; + padding: 5px; +} +.embed-wrapper h2 { + color: #333333; + margin-bottom: 10px; +} + +/* *************************************** + EMBED TABBED PAGE NAVIGATION +*************************************** */ +.embed-wrapper .elgg-tabs a:hover { + color: #666; +} + +/*************** + Form +******************/ +/* input field classes */ +.embed-wrapper .elgg-input-text, +.embed-wrapper .elgg-input-tags { + font: 120% Arial, Helvetica, sans-serif; + padding: 5px; + border: 1px solid #ccc; + color:#666; + background-color: white; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.embed-wrapper .elgg-input-text:focus, +.embed-wrapper .elgg-input-tags:focus { + border: solid 1px #4690d6; + background: #e4ecf5; + color:#333; +} +.embed-wrapper .elgg-input-file { + background-color: white; +} +.embed-wrapper p { + color:#333; +} +.embed-wrapper p.entity-title { + color:#666; +} +.embed-wrapper .elgg-image-block:hover { + background-color: #eee; +} +.embed-wrapper label { + color:#333; +} + + + #facebox { position: absolute; diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php index eeeb1d244..f09d76a4b 100644 --- a/mod/embed/views/default/embed/embed.php +++ b/mod/embed/views/default/embed/embed.php @@ -17,41 +17,11 @@ $internal_id = elgg_extract('internal_id', $vars); if (!$sections) { $content = elgg_echo('embed:no_sections'); } else { - $offset = max(0, get_input('offset', 0)); - $limit = get_input('limit', 10); - $content = elgg_view_title(elgg_echo('embed:media')); - //$content .= elgg_echo('embed:instructions'); + $content .= elgg_view('embed/tabs', $vars); - // prepare tabbed menu - $tabs = array(); - foreach ($sections as $section_id => $section_info) { - $tab = array( - 'title' => $section_info['name'], - 'url' => '#', - 'url_class' => 'embed_section', - 'url_id' => $section_id, - ); - - if ($section_id == $active_section) { - $tab['selected'] = TRUE; - } - $tabs[] = $tab; - } - - // make sure upload is always the last tab - if ($upload_sections) { - $tabs[] = array( - 'title' => elgg_echo('embed:upload'), - 'url' => '#', - 'url_class' => 'embed_section', - 'url_id' => 'upload', - 'selected' => ($active_section == 'upload') - ); - } - - $tabs_html = elgg_view('navigation/tabs', array('tabs' => $tabs)); - $content .= $tabs_html; + $offset = max(0, get_input('offset', 0)); + $limit = get_input('limit', 10); // build the items and layout. if ($active_section == 'upload' || array_key_exists($active_section, $sections)) { @@ -121,7 +91,7 @@ if (!$sections) { } } -echo $content; +echo '
' . $content . '
'; ?> diff --git a/mod/embed/views/default/embed/tabs.php b/mod/embed/views/default/embed/tabs.php new file mode 100644 index 000000000..a148ece9f --- /dev/null +++ b/mod/embed/views/default/embed/tabs.php @@ -0,0 +1,40 @@ + $section_info) { + $tab = array( + 'title' => $section_info['name'], + 'url' => '#', + 'url_class' => 'embed_section', + 'url_id' => $section_id, + ); + + if ($section_id == $active_section) { + $tab['selected'] = TRUE; + } + $tabs[] = $tab; +} + +// make sure upload is always the last tab +if ($upload_sections) { + $tabs[] = array( + 'title' => elgg_echo('embed:upload'), + 'url' => '#', + 'url_class' => 'embed_section', + 'url_id' => 'upload', + 'selected' => ($active_section == 'upload') + ); +} + +echo elgg_view('navigation/tabs', array('tabs' => $tabs)); diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index d930d3a89..99de0867b 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -160,7 +160,7 @@ SITE MENU *************************************** */ .elgg-menu-site { - z-index: 7000; + z-index: 1; } .elgg-menu-site > li > a { @@ -208,7 +208,7 @@ position: relative; left: -1px; width: 100%; - z-index: 7000; + z-index: 1; min-width: 150px; border: 1px solid #999; border-top: 0; -- cgit v1.2.3 From 1c0234e0caebff139f707505ae353392ef3b7372 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 19 Jun 2011 08:37:04 -0400 Subject: Fixes #3581 checks that the owner of a friends widget is a user --- views/default/widgets/friends/content.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'views') diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php index 4c5ef5b4a..ec842a252 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, + 'gallery' => true, + )); + if ($html) { + echo $html; + } } -- cgit v1.2.3 From a49829a99d00f3bb5b77c6b7903a9a09c52c9ff1 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 19 Jun 2011 13:47:01 -0400 Subject: need the system messages to be above the lightbox overlay at 1000 z-index --- views/default/css/elements/layout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php index a5854f8c1..4d87b8824 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; -- cgit v1.2.3 From 17d053eb735d7e3830704db644301db2d8c91d1c Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 22 Jun 2011 22:05:28 -0400 Subject: backward compatibility of the admin page shell was broken when we reorganized the page view directory --- views/default/page/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') 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; } -- cgit v1.2.3 From e4fca34f791e3cfa9a872d7cb6faa197d2019e03 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 23 Jun 2011 06:59:27 -0400 Subject: Fixes #3471 moved helpers to end of css/elgg --- views/default/css/elgg.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'views') 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); -- cgit v1.2.3 From d583d9c1380aab7e9e4df9d2466c3db41fb3cbee Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 23 Jun 2011 20:51:46 -0400 Subject: added a css class so that we can limit the width of text instruction areas in admin area --- views/default/css/admin.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'views') diff --git a/views/default/css/admin.php b/views/default/css/admin.php index a4d413781..a56c7b214 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -1102,6 +1102,10 @@ a.elgg-widget-collapsed:before { ADMIN MISC *************************************** */ +.elgg-instructs { + max-width: 600px; +} + .manifest_file { background-color:#eee; -- cgit v1.2.3 From fb0a9d896b9a0bd1193c63badad6a1990afc0109 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 24 Jun 2011 07:52:27 -0400 Subject: fixed group forum discussion inline replies for activity page --- mod/groups/views/default/river/object/groupforumtopic/create.php | 9 +++++++++ views/default/river/elements/body.php | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php index f92e54a5c..80e7b09aa 100644 --- a/mod/groups/views/default/river/object/groupforumtopic/create.php +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -7,7 +7,16 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); +$responses = ''; +if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) { + // inline comment form + $form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden'); + $body_vars = array('entity' => $object, 'inline' => true); + $responses = elgg_view_form('discussion/reply/save', $form_vars, $body_vars); +} + echo elgg_view('river/item', array( 'item' => $vars['item'], 'message' => $excerpt, + 'responses' => $responses, )); diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php index 080c04644..7eebb0c99 100644 --- a/views/default/river/elements/body.php +++ b/views/default/river/elements/body.php @@ -32,7 +32,13 @@ if ($attachments !== false) { $attachments = "
$attachments
"; } -$responses = elgg_view('river/elements/responses', $vars); +$responses = elgg_extract('responses', $vars, false); +if ($responses === false) { + $responses = elgg_view('river/elements/responses', $vars); +} +if ($responses) { + $responses = "
$responses
"; +} $group_string = ''; $object = $item->getObjectEntity(); -- cgit v1.2.3 From 43e2672f65d12a36d75ad9257a936dc93a2108f3 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 24 Jun 2011 19:55:58 -0400 Subject: cleaned up the list/gallery css classes to use standard class naming - minor modifications only --- engine/lib/views.php | 4 ++-- mod/search/views/default/search/list.php | 4 ++-- views/default/css/admin.php | 2 +- views/default/css/elements/components.php | 4 ++-- views/default/object/elements/summary.php | 2 +- views/default/page/components/gallery.php | 31 ++++++++++++++++++++++++++++--- views/default/page/components/list.php | 6 +++--- 7 files changed, 39 insertions(+), 14 deletions(-) (limited to 'views') diff --git a/engine/lib/views.php b/engine/lib/views.php index 4911171c8..df69593f9 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -969,7 +969,7 @@ $list_type_toggle = true, $pagination = true) { // new function $defaults = array( 'items' => $entities, - 'list_class' => 'elgg-entity-list', + 'list_class' => 'elgg-list-entity', 'full_view' => true, 'pagination' => true, 'gallery' => false, @@ -992,7 +992,7 @@ $list_type_toggle = true, $pagination = true) { 'pagination' => $pagination, 'gallery' => false, 'list_type_toggle' => $list_type_toggle, - 'list_class' => 'elgg-entity-list', + 'list_class' => 'elgg-list-entity', ); } diff --git a/mod/search/views/default/search/list.php b/mod/search/views/default/search/list.php index c5afaaa86..11860c094 100644 --- a/mod/search/views/default/search/list.php +++ b/mod/search/views/default/search/list.php @@ -82,7 +82,7 @@ $more = ($more_check > 0) ? $more_check : 0; if ($more) { $title_key = ($more == 1) ? 'comment' : 'comments'; $more_str = elgg_echo('search:more', array($count, $type_str)); - $more_link = "
  • $more_str
  • "; + $more_link = "
  • $more_str
  • "; } else { $more_link = ''; } @@ -98,7 +98,7 @@ if ($view) { $body .= '
      '; foreach ($entities as $entity) { $id = "elgg-{$entity->getType()}-{$entity->getGUID()}"; - $body .= "
    • "; + $body .= "
    • "; $body .= elgg_view($view, array( 'entity' => $entity, 'params' => $vars['params'], diff --git a/views/default/css/admin.php b/views/default/css/admin.php index a56c7b214..d7c154438 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -383,7 +383,7 @@ table.mceLayout { margin-left: 5px; } -.elgg-list-item { +.elgg-item { margin: 3px; } .elgg-menu-metadata { diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index 203f6d257..594694e60 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; } diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index d3a6ea862..9206ada66 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -49,5 +49,5 @@ echo "

      $title_link

      "; echo "
      $subtitle
      "; echo $tags; if ($content) { - echo "
      $content
      "; + echo "
      $content
      "; } 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
        element + * @uses $vars['item_class'] Additional CSS class for the
      • 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') { } ?> -