[%# 1.0@bugzilla.org %]
[%# 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 Bugzilla Test Runner System.
  #
  # The Initial Developer of the Original Code is Maciej Maczynski.
  # Portions created by Maciej Maczynski are Copyright (C) 2001
  # Maciej Maczynski. All Rights Reserved.
  #
  # Contributor(s): Greg Hendricks <ghendricks@novell.com>
  #%]

[%# INTERFACE:
  # ...
  #%]
  

<div style="background-color:#CCCCFF;padding:5px; width:600px">
<table>
  <tr>
    <td width="70%" valign="top">
This is the environment editor. 
To add elements to your environment drag them from the available items on the tree to your right and 
drop them on the environment tree on your left. Once you have chosen your elements, be sure to select 
values for each of the properties.
    </td>
    <td align="right">
      <table>
        <tr>
          <th colspan="2">Legend</th>
        </tr>
        <tr>
          <td><img src="testopia/img/square.png"></td><td>Environment Category</td>
        </tr>
        <tr>
          <td><img src="testopia/img/circle.png"></td><td>Environment Element</td>
        </tr>
        <tr>
          <td><img src="testopia/img/triangle.png"></td><td>Element Property</td>
        </tr>
        <tr>
          <td><img src="testopia/img/selected_value.png" width="12" height="12"></td><td>Selected Property Value</td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</div>
<table>
  <tr>
    <th>Name</th>
    <td><input name="env_name" id="env_name" value="[% environment.name FILTER html %]" size="40"></td>
    <td>
  [% IF user.in_group('Testers') %]
    <a href="tr_new_environment.cgi">Create a New Environment</a></td>
  [% END %]
  </tr>
  <tr>
    <th>Product</th>
    <td>
    [% IF environment.canedit %]   
         [% PROCESS select sel = { 
                name      => 'product_id',
                list      =>  user.get_selectable_products,
                default   =>  environment.product_id,
                accesskey => 'p'} %]
    [% ELSE %]
      [% environment.product.name FILTER html %]
    [% END %]
    </td>
    <td>
  [% IF user.in_group('Testers') %]
    <a href="tr_admin_environment.cgi">Edit Environment Variables</a></td>
  [% END %]
  </tr>
  <tr>
    <th>Archive</th><td><input type="checkbox" name="isactive" id="isactive" value="1" [% 'checked="checked"' IF NOT environment.isactive %]></td>
[% IF environment.candelete %]    
    <td><a href="tr_show_environment.cgi?env_id=[% environment.id FILTER none %]&action=delete">Delete this Environment</a></td>
[% END %]
  </tr>
[% IF environment.canedit %]   
  <tr>
    <td colspan=2" align="right"><input type="button" onclick="update()" value="Commit"></td>
  </tr>
[% END %]
</table>