separate links for info and help

This commit is contained in:
Shish 2009-01-16 18:25:39 -08:00
parent c3769a1958
commit 078d246396
3 changed files with 13 additions and 14 deletions

View File

@ -5,11 +5,11 @@
* License: GPLv2
* Description: Bulk add server-side images
* Documentation:
* Upload the images into a new directory via ftp or similar,
* go to shimmie's admin page and put that directory in the
* bulk add box. If there are subdirectories, they get used
* as tags (eg if you upload into /home/bob/uploads/holiday/2008/
* and point shimmie ad /home/bob/uploads, then images will be
* Upload the images into a new directory via ftp or similar, go to
* shimmie's admin page and put that directory in the bulk add box.
* If there are subdirectories, they get used as tags (eg if you
* upload into <code>/home/bob/uploads/holiday/2008/</code> and point
* shimmie at <code>/home/bob/uploads</code>, then images will be
* tagged "holiday 2008")
*/

View File

@ -58,9 +58,6 @@ class ExtensionInfo { // {{{
break;
}
}
if(is_null($this->link) && !is_null($this->documentation)) {
$this->link = make_link("ext_doc/{$this->ext_name}");
}
}
private function is_enabled($fname) {

View File

@ -5,28 +5,30 @@ class ExtManagerTheme extends Themelet {
$html = "
<form action='".make_link("ext_manager/set")."' method='POST'>
<table border='1'>
<tr><th>Name</th><th>Author</th><th>Description</th><th>Enabled</th></tr>
<tr><th>Name</th><th>Author</th><th>Description</th><th>Links</th><th>Enabled</th></tr>
";
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) ? html_escape($extension->link) : "";
$h_link = isset($extension->link) ?
"<a href=\"".html_escape($extension->link)."\">Info</a>" : "";
$h_doc = isset($extension->documentation) ?
"<a href=\"".make_link("ext_doc/".html_escape($extension->ext_name))."\">Help</a>" : "";
$h_author = html_escape($extension->author);
$h_description = html_escape($extension->description);
$h_enabled = $extension->enabled ? " checked='checked'" : "";
$html .= "
<tr>
<td>$h_name</td>
" . (
empty($h_link) ?
"<td>$h_name</td>" :
"<td><a href='$h_link'>$h_name</a></td>"
) . (
empty($h_email) ?
"<td>$h_author</td>" :
"<td><a href='mailto:$h_email'>$h_author</a></td>"
) . "
<td>$h_description</td>
<td>$h_link $h_doc</td>
<td>
<input type='checkbox' name='ext_$ext_name'$h_enabled>
</td>