From 412d337ee7f1463dc4ea4cf1d23415b10749f996 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Fri, 18 Feb 2011 17:43:36 +0000 Subject: Refs #2950: layout/elements => page/elements git-svn-id: http://code.elgg.org/elgg/trunk@8285 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/page/elements/comments.php | 30 +++++++++++++++++++++++ views/default/page/elements/owner_block.php | 35 +++++++++++++++++++++++++++ views/default/page/elements/page_links.php | 37 +++++++++++++++++++++++++++++ views/default/page/elements/sidebar.php | 29 ++++++++++++++++++++++ views/default/page/elements/title.php | 14 +++++++++++ 5 files changed, 145 insertions(+) create mode 100644 views/default/page/elements/comments.php create mode 100644 views/default/page/elements/owner_block.php create mode 100644 views/default/page/elements/page_links.php create mode 100644 views/default/page/elements/sidebar.php create mode 100644 views/default/page/elements/title.php (limited to 'views/default/page') diff --git a/views/default/page/elements/comments.php b/views/default/page/elements/comments.php new file mode 100644 index 000000000..c27a146ab --- /dev/null +++ b/views/default/page/elements/comments.php @@ -0,0 +1,30 @@ +"; + +$options = array( + 'guid' => $vars['entity']->getGUID(), + 'annotation_name' => 'generic_comment' +); +echo elgg_list_annotations($options); + +if ($show_add_form) { + $form_vars = array('name' => 'elgg_add_comment'); + echo elgg_view_form('comments/add', $form_vars, $vars); +} + +echo ''; diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php new file mode 100644 index 000000000..8cfa2d683 --- /dev/null +++ b/views/default/page/elements/owner_block.php @@ -0,0 +1,35 @@ +getGUID() != elgg_get_logged_in_user_guid())) { + + $header = elgg_view_entity($owner, false); + + $body = elgg_view_menu('owner_block', array( + 'entity' => $owner, + 'class' => 'elgg-owner-block-menu', + )); + + $body .= elgg_view('page/elements/owner_block/extend', $vars); + + //@todo elgg-module-owner-block? + echo elgg_view('layout/objects/module', array( + 'header' => $header, + 'body' => $body, + 'class' => 'elgg-owner-block', + )); +} + +elgg_pop_context(); \ No newline at end of file diff --git a/views/default/page/elements/page_links.php b/views/default/page/elements/page_links.php new file mode 100644 index 000000000..fb9acbfb7 --- /dev/null +++ b/views/default/page/elements/page_links.php @@ -0,0 +1,37 @@ + '', + 'href' => $url, + 'title' => $label, + 'rel' => 'nofollow', + 'encode_text' => false, + 'class' => 'right', + )); +} + +// view to extend by plugins +$links = elgg_view('page/links', $vars); + +if ($links || $rss_link) { + echo ''; +} diff --git a/views/default/page/elements/sidebar.php b/views/default/page/elements/sidebar.php new file mode 100644 index 000000000..8950c5f3f --- /dev/null +++ b/views/default/page/elements/sidebar.php @@ -0,0 +1,29 @@ + 'name')); + +// optional 'sidebar' parameter +if (isset($vars['sidebar'])) { + echo $vars['sidebar']; +} + +// @todo deprecated so remove in Elgg 2.0 +// optional second parameter of elgg_view_layout +if (isset($vars['area2'])) { + echo $vars['area2']; +} + +// @todo deprecated so remove in Elgg 2.0 +// optional third parameter of elgg_view_layout +if (isset($vars['area3'])) { + echo $vars['area3']; +} \ No newline at end of file diff --git a/views/default/page/elements/title.php b/views/default/page/elements/title.php new file mode 100644 index 000000000..19f47f4e6 --- /dev/null +++ b/views/default/page/elements/title.php @@ -0,0 +1,14 @@ +{$vars['title']}"; -- cgit v1.2.3