Exemplo n.º 1
0
    /**
     * Display surrounding div and default content for all tools
     */
    public static function displayToolsContent()
    {
        echo '<div id="' . self::$TOOLS_DIV_ID . '">';
        echo '<div class="panel-heading">';
        echo '<h1>' . __('Tools') . '</h1>';
        echo '</div>';
        echo '<div class="panel-content">';
        echo __('Complex tools can analyze or process the complete database and will open in an overlay.') . '<br><br>';
        echo '<table class="fullwidth zebra-style more-padding">';
        echo '<thead><tr><th colspan="3">' . __('Installed tools') . ':</th></tr></thead>';
        echo '<tbody class="top-and-bottom-border">';
        $Factory = new PluginFactory();
        $tools = $Factory->activePlugins(PluginType::Tool);
        if (empty($tools)) {
            echo '<tr><td colspan="3"><em>' . __('No tools installed.') . '.</em></td></tr>';
        }
        foreach ($tools as $key) {
            $Factory = new PluginFactory();
            $Plugin = $Factory->newInstance($key);
            echo '<tr>
					<td>' . $Plugin->getConfigLink() . '</td>
					<td class="b">' . self::getLinkFor($Plugin->id(), $Plugin->name()) . '</td>
					<td>' . $Plugin->description() . '</td>
				</tr>';
        }
        echo '</tbody>';
        echo '</table>';
        echo '</div>';
        echo '</div>';
    }
Exemplo n.º 2
0
<div id="container">
	<div id="main">
		<div id="data-browser" class="panel">
			<div id="data-browser-inner">
				<?php 
$DataBrowser = new DataBrowser();
$DataBrowser->display();
?>
			</div>
		</div>

		<div id="statistics" class="panel">
			<ul id="statistics-nav">
				<?php 
$Factory = new PluginFactory();
$Stats = $Factory->activePlugins(PluginType::STAT);
foreach ($Stats as $i => $key) {
    $Plugin = $Factory->newInstance($key);
    if ($Plugin !== false) {
        echo '<li' . ($i == 0 ? ' class="active"' : '') . '>' . $Plugin->getLink() . '</li>';
    }
}
if (PluginStat::hasVariousStats()) {
    echo '<li class="with-submenu">';
    echo '<a href="#">' . __('Miscellaneous') . '</a>';
    echo '<ul class="submenu">';
    $VariousStats = $Factory->variousPlugins();
    foreach ($VariousStats as $key) {
        $Plugin = $Factory->newInstance($key);
        if ($Plugin !== false) {
            echo '<li>' . $Plugin->getLink() . '</li>';