#!/usr/bin/perl
+# LiCoM - Lightweight contact manager
+# Copyright (c) 2005-2006 Florian octo Forster <octo at verplant.org>
+#
+# 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 the Free Software
+# Foundation; only version 2 of the License is applicable.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software # Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
use strict;
use warnings;
use lib (qw(lib));
my $group_esc = uri_escape ($group_name);
my $desc = $group->description ();
- print qq#\t\t\t<li><a href="$MySelf?action=browse&group=$group_esc">$group_name</a> ($members Members)#;
+ print qq#\t\t\t<li><a href="$MySelf?action=browse&group=$group_esc">$group_name</a> ($members Member#, ($members == 1 ? ')' : 's)');
print qq(<br />\n\t\t\t\t<span class="description">$desc</span>) if ($desc);
print "</li>\n";
}
"\t\t\t</tr>\n";
}
}
+
+ my @groups = LiCoM::Group->load_by_member ($cn);
+ if (@groups)
+ {
+ my $num = scalar (@groups);
+ print "\t\t\t<tr>\n",
+ "\t\t\t\t<th", ($num == 1 ? '' : qq( rowspan="$num")), ">Group", ($num == 1 ? '' : 's'), "</th>\n";
+ for (my $i = 0; $i < $num; $i++)
+ {
+ my $group = $groups[$i];
+ my $group_name = $group->name ();
+ my $group_esc = uri_escape ($group_name);
+
+ print "\t\t\t<tr>\n" if ($i != 0);
+ print qq(\t\t\t\t<td><a href="$MySelf?action=browse&group=$group_esc">$group_name</a></td>\n),
+ "\t\t\t</tr>\n";
+ }
+ }
+
print <<EOF;
</table>
print <<EOF;
<div class="foot">
"Lightweight Contact Manager",
- written 2005 by <a href="http://verplant.org/">Florian octo Forster</a>
+ written 2005-2006 by <a href="http://verplant.org/">Florian octo Forster</a>
<octo at verplant.org>
</div>
</body>