Add the user home home directory to the user profile page.
This commit is contained in:
parent
68b290be51
commit
c7d1baab70
|
@ -161,4 +161,17 @@ class user_homes_event_Core {
|
||||||
}
|
}
|
||||||
return;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
10
modules/user_homes/views/user_profile_home.html.php
Normal file
10
modules/user_homes/views/user_profile_home.html.php
Normal 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>
|
Reference in New Issue
Block a user