aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout/elements
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 14:34:23 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 14:34:23 +0000
commitab237eb3f0844a1d882a57f7b29eabfbe3cfbfad (patch)
tree2c65037869af373f54f57268492076cde26b071e /views/default/layout/elements
parentfab3e3166b9e75c508fb2491eed24a541f23221c (diff)
downloadelgg-ab237eb3f0844a1d882a57f7b29eabfbe3cfbfad.tar.gz
elgg-ab237eb3f0844a1d882a57f7b29eabfbe3cfbfad.tar.bz2
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
Diffstat (limited to 'views/default/layout/elements')
-rw-r--r--views/default/layout/elements/page_links.php37
-rw-r--r--views/default/layout/elements/sidebar.php18
2 files changed, 39 insertions, 16 deletions
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 @@
+<?php
+/**
+ * Page links: RSS link, reported content link, etc.
+ */
+
+// Are there feeds to display?
+global $autofeed;
+$rss_link = '';
+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');
+
+ $rss_link = elgg_view('output/url', array(
+ 'text' => '<span class="elgg-icon elgg-icon-rss"></span>',
+ '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 '<div class="elgg-page-links clearfix mbm">';
+ echo $rss_link;
+ echo $links;
+ echo '</div>';
+}
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 <<<END
- <div class="rss-link clearfix"><a href="{$url}" rel="nofollow" title="{$label}">{$label}</a></div>
-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'));