gecko-dev/webtools/litmus/preview.cgi
ccooper%deadsquid.com e325e8c6f1 - added table related_testcases to track cloned testcase relations
- update/replace enter_test.cgi with complete management interface for testcases
- make all fields Essential in Litmus::DB::Testcase
- added new methods to Litmus::DB::Testcase: clone, delete_from_subgroups, delete_from_related, delete_with_refs, update_subgroups
- added ByTestgroup and ByTestcase sql lookups to Litmus::DB::Subgroup
- added order_by directives to has_many fields in Litmus::DB::Product
- added new Litmus::FormWidget functions getTestcases and getAuthors
- don't try to .select() select fields (FormValidation.js)
- add verifySelected function to FormValidation.ja
- update interface to use manage_testcase.cgi for editing testcases
- remove editing flags/interface from test.html.tmpl
2006-06-20 19:34:53 +00:00

56 lines
1.5 KiB
Perl
Executable File

#!/usr/bin/perl -w
# -*- mode: cperl; c-basic-offset: 8; 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 Litmus.
#
# The Initial Developer of the Original Code is
# the Mozilla Corporation.
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Chris Cooper <ccooper@deadsquid.com>
# Zach Lipton <zach@zachlipton.com>
#
# ***** END LICENSE BLOCK *****
use strict;
use Litmus;
use Litmus::Auth;
use Litmus::Error;
use CGI;
use Date::Manip;
my $c = Litmus->cgi();
print $c->header;
my $vars = {
title => 'Preview',
};
if ($c->param("preview")) {
$vars->{'text_to_preview'} = $c->param("preview");
}
my $cookie = Litmus::Auth::getCookie();
$vars->{"defaultemail"} = $cookie;
$vars->{"show_admin"} = Litmus::Auth::istrusted($cookie);
Litmus->template()->process("admin/preview.tmpl", $vars) ||
internalError(Litmus->template()->error());