forked from Public/pics
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
/*****************************************************************************
|
|
* AdminBar.php
|
|
* Defines the AdminBar class.
|
|
*
|
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
|
*****************************************************************************/
|
|
|
|
class AdminBar extends Template
|
|
{
|
|
private $extra_items = [];
|
|
|
|
public function html_main()
|
|
{
|
|
echo '
|
|
<div id="admin_bar">
|
|
<ul>
|
|
<li><a href="', BASEURL, '/managealbums/">Albums</a></li>
|
|
<li><a href="', BASEURL, '/manageassets/">Assets</a></li>
|
|
<li><a href="', BASEURL, '/managetags/">Tags</a></li>
|
|
<li><a href="', BASEURL, '/manageusers/">Users</a></li>
|
|
<li><a href="', BASEURL, '/manageerrors/">Errors [', ErrorLog::getCount(), ']</a></li>';
|
|
|
|
foreach ($this->extra_items as $item)
|
|
echo '
|
|
<li><a href="', $item[0], '">', $item[1], '</a></li>';
|
|
|
|
echo '
|
|
<li><a href="', BASEURL, '/logout/">Log out [', Registry::get('user')->getFullName(), ']</a></li>
|
|
</ul>
|
|
</div>';
|
|
}
|
|
|
|
public function appendItem($url, $caption)
|
|
{
|
|
$this->extra_items[] = [$url, $caption];
|
|
}
|
|
}
|