zebra tables
This commit is contained in:
parent
5ca0110a23
commit
bab82b914d
@ -4,9 +4,12 @@ class ExtManagerTheme extends Themelet {
|
|||||||
public function display_table(Page $page, $extensions) {
|
public function display_table(Page $page, $extensions) {
|
||||||
$html = "
|
$html = "
|
||||||
<form action='".make_link("ext_manager/set")."' method='POST'>
|
<form action='".make_link("ext_manager/set")."' method='POST'>
|
||||||
<table border='1'>
|
<table class='zebra'>
|
||||||
<tr><th>Name</th><th>Author</th><th>Description</th><th>Links</th><th>Enabled</th></tr>
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Author</th><th>Description</th><th>Links</th><th>Enabled</th></tr>
|
||||||
|
</thead>
|
||||||
";
|
";
|
||||||
|
$n = 0;
|
||||||
foreach($extensions as $extension) {
|
foreach($extensions as $extension) {
|
||||||
$ext_name = $extension->ext_name;
|
$ext_name = $extension->ext_name;
|
||||||
$h_name = empty($extension->name) ? $ext_name : html_escape($extension->name);
|
$h_name = empty($extension->name) ? $ext_name : html_escape($extension->name);
|
||||||
@ -18,9 +21,10 @@ class ExtManagerTheme extends Themelet {
|
|||||||
$h_author = html_escape($extension->author);
|
$h_author = html_escape($extension->author);
|
||||||
$h_description = html_escape($extension->description);
|
$h_description = html_escape($extension->description);
|
||||||
$h_enabled = $extension->enabled ? " checked='checked'" : "";
|
$h_enabled = $extension->enabled ? " checked='checked'" : "";
|
||||||
|
$oe = ($n++ % 2 == 0) ? "even" : "odd";
|
||||||
|
|
||||||
$html .= "
|
$html .= "
|
||||||
<tr>
|
<tr class='$oe'>
|
||||||
<td>$h_name</td>
|
<td>$h_name</td>
|
||||||
" . (
|
" . (
|
||||||
empty($h_email) ?
|
empty($h_email) ?
|
||||||
@ -35,7 +39,7 @@ class ExtManagerTheme extends Themelet {
|
|||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
$html .= "
|
$html .= "
|
||||||
<tr><td colspan='4'><input type='submit' value='Set Extensions'></td></tr>
|
<tr><td colspan='5'><input type='submit' value='Set Extensions'></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
|
@ -52,6 +52,13 @@ TD>INPUT[type="text"] {width: 100%;}
|
|||||||
TD>INPUT[type="password"] {width: 100%;}
|
TD>INPUT[type="password"] {width: 100%;}
|
||||||
TD>SELECT {width: 100%;}
|
TD>SELECT {width: 100%;}
|
||||||
|
|
||||||
|
TABLE.zebra {}
|
||||||
|
TABLE.zebra TD {vertical-align: middle;}
|
||||||
|
TABLE.zebra THEAD {border-bottom: 2px solid #DDD;}
|
||||||
|
TABLE.zebra TR {border-bottom: 1px solid #DDD;}
|
||||||
|
TABLE.zebra TR.odd {background: #EFEFEF;}
|
||||||
|
TABLE.zebra TR.even {background: #E0E0E0;}
|
||||||
|
|
||||||
#footer {
|
#footer {
|
||||||
clear: both;
|
clear: both;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user