summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/ThreadTrack/Print/HTML.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-11 00:57:35 +0000
committerfukachan <fukachan>2001-11-11 00:57:35 +0000
commit6349632193b322c6590ab7f3740fa2115471eb73 (patch)
treebe435fd503d5b9aa1f912574ded3b6f41357df22 /fml/lib/Mail/ThreadTrack/Print/HTML.pm
parent4fad7f6f004c0f1b65c58a979c6fcd2f1d0a50c6 (diff)
downloadfml8-6349632193b322c6590ab7f3740fa2115471eb73.tar.gz
fml8-6349632193b322c6590ab7f3740fa2115471eb73.tar.bz2
fml8-6349632193b322c6590ab7f3740fa2115471eb73.zip
dynamic binding accoding to mode: text or html
Diffstat (limited to 'fml/lib/Mail/ThreadTrack/Print/HTML.pm')
-rw-r--r--fml/lib/Mail/ThreadTrack/Print/HTML.pm92
1 files changed, 80 insertions, 12 deletions
diff --git a/fml/lib/Mail/ThreadTrack/Print/HTML.pm b/fml/lib/Mail/ThreadTrack/Print/HTML.pm
index 2112abcf..69e1e960 100644
--- a/fml/lib/Mail/ThreadTrack/Print/HTML.pm
+++ b/fml/lib/Mail/ThreadTrack/Print/HTML.pm
@@ -1,11 +1,26 @@
+#-*- perl -*-
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: Sort.pm,v 1.4 2001/11/10 08:50:41 fukachan Exp $
+#
+
package Mail::ThreadTrack::Print::HTML;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+use CGI qw/:standard/;
+
use Mail::ThreadTrack::Print::Utils qw(decode_mime_string STR2EUC);
+# Descriptions: show articles as HTML in this thread
+# Arguments: $self $str
+# Side Effects: none
+# Return Value: none
sub show_articles_for_thread
{
my ($self, $thread_id) = @_;
@@ -46,9 +61,44 @@ sub show_articles_for_thread
}
-# This shows summary on C<$thread_id> in HTML language.
-# It is used in C<FML::CGI::ThreadSystem>.
-sub _show_thread_by_html_table
+# Descriptions: show guide
+# Arguments: $self $args
+# Side Effects: none
+# Return Value: none
+sub __start_thread_summary
+{
+ my ($self, $args) = @_;
+ my $fd = $self->{ _fd } || \*STDOUT;
+
+ print $fd "<TABLE BORDER=4>\n";
+ print $fd "<TD>id\n";
+ print $fd "<TD>summary\n";
+ print $fd "<TD>age\n";
+ print $fd "<TD>status\n";
+ print $fd "<TD>change\n";
+}
+
+
+# Descriptions: finalize thread list
+# close TABLE tag
+# Arguments: $self $args
+# Side Effects: none
+# Return Value: none
+sub __end_thread_summary
+{
+ my ($self, $args) = @_;
+ my $fd = $self->{ _fd } || \*STDOUT;
+
+ print $fd "</TABLE>\n";
+}
+
+
+# Descriptions: This shows summary on C<$thread_id> in HTML language.
+# It is used in C<FML::CGI::ThreadSystem>.
+# Arguments: $self $args
+# Side Effects: none
+# Return Value: none
+sub __print_thread_summary
{
my ($self, $optargs) = @_;
my $config = $self->{ _config };
@@ -57,12 +107,10 @@ sub _show_thread_by_html_table
my $action = 'fmlthread.cgi';
my $target = $config->{ thread_cgi_target_window } || 'ThreadCGIWindow';
- # printf($fd $format,
- # $date, $age, $status, $tid, $rh->{ _articles }->{ $tid });
my $date = $optargs->{ date };
my $age = $optargs->{ age };
my $status = $optargs->{ status };
- my $tid = $optargs->{ tid };
+ my $tid = $optargs->{ thread_id };
my $articles = $optargs->{ articles };
my $aid = (split(/\s+/, $articles))[0];
@@ -75,7 +123,11 @@ sub _show_thread_by_html_table
$action .= "&thread_id=$xtid&article_id=$aid";
print "<TR>\n";
- print "<TD>$tid\n";
+ print "<TD>";
+ print "<A HREF=\"$action&action=show\"\n\tTARGET=\"$target.show\">";
+ print $tid;
+ print "\n</A>\n";
+
print "<TD>";
# summary
@@ -91,14 +143,30 @@ sub _show_thread_by_html_table
print "<TD>$age\n";
print "<TD>$status\n";
print "<TD>";
- print "<A HREF=\"$action&action=close\" TARGET=\"$target.close\">";
- print "[close]</A>\n";
- print "<BR>\n";
- print "<A HREF=\"$action&action=show\" TARGET=\"$target.show\">";
- print "[see articles]</A>\n";
+ my $name = "change-status=$tid";
+ my $values = ['open', 'analyzed', 'closed'];
+ my $default = $status;
+ print checkbox_group(-name=>$name,
+ -values=>$values,
+ -defaults=>$default,
+ -linebreak=>'true',
+ );
+
+ # print "<A HREF=\"$action&action=close\" TARGET=\"$target.close\">";
+ # print "[close]</A>\n";
print "\n\n";
}
+# Descriptions: dummy
+# Arguments: none
+# Side Effects: none
+# Return Value: none
+sub __print_message_summary
+{
+ ;
+}
+
+
1;