##
## $Source: /usr/cvsroot/melati/melati/src/main/java/org/melati/admin/EditHeader.wm,v $
## $Revision: 1.58 $
##
## Copyright (C) 2000 Tim Joyce
##
## Part of Melati (http://melati.org), a framework for the rapid
## development of clean, maintainable web applications.
##
## Melati is free software; Permission is granted to copy, distribute
## and/or modify this software under the terms either:
##
## (a) the GNU General Public License as published by the Free Software
##    Foundation; either version 2 of the License, or (at your option)
##    any later version,
##
##    or
##
## (b) any version of the Melati Software License, as published
##    at http://melati.org
##
## You should have received a copy of the GNU General Public License and
## the Melati Software License along with this program;
## if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA to obtain the
## GNU General Public License and visit http://melati.org to obtain the
## Melati Software License.
##
## Feel free to contact the Developers of Melati (http://melati.org),
## if you would like to work out a different arrangement than the options
## outlined here.  It is our intention to allow Melati to be used by as
## wide an audience as possible.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## Contact details for copyright holder:
##
##     Tim Joyce <timj At paneris.org>
##     http://paneris.org/~timj
##
#set $returnTarget = $Form.returnTarget
#if ($returnTarget == null) #begin
 #set $returnTarget = ""
#end
#set $returnURL = $Form.returnURL
#if ($returnURL == null) #begin
 #set $returnURL = ""
#end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <title>Edit a $ml.rendered($melati.Table.DisplayName) Record</title>
 <meta name="version" content="CVS \$Id: EditHeader.wm,v 1.58 2011/08/21 22:19:58 timp Exp $">
 <link rel="stylesheet" title="Default" href="$admin.getScreenStylesheetURL($melati)"
      type="text/css" media="screen">
</head>

<body bgcolor="#E9EDFD" id="editHeader">
<table cellpadding="4" cellspacing="4" width="100%">
 <tr>
  <td valign="top">
 <script type="text/javascript"> 
 <!--
  document.write ("<a href='$admin.TreeURL($melati.Object)?returnTarget=$returnTarget&amp;returnURL=$returnURL' ");
  document.write ("   target='$admin.EditFrameName($melati)' ");
  document.write ("   id='recordTree' ");
  document.write ("   title='Display tree view'><img ");
  document.write ("   src='$admin.StaticURL/tree.gif' ");
  document.write ("   alt='Tree view' border='0' />");
  document.write ("</a>");
 // -->
 </script>
  
   &nbsp;<div style='display:inline;' #if($melati.Table.Description) #begin title='$melati.Table.Description' #end>
   <font face="Arial, Helvetica" size="2">$melati.Table.DisplayName</font></div><font 
     face="Arial, Helvetica" size="2">:
<a href= "$admin.EditURL($melati)?returnTarget=$returnTarget&amp;returnURL=$returnURL"
target="$admin.EditFrameName($melati)"
title="Display $ml.rendered($melati.Object.toString())">
$ml.rendered($melati.Object.toString())</a>
   </font>
  </td>
#set $references = $melati.Database.referencesTo($melati.Table)
#if ($references.hasMoreElements()) #begin
  <td align="right" valign="top">
   <p>
    <font face="Arial, Helvetica" size="-1">
#foreach $column in $references #begin
[&nbsp;<a href="$admin.SelectionRightURL($column.Table)?field_$ml.rendered($column.Name)=$ml.Attr.rendered($melati.Object.Troid)" 
          target="$admin.EditFrameName($melati)"
          id="$admin.EditFrameName($melati)"
          title="Show associated $column.Table.DisplayName records">$column.Table.DisplayName</a>&nbsp;]
#end
    </font>
   </p>
  </td>
#end 
</tr>
</table>
</body>
</html>

