From ab237eb3f0844a1d882a57f7b29eabfbe3cfbfad Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 29 Dec 2010 14:34:23 +0000 Subject: created a new layout element - page links - holds stuff like the rss link git-svn-id: http://code.elgg.org/elgg/trunk@7743 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css/elements/core.php | 14 ----------- views/default/css/elements/skin.php | 7 ++++++ views/default/layout/elements/page_links.php | 37 ++++++++++++++++++++++++++++ views/default/layout/elements/sidebar.php | 18 ++------------ 4 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 views/default/layout/elements/page_links.php (limited to 'views') diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php index 6f4e46f66..879427583 100644 --- a/views/default/css/elements/core.php +++ b/views/default/css/elements/core.php @@ -116,20 +116,6 @@ h2 { .margin-top { margin-top:10px; } -.rss-link { - margin-top:-10px; - margin-bottom:10px; -} -.rss-link a { - display:block; - width:14px; - height:14px; - float:right; - background-image:url(_graphics/elgg_sprites.png); - background-repeat: no-repeat; - background-position: -250px top; - text-indent: -1000em; -} .elgg-tags { background-image:url(_graphics/elgg_sprites.png); background-repeat: no-repeat; diff --git a/views/default/css/elements/skin.php b/views/default/css/elements/skin.php index 91a61dacb..d02797cfd 100644 --- a/views/default/css/elements/skin.php +++ b/views/default/css/elements/skin.php @@ -154,6 +154,10 @@ a.selected { padding-bottom: 5px; } +.elgg-rss { + float: right; +} + /***** PAGE FOOTER ******/ .elgg-page-footer { @@ -240,6 +244,9 @@ a.selected { width: 22px; height: 20px; } +.elgg-icon-rss { + background-position: -249px 1px; +} .ajax-loader { background-color: white; diff --git a/views/default/layout/elements/page_links.php b/views/default/layout/elements/page_links.php new file mode 100644 index 000000000..56eab0bf8 --- /dev/null +++ b/views/default/layout/elements/page_links.php @@ -0,0 +1,37 @@ + '', + 'href' => $url, + 'title' => $label, + 'rel' => 'nofollow', + 'encode_text' => false, + 'class' => 'elgg-rss', + )); +} + +// view to extend by plugins +$links = elgg_view('page/links', $vars); + +if ($links || $rss_link) { + echo ''; +} diff --git a/views/default/layout/elements/sidebar.php b/views/default/layout/elements/sidebar.php index f2071adb5..93dd659f5 100644 --- a/views/default/layout/elements/sidebar.php +++ b/views/default/layout/elements/sidebar.php @@ -5,23 +5,9 @@ * @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar */ -// Are there feeds to display? -global $autofeed; -if (isset($autofeed) && $autofeed == true) { - $url = full_url(); - if (substr_count($url,'?')) { - $url .= "&view=rss"; - } else { - $url .= "?view=rss"; - } - $url = elgg_format_url($url); - $label = elgg_echo('feed:rss'); - echo <<{$label} -END; -} +echo elgg_view('layout/elements/page_links', $vars); -echo elgg_view('layout/elements/owner_block'); +echo elgg_view('layout/elements/owner_block', $vars); echo elgg_view('navigation/sidebar_menu'); echo elgg_view_menu('page', array('sort_by' => 'name')); -- cgit v1.2.3