aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-09 18:31:57 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-09 18:31:57 +0000
commit9df7b2f7875d6c26d02d398d17f5fade118673ca (patch)
tree069990845318bea1a8781b77e48dab5840094271
parente9685e67ecaa4105d125c4e520017fe784aa6a55 (diff)
downloadelgg-9df7b2f7875d6c26d02d398d17f5fade118673ca.tar.gz
elgg-9df7b2f7875d6c26d02d398d17f5fade118673ca.tar.bz2
breadcrumb view has been added
-rw-r--r--views/default/object/album.php3
-rw-r--r--views/default/object/image.php4
-rw-r--r--views/default/tidypics/breadcrumbs.php22
-rw-r--r--views/default/tidypics/css.php8
4 files changed, 37 insertions, 0 deletions
diff --git a/views/default/object/album.php b/views/default/object/album.php
index 3507e6047..bee379666 100644
--- a/views/default/object/album.php
+++ b/views/default/object/album.php
@@ -60,6 +60,9 @@
// individual album view
?>
<div class="contentWrapper">
+ <div id="tidypics_breadcrumbs">
+ <?php echo elgg_view('tidypics/breadcrumbs', array() ); ?>
+ </div>
<?php
echo '<div id="tidypics_desc">'.autop($desc).'</div>';
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 6bb33b8bd..8fd4dca9a 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -122,6 +122,10 @@ if ($photo_tags) {
<div class="contentWrapper">
<div id="tidypics_wrapper">
+ <div id="tidypics_breadcrumbs">
+ <?php echo elgg_view('tidypics/breadcrumbs', array('album' => $album,) ); ?>
+ </div>
+
<div id="tidypics_desc">
<?php echo autop($desc); ?>
</div>
diff --git a/views/default/tidypics/breadcrumbs.php b/views/default/tidypics/breadcrumbs.php
new file mode 100644
index 000000000..d24f39f38
--- /dev/null
+++ b/views/default/tidypics/breadcrumbs.php
@@ -0,0 +1,22 @@
+<?php
+ $file_guid = $vars['file_guid'];
+ $page_owner = page_owner_entity();
+
+ $first_level_text = '';
+ $first_level_link = $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username;
+ if (get_loggedin_userid() == $page_owner->guid)
+ $first_level_text = elgg_echo('album:yours');
+ else
+ $first_level_text = sprintf(elgg_echo('album:user'), $page_owner->name);
+?>
+<a href="<?php echo $first_level_link; ?>"><?php echo $first_level_text; ?></a>
+<?
+ $second_level_text = '';
+ if (isset($vars['album'])) {
+ $second_level_text = $vars['album']->title;
+ $second_level_link = $vars['album']->getURL();
+?>
+>> <a href="<?php echo $second_level_link; ?>"><?php echo $second_level_text; ?></a>
+<?php
+ }
+?>
diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php
index 638dddd6d..56d4efcad 100644
--- a/views/default/tidypics/css.php
+++ b/views/default/tidypics/css.php
@@ -5,6 +5,14 @@
?>
/* ---- tidypics object views ---- */
+#tidypics_wrapper {
+}
+
+#tidypics_breadcrumbs {
+margin:5px 0 25px 0;
+font-size:80%;
+}
+
#tidypics_desc {
padding:0 20px;
font-style:italic;