diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index dd60accd..46825394 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -8,7 +8,7 @@ */ class ExtensionInfo { // {{{ - var $ext_name, $name, $link, $author, $email, $description, $documentation; + var $ext_name, $name, $link, $author, $email, $description, $documentation, $version; function ExtensionInfo($main) { $matches = array(); @@ -29,6 +29,9 @@ class ExtensionInfo { // {{{ $this->link = make_link(substr($this->link, 1)); } } + if(preg_match("/Version: (.*)/", $line, $matches)) { + $this->version = $matches[1]; + } if(preg_match("/Author: (.*) [<\(](.*@.*)[>\)]/", $line, $matches)) { $this->author = $matches[1]; $this->email = $matches[2]; diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 6ed5fdb4..5d231e6b 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -6,36 +6,23 @@ class ExtManagerTheme extends Themelet {
- + "; $n = 0; foreach($extensions as $extension) { $ext_name = $extension->ext_name; $h_name = empty($extension->name) ? $ext_name : html_escape($extension->name); - $h_email = html_escape($extension->email); - $h_link = isset($extension->link) ? - "link)."\">Info" : ""; - $h_doc = isset($extension->documentation) ? - "ext_name))."\">Help" : ""; - $h_author = html_escape($extension->author); $h_description = html_escape($extension->description); $h_enabled = $extension->enabled ? " checked='checked'" : ""; + $h_link = make_link("ext_doc/".html_escape($extension->ext_name)); $oe = ($n++ % 2 == 0) ? "even" : "odd"; $html .= " - - " . ( - empty($h_email) ? - "" : - "" - ) . " - - - + + + "; } $html .= " @@ -106,7 +93,25 @@ class ExtManagerTheme extends Themelet { } public function display_doc(Page $page, ExtensionInfo $info) { - $html = "
".$info->documentation."
"; + $author = ""; + if($info->author) { + if($info->email) { + $author = "
Author:email)."\">".html_escape($info->author).""; + } + else { + $author = "
Author: ".html_escape($info->author); + } + } + $version = ($info->version) ? "
Version: ".html_escape($info->version) : ""; + $link = ($info->link) ? "
Home Page:link)."\">Link" : ""; + $doc = $info->documentation; + $html = " +
+ $author + $version +

$doc +

"; + $page->set_title("Documentation for ".html_escape($info->name)); $page->set_heading(html_escape($info->name)); $page->add_block(new NavBlock()); diff --git a/themes/default/style.css b/themes/default/style.css index f985ab82..911fb7f2 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -52,8 +52,8 @@ TD>INPUT[type="text"] {width: 100%;} TD>INPUT[type="password"] {width: 100%;} TD>SELECT {width: 100%;} -TABLE.zebra {} -TABLE.zebra TD {vertical-align: middle;} +TABLE.zebra {border-spacing: 0px;} +TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;} TABLE.zebra THEAD {border-bottom: 2px solid #DDD;} TABLE.zebra TR {border-bottom: 1px solid #DDD;} TABLE.zebra TR.odd {background: #EFEFEF;}
NameAuthorDescriptionLinksEnabled
EnabledNameDescription
$h_name$h_author$h_author$h_description$h_link $h_doc - - $h_name$h_description