Skip Menu |

This queue is for tickets about the RTx-EmailCompletion CPAN distribution.

Report information
The Basics
Id: 55118
Status: open
Priority: 0/
Queue: RTx-EmailCompletion

People
Owner: Nobody in particular
Requestors: jcharaoui [...] cmaisonneuve.qc.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Display RealName in autocomplete drop-down
Date: Mon, 1 Mar 2010 17:18:40 -0500
To: <bug-RTx-EmailCompletion [...] rt.cpan.org>
From: Jérôme Charaoui <jcharaoui [...] cmaisonneuve.qc.ca>
Hi, I think that RealName would be great to display along with the actual email in the autocomplete drop-down. I made a small patch that adds this feature for rdbms search, for demonstration purposes. If there's interest I could work on a more complete patch. Thanks, -- Jérôme Charaoui Service informatique - Collège de Maisonneuve
--- a/html/SelfService/Ajax/EmailCompletion 2009-03-13 08:42:08.000000000 -0400 +++ b/html/SelfService/Ajax/EmailCompletion 2010-03-01 16:26:47.000000000 -0500 @@ -43,8 +43,11 @@ my ($emails, $ldaps) = RTx::EmailCompletion::search($Email, $CurrentUser); my $users = qq{<ul class="contacts">}; -for my $email (@$emails) { - $users .= qq{<li class="contact"><div class="email">$email</div></li>}; + +foreach (@$emails) { + my $name = ${$_}[0]; + my $emailaddress = ${$_}[1]; + $users .= qq{<li class="contact"><span class="informal">$name<br /></span><div class="email">$emailaddress</div></li>}; } for my $email (@$ldaps) { $users .= qq{<li class="contact ldap"><div class="email">$email</div></li>}; --- a/lib/RTx/EmailCompletion.pm 2009-03-13 09:15:33.000000000 -0400 +++ b/lib/RTx/EmailCompletion.pm 2010-03-01 15:31:50.000000000 -0500 @@ -52,7 +52,7 @@ @users = (); } - my @email = map { $_->EmailAddress() } @users; + my @email = map { [ $_->RealName(), $_->EmailAddress() ] } @users; } # we dynamically build search function
Subject: Re: [rt.cpan.org #55118] Display RealName in autocomplete drop-down
Date: Mon, 1 Mar 2010 17:32:22 -0500
To: Jérôme Charaoui via RT <bug-RTx-EmailCompletion [...] rt.cpan.org>
From: Kevin Falcone <cpan [...] jibsheet.com>
Show quoted text
> I think that RealName would be great to display along with the actual > email in the autocomplete drop-down. > > I made a small patch that adds this feature for rdbms search, for > demonstration purposes. > > If there's interest I could work on a more complete patch.
If you have time to work on a patch, I think I'd really like a config option to say "show all these attributes" which takes a list of methods on User objects. In the past I've tweaked this to show other things, including Organization and it would be useful to make that configurable. The difficulty lies in the generated span/div html and giving it a good default styling. -kevin
Subject: Re: [rt.cpan.org #55118] Display RealName in autocomplete drop-down
Date: Fri, 5 Mar 2010 15:00:57 -0500
To: "bug-RTx-EmailCompletion [...] rt.cpan.org" <bug-RTx-EmailCompletion [...] rt.cpan.org>
From: Jérôme Charaoui <jcharaoui [...] cmaisonneuve.qc.ca>
Kevin Falcone via RT a écrit : Show quoted text
> If you have time to work on a patch, I think I'd really like a config > option to say "show all these attributes" which takes a list of > methods on User objects. In the past I've tweaked this to show other > things, including Organization and it would be useful to make that > configurable. > > The difficulty lies in the generated span/div html and giving it a > good default styling.
I agree that this should be configurable. I think the format could be inspired from the DefaultSearchResultFormat, albeit simpler. -- Jérôme Charaoui Service informatique - Collège de Maisonneuve