X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=maps%2Fbin%2Fdetail.cgi;h=b4c3e902e8e0251938ce366e42d4db434dffef13;hb=8af32b28b56662686b6ceb59f2e00dc19cfc7a33;hp=de7fd29c1d4638501b7646cb885f0574f6ce1ca7;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git
diff --git a/maps/bin/detail.cgi b/maps/bin/detail.cgi
index de7fd29..b4c3e90 100755
--- a/maps/bin/detail.cgi
+++ b/maps/bin/detail.cgi
@@ -1,5 +1,6 @@
#!/usr/bin/perl
#################################################################################
+#
# File: $RCSfile: detail.cgi,v $
# Revision: $Revision: 1.1 $
# Description: Displays list of email addresses based on report type.
@@ -10,7 +11,8 @@
#
# (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
#
-################################################################################use strict;
+################################################################################
+use strict;
use warnings;
use MIME::Words qw(:all);
@@ -75,11 +77,13 @@ sub MakeButtons {
my $type = shift;
my $prev_button = $prev >= 0 ?
- a ({-href => "detail.cgi?type=$type;date=$date;next=$prev"},
- '
') : '';
+ a ({-href => "detail.cgi?type=$type;date=$date;next=$prev",
+ -accesskey => 'p',
+ }, '
') : '';
my $next_button = ($next + $lines) < $total ?
- a {-href => "detail.cgi?type=$type;date=$date;next=" . ($next + $lines)},
- '
' : '';
+ a {-href => "detail.cgi?type=$type;date=$date;next=" . ($next + $lines),
+ -accesskey => 'n',
+ }, '
' : '';
my $buttons = $prev_button;
@@ -169,6 +173,33 @@ sub PrintTable {
foreach my $sender (ReturnSenders $userid, $type, $next, $lines, $date) {
my @msgs = ReturnMessages $userid, $sender;
+ my @msgs2 = @msgs;
+ my $onlist;
+ my $rule = 'none';
+ my $hit_count = 0;
+
+ ($onlist, $rule, $hit_count) = OnWhitelist $sender, $userid, 0;
+
+ unless ($onlist) {
+ ($onlist, $rule, $hit_count) = OnBlacklist $sender, 0;
+
+ unless ($onlist) {
+ ($onlist, $rule, $hit_count) = OnNulllist $sender, 0;
+ } # unless
+ } # unless
+
+ if ($rule) {
+ $rule =~ s/Matching rule: \(//;
+ $rule =~ s/\)//;
+
+ if ($rule =~ /(\w+):(\d+)/) {
+ my $list = $1;
+ my $sequence = $2 - 1;
+ my $link = "$list:$2/$hit_count";
+
+ $rule =~ s/\w+:\d+/$link/;
+ } # if
+ } # if
$next++;
print
@@ -177,7 +208,7 @@ sub PrintTable {
td {-class => 'tableborder'}, small ($next,
checkbox {-name => "action$next",
-label => ''}),
- hidden ({-name => "email$next",
+ hidden ({-name => "email$next",
-default => $sender});
print
start_td {-align => 'left'};
@@ -189,12 +220,16 @@ sub PrintTable {
-width => '100%',
-bgcolor => '#d4d0c8'};
print
- td {-class => 'tablelabel',
- -valign => 'middle',
- -width => '40'}, 'Sender:',
- td {-class => 'sender',
- -valign => 'middle'},
- a {-href => "mailto:$sender"}, $sender;
+ td {-class => 'tablelabel',
+ -valign => 'middle',
+ -width => '40'}, 'Sender:',
+ td {-class => 'sender',
+ -valign => 'middle',
+ -width => '40%'},
+ a {-href => "mailto:$sender?subject=$msgs2[0][0]"}, $sender,
+ td {
+ -valign => 'middle'},
+ $rule;
print
end_table;
@@ -236,7 +271,7 @@ sub PrintTable {
-bgcolor => '#ffffff'},
a {-href => "display.cgi?sender=$sender;msg_nbr=$msg_nbr"}, $subject,
td {-class => 'date',
- -width => '130',
+ -width => '150',
-valign => 'middle'}, $msg_date
];
print end_table;
@@ -260,6 +295,7 @@ sub PrintTable {
} # PrintTable
# Main
+my $condition;
my @scripts = ('ListActions.js');
my $heading_date =$date ne '' ? ' on ' . FormatDate ($date) : '';