[Rt-commit] r7403 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 29 21:28:03 EDT 2007
Author: ruz
Date: Thu Mar 29 21:28:03 2007
New Revision: 7403
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Admin/Elements/ShowPrivateKeyInfo
Log:
r4870 at cubic-pc: cubic | 2007-03-30 05:23:11 +0400
* generalize comp for any type of keys
Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Elements/ShowPrivateKeyInfo
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Elements/ShowPrivateKeyInfo (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Elements/ShowPrivateKeyInfo Thu Mar 29 21:28:03 2007
@@ -1,9 +1,13 @@
-<&| /Widgets/TitleBox, title => loc('GnuPG private key for [_1]', $EmailAddress) &>
+<&| /Widgets/TitleBox, title => $title &>
% if ( $res{'exit_code'} || !keys %{ $res{'info'} } ) {
-<% loc('No private key') %>
+<% loc('No keys for this address') %>
% } else {
<table>
+% unless ( $Type eq 'private' ) {
+<tr><th><% loc('Trust') %>:</th> <td><% loc( $res{'info'}{'Trust'} ) %></td></tr>
+% }
+
<tr><th><% loc('Created') %>:</th>
<td><% $res{'info'}{'Created'}? $res{'info'}{'Created'}->AsString( Time => 0 ): loc('never') %></td></tr>
@@ -24,10 +28,17 @@
<%ARGS>
$EmailAddress
+$Type => 'public'
</%ARGS>
<%INIT>
require RT::Crypt::GnuPG;
-my %res = RT::Crypt::GnuPG::GetPrivateKeyInfo( $EmailAddress );
+my %res = RT::Crypt::GnuPG::GetKeyInfo( $EmailAddress, $Type );
-</%INIT>
+my $title;
+unless ( $Type eq 'private' ) {
+ $title = loc('GnuPG public key(s) for [_1]', $EmailAddress);
+} else {
+ $title = loc('GnuPG private key(s) for [_1]', $EmailAddress);
+}
+</%INIT>
More information about the Rt-commit
mailing list