Commit 512be468 authored by Simon Welsh's avatar Simon Welsh

Nicer tables

git-svn-id: svn+ssh://lsgn/var/logbot-www@63 5f99df0c-6b0a-442a-b40a-040688e84a9d
parent 7044f600
......@@ -25,8 +25,9 @@ h1, h2, h3 {
padding: 0;
}
.irc-date {font-family: Courier New, Courier, mono; white-space: nowrap; max-width: 150px;}
.irc-linenum {text-align: right;}
.irc-date {font-family: Courier New, Courier, mono; white-space: nowrap; width: 75px;}
.results .irc-date {width: 150px;}
.irc-linenum {text-align: right; padding-left: 5px;}
.irc-green {color: #009200;}
.irc-black {color: #000000;}
.irc-brown {color: #7b0000;}
......
......@@ -43,7 +43,7 @@ if(empty($results)) {
<a href={"search.php?q=" . urlencode($_GET['q']) . "&s=Time"}>time</a>.
</p>);
$body->appendChild(<logs:logs logs={$results} format="d/m/Y H:i:s" />);
$body->appendChild(<logs:logs logs={$results} format="d/m/Y H:i:s" class="results" />);
}
echo <logs:document head={$head} body={$body} />;
......@@ -16,7 +16,7 @@ class :logs:head extends :x:element {
<meta name="keywords" content={"IRC Log for " . $this->getAttribute('channel')} />
<meta name="robots" content={$this->getAttribute('robots')} />
<meta name="viewport" content="width=device-width, user-scalable=1" />
<link rel="stylesheet" type="text/css" href="logs.css?1" />
<link rel="stylesheet" type="text/css" href="logs.css?2" />
</head>;
}
}
......@@ -4,14 +4,17 @@ class :logs:logs extends :x:element {
attribute
int stamp,
array logs,
string format;
string format,
string class;
protected function render() {
$stamp = $this->getAttribute('stamp');
$format = $this->getAttribute('format');
$logs = $this->getAttribute('logs');
$table = <table class="logs" />;
$class = trim('logs ' . $this->getAttribute('class'));
$table = <table class={$class} />;
if(!$logs) {
$res = DB::inst()->query('SELECT "Time", "Text", "Command", "Target", "Nick", "ID" FROM "Log" WHERE DATE("Time") = \'' . date('Y-m-d', $stamp) . '\' ORDER BY "Time" ASC');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment