1
0

Add the user home home directory to the user profile page.

This commit is contained in:
Tim Almdal 2010-01-24 20:43:02 -08:00
parent 68b290be51
commit c7d1baab70
2 changed files with 23 additions and 0 deletions

View File

@ -161,4 +161,17 @@ class user_homes_event_Core {
}
return;
}
static function show_user_profile($data) {
$home = ORM::factory("user_home")->where("id", "=", $data->user->id)->find();
if ($home->loaded()) {
$view = new View("user_profile_home.html");
$item = ORM::factory("item")->where("id", "=", $home->home)->find();
if ($item->loaded()) {
$view->item = $item;
$data->content[] = (object)array("title" => t("Home album"), "view" => $view);
}
}
}
}

View File

@ -0,0 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="g-user-home-detail">
<ul>
<li id="g-user_home-<?= $item->id ?>">
<a href="<?= $item->url() ?>">
<?= html::purify($item->title) ?>
</a>
</li>
</ul>
</div>