pjs/webtools/registry/who.html.tmpl

104 строки
3.7 KiB
Cheetah

[%# -*- Mode: perl; indent-tabs-mode: nil -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Application Registry.
#
# The Initial Developer of the Original Code is Mozilla Corporation. Portions
# created by Mozilla Corporation are Copyright (C) 2007 Mozilla Foundation.
# All Rights Reserved.
#
# Contributor(s): Dave Miller <justdave@mozilla.com>
#
# ***** END LICENSE BLOCK *****
-%]
[%- USE CGI;
email = CGI.param('email');
fixed_email = email.replace('%','@');
userhost = fixed_email.split('@');
username = userhost.0;
hostname = userhost.1;
SET hostname = 'mozilla.org' IF NOT hostname;
extralist = [];
i = 0;
WHILE CGI.param("u$i") OR CGI.param("t$i");
u = CGI.param("u$i");
t = CGI.param("t$i");
SET t = u IF NOT t;
extralist.push( { url => u, text => t } );
i = i + 1;
END;
-%]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>[% fixed_email FILTER html %] - Registry</title>
<base target="_top">
</head>
<body>
<table border="2" bgcolor="#ffffff" cellspacing="0" cellpadding="3">
<tr>
<td>
[% FOREACH extra IN extralist -%]
[% IF extra.url -%]
<a href="[% extra.url FILTER html %]">[% extra.text FILTER html %]</a><br>
[% ELSE -%]
[% extra.text FILTER html %]<br>
[% END -%]
[% END -%]
[% fixed_email FILTER html %]<br>
[% IF CGI.param('d') -%]
[% last_checkin_data = CGI.param('d').split('\|') -%]
[% UNLESS last_checkin_data.2 == '/cvsroot' %]
[% bonsai_root = bonsai_root _ '-' _ last_checkin_data.2.match('^/(.*)$').0 %]
[% END %]
[% FILTER null;
cgi = CGI.new('');
cgi.param('module', last_checkin_data.0);
cgi.param('branch', last_checkin_data.1);
cgi.param('cvsroot', last_checkin_data.2);
cgi.param('date', 'explicit');
cgi.param('mindate', last_checkin_data.3);
cgi.param('maxdate', last_checkin_data.4);
cgi.param('who', email);
END; -%]
<a href="[% "$bonsai_root/cvsquery.cgi?$cgi.query_string" FILTER html %]">Last check-in</a><br>
[% FILTER null;
cgi = CGI.new('');
cgi.param('module', last_checkin_data.0);
cgi.param('branch', last_checkin_data.1);
cgi.param('cvsroot', last_checkin_data.2);
cgi.param('date', 'day');
cgi.param('who', email);
END; -%]
<a href="[% "$bonsai_root/cvsquery.cgi?$cgi.query_string" FILTER html %]">Check-ins within 24 hours</a><br>
[% END -%]
[% FILTER null;
cgi = CGI.new('');
cgi.param('module', 'allrepositories');
cgi.param('branch', '');
cgi.param('who', email);
cgi.param('sortby', 'Date');
cgi.param('date', 'week');
END; -%]
<a href="[% "$bonsai_root/cvsquery.cgi?$cgi.query_string" FILTER html %]">Check-ins within 7 days</a><br>
<a href="mailto:[% username FILTER html %]&#64;[% hostname FILTER html %]">Send Mail</a>
</td>
</tr>
</table>
</body>
</html>