Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-09-12 23:00:38 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-09-12 23:00:38 (GMT)
commit5d639520af6317ce96839366230418e3844a03ab (patch)
tree433d23deb5787e0934588fe3b9b0b26e43a12e3f
parentd63a74e6d9341edb69dff1c4c4187e6feead43bf (diff)
Add link to monites page for meetings
-rwxr-xr-xcgi/minutes.pl33
-rwxr-xr-xcgi/out.pl3
-rw-r--r--cgi/template/day-linkblock.tmpl8
3 files changed, 42 insertions, 2 deletions
diff --git a/cgi/minutes.pl b/cgi/minutes.pl
new file mode 100755
index 0000000..3bdd52a
--- /dev/null
+++ b/cgi/minutes.pl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use CGI;
+use HTTP::Headers;
+
+use lib 'lib';
+use IrcLog::WWW qw(http_header);
+
+my $q = new CGI;
+my $channel = $q->param('channel');
+my $file = $q->param('file');
+
+$file = "/var/log/supybot/MeetBot/$channel/meetings/$file";
+
+if (stat($file)) {
+ my $h = HTTP::Headers->new;
+ $h->header(Status => '200 OK',
+ 'Content-Type' => "text/html; charset=utf-8",
+ 'Content-Language' => 'en',
+ );
+ print $h->as_string . "\n";
+ open(FILE, $file);
+ print while <FILE>;
+} else {
+ my $h = HTTP::Headers->new;
+ $h->header(Status => '404 Not Found',
+ 'Content-Type' => "text/html; charset=utf-8",
+ 'Content-Language' => 'en',
+ );
+ print $h->as_string . "\n";
+}
diff --git a/cgi/out.pl b/cgi/out.pl
index 255778c..a385d2e 100755
--- a/cgi/out.pl
+++ b/cgi/out.pl
@@ -141,6 +141,7 @@ sub irclog_output {
if (@meeting_times == 1) {
$full_date = $meeting_times[0]{'meeting'};
+ @meeting_times = ();
} else {
$template = 'template/day-meetings.tmpl';
$title = $channel . ($meetings ? ' meetings' : '') . ', ' . $date;
@@ -166,10 +167,10 @@ sub irclog_output {
CHANNEL => $channel,
TITLE => $title,
MEETINGS => $meetings ? '/meetings' : '',
- MEETING_TIMES => \@meeting_times,
MESSAGES => \@messages,
DATE => $full_date,
);
+ $t->param(MEETING_TIMES => \@meeting_times) if @meeting_times;
# check if previous/next date exists in database
unless ($meetings) {
diff --git a/cgi/template/day-linkblock.tmpl b/cgi/template/day-linkblock.tmpl
index 0b18610..d335253 100644
--- a/cgi/template/day-linkblock.tmpl
+++ b/cgi/template/day-linkblock.tmpl
@@ -1,6 +1,12 @@
<TMPL_IF NAME=PREV_URL>
<a href="<TMPL_VAR NAME=PREV_URL>">&nbsp;&#171; Previous day</a> |
-</TMPL_IF>
+</TMPL_IF>
+<TMPL_IF MEETINGS>
+ <TMPL_IF MEETING_TIMES>
+ <TMPL_ELSE>
+ <a href="<TMPL_VAR BASE_URL><TMPL_VAR CHANNEL><TMPL_VAR MEETINGS>/<TMPL_VAR DATE>.html">Minutes</a> |
+ </TMPL_IF>
+</TMPL_IF>
<a href="<TMPL_VAR NAME=BASE_URL><TMPL_VAR NAME=CHANNEL><TMPL_VAR NAME=MEETINGS>">Index</a> |
<a href="<TMPL_VAR NAME=BASE_URL><TMPL_VAR NAME=CHANNEL><TMPL_VAR NAME=MEETINGS>/today">Today</a>
<TMPL_IF NAME=NEXT_URL>