Skip to content

Commit

Permalink
display per-channel link blocks on the channel index too
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Apr 4, 2012
1 parent 8404c3b commit b310d25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cgi/channel-index.pl
Expand Up @@ -63,6 +63,12 @@ sub get_channel_index {
$t->param(CHANNEL => $channel); $t->param(CHANNEL => $channel);
$t->param(BASE_URL => $base_url); $t->param(BASE_URL => $base_url);
$t->param(CALENDAR => calendar_for_channel($channel, $dates, $base_url)); $t->param(CALENDAR => calendar_for_channel($channel, $dates, $base_url));

my $clf = "channels/$channel.tmpl";
if (-e $clf) {
$t->param(CHANNEL_LINKS => q{} . read_file($clf));
}

return $t->output; return $t->output;
} }


Expand Down
1 change: 1 addition & 0 deletions cgi/template/channel-index.tmpl
Expand Up @@ -11,6 +11,7 @@
<body> <body>
<h1>IRC logs - Index for #<TMPL_VAR CHANNEL></h1> <h1>IRC logs - Index for #<TMPL_VAR CHANNEL></h1>


<TMPL_VAR NAME=CHANNEL_LINKS DEFAULT="">
<TMPL_INCLUDE linkblock.tmpl> <TMPL_INCLUDE linkblock.tmpl>


<h2 id="<TMPL_VAR CHANNEL>">#<TMPL_VAR CHANNEL></h2> <h2 id="<TMPL_VAR CHANNEL>">#<TMPL_VAR CHANNEL></h2>
Expand Down

0 comments on commit b310d25

Please sign in to comment.