Fixed some annoying showstopper bugs with stats:
authorrich <rich>
Sat, 23 Oct 2004 16:34:57 +0000 (16:34 +0000)
committerrich <rich>
Sat, 23 Oct 2004 16:34:57 +0000 (16:34 +0000)
* Stats top frame now has styling so you can actually see the buttons.
* Redirect to the canonical_hostname page, so we actually go to the right place.

Updated MANIFEST.

Bumped version for release.

MANIFEST
debian/changelog
html/_css/stats_top.css [new file with mode: 0644]
scripts/stats.ml
scripts/stats_top.ml
templates/stats.html
templates/stats_top.html

index 91fec43..86bdce6 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -23,6 +23,7 @@ html/_css/login.css
 html/_css/markup.css
 html/_css/print.css
 html/_css/standard.css
+html/_css/stats.css
 html/_css/tables.css
 html/_css/users.css
 html/_css/visualise_links.css
index 7890726..8470276 100644 (file)
@@ -1,4 +1,4 @@
-cocanwiki (1.3.2-1) unstable; urgency=low
+cocanwiki (1.3.2-2) unstable; urgency=low
 
   * Initial Release.
 
diff --git a/html/_css/stats_top.css b/html/_css/stats_top.css
new file mode 100644 (file)
index 0000000..d0feb76
--- /dev/null
@@ -0,0 +1,25 @@
+/* $Id: stats_top.css,v 1.1 2004/10/23 16:34:58 rich Exp $ */
+
+body {
+  background: #fff;
+  color: #000;
+  font-family: trebuchet ms, palatino, georgia, arial, helvetica, sans-serif;
+}
+
+/* Menus. */
+ul.menu {
+  padding: 0px;
+  margin-left: 1em;
+  list-style: none;
+}
+
+ul.menu li {
+  display: inline;
+  border-left: 1px solid #666;
+  padding-left: 5px;
+}
+
+ul.menu li.first {
+  border-left: none;
+  padding-left: 0px;
+}
index 3d29afb..1369474 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: stats.ml,v 1.2 2004/10/07 16:54:24 rich Exp $
+ * $Id: stats.ml,v 1.3 2004/10/23 16:34:58 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,7 +30,8 @@ open Cocanwiki
 open Cocanwiki_template
 open Cocanwiki_server_settings
 
-let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid
+    { canonical_hostname = canonical_hostname } _ =
   let template = get_template dbh hostid "stats.html" in
 
   let page = q#param "page" in
@@ -64,7 +65,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
   template#set "page" page;
   template#set "url" url;
   template#set "hash" h;
-  template#set "hostname" hostname;
+  template#set "hostname" canonical_hostname;
 
   q#template template
 
index 48ddea9..cf16da4 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: stats_top.ml,v 1.1 2004/09/23 15:16:21 rich Exp $
+ * $Id: stats_top.ml,v 1.2 2004/10/23 16:34:58 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@ open Cocanwiki
 open Cocanwiki_template
 open Cocanwiki_server_settings
 
-let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid
+  { canonical_hostname = canonical_hostname } _ =
   let template = get_template dbh hostid "stats_top.html" in
 
   let page = q#param "page" in
@@ -40,7 +41,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
       | Some s -> s in
 
   template#set "stats_page" stats_page;
-  template#set "hostname" hostname;
+  template#set "hostname" canonical_hostname;
   template#set "page" page;
 
   q#template template
index dc39df1..13d5ca0 100644 (file)
@@ -7,8 +7,8 @@
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head>
-<frameset rows="10%, 90%">
-  <frame src="/_bin/stats_top.cmo?page=::page_url::" name="top_frame"/>
+<frameset rows="5%, 95%">
+  <frame src="/_bin/stats_top.cmo?page=::page_url::" name="top_frame" scrolling="auto"/>
   <frame src="::stats_page_html_tag::::hostname_html_tag::/::year::W::week::/page-::hash_html_tag::.html" name="stats_frame"/>
 
 <noframes>
index cddd1e8..bafe9da 100644 (file)
@@ -4,8 +4,7 @@
 <title>Stats navigation frame</title>
 <meta name="robots" content="noindex,nofollow"/>
 <meta name="author" content="http://www.merjis.com/" />
-<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
-<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
+<link rel="stylesheet" href="/_css/stats_top.css" type="text/css" title="Standard"/>
 </head><body>
 
 <ul class="menu">