Enabled" : ""; $html = " " . make_form(make_link("ext_manager/set")) . " $h_en "; foreach ($extensions as $extension) { if ((!$editable && $extension->visibility === ExtensionInfo::VISIBLE_ADMIN) || $extension->visibility === ExtensionInfo::VISIBLE_HIDDEN) { continue; } $h_name = html_escape(($extension->beta===true ? "[BETA] ":"").(empty($extension->name) ? $extension->key : $extension->name)); $h_description = html_escape($extension->description); $h_link = make_link("ext_doc/" . url_escape($extension->key)); $h_enabled = ($extension->is_enabled() === true ? " checked='checked'" : ""); $h_disabled = ($extension->is_supported()===false || $extension->core===true? " disabled ": " "); //baseline_open_in_new_black_18dp.png $h_enabled_box = $editable ? "" : ""; $h_docs = ($extension->documentation ? "" : ""); //TODO: A proper "docs" symbol would be preferred here. $html .= " {$h_enabled_box} "; } $h_set = $editable ? "" : ""; $html .= " $h_set
Name Docs Description
{$h_docs} {$h_description} ".$extension->get_support_info()."
"; $page->set_title("Extensions"); $page->set_heading("Extensions"); $page->add_block(new NavBlock()); $page->add_block(new Block("Extension Manager", $html)); } /* public function display_blocks(Page $page, $extensions) { global $user; $col_1 = ""; $col_2 = ""; foreach($extensions as $extension) { $ext_name = $extension->name; $h_name = empty($extension->name) ? $ext_name : html_escape($extension->name); $h_email = html_escape($extension->email); $h_link = isset($extension->link) ? "link)."\">Original Site" : ""; $h_doc = isset($extension->documentation) ? "name))."\">Documentation" : ""; $h_author = html_escape($extension->author); $h_description = html_escape($extension->description); $h_enabled = $extension->is_enabled() ? " checked='checked'" : ""; $h_author_link = empty($h_email) ? "$h_author" : "$h_author"; $html = "

$h_name
By $h_author_link Enabled: 
$h_description

$h_link $h_doc

"; if($n++ % 2 == 0) { $col_1 .= $html; } else { $col_2 .= $html; } } $html = " ".make_form(make_link("ext_manager/set"))." ".$user->get_auth_html()."
$col_1$col_2
"; $page->set_title("Extensions"); $page->set_heading("Extensions"); $page->add_block(new NavBlock()); $page->add_block(new Block("Extension Manager", $html)); } */ public function display_doc(Page $page, ExtensionInfo $info) { $author = ""; if (count($info->authors) > 0) { $author = "
Author"; if (count($info->authors) > 1) { $author .= "s"; } $author .= ":"; foreach ($info->authors as $auth=>$email) { if (!empty($email)) { $author .= "" . html_escape($auth) . ""; } else { $author .= html_escape($auth); } $author .= "
"; } } $version = ($info->version) ? "
Version: " . html_escape($info->version) : ""; $link = ($info->link) ? "
Home Page: link) . "\">Link" : ""; $doc = $info->documentation; $html = "

$author $version $link

$doc


Back to the list

"; $page->set_title("Documentation for " . html_escape($info->name)); $page->set_heading(html_escape($info->name)); $page->add_block(new NavBlock()); $page->add_block(new Block("Documentation", $html)); } }