#!/bin/csh
# This is a program for the example Genesis Tooling Forms.
# This file will exist in both forms (1 and 2).
# The purpose of this program is to display the job progress report to the user.
# It is called by the "View Job Log" button.
# 
# Written by Ian Ticehurst (Autom8 Ltd.)
# Version 1A. Date: 08.09.00 - Initial design and development.
# Version 1B. Date: 11.12.00 - Add source of info. file to support gui creation.
# Version 1C. Date: 12.12.00 - Re-write the gui windows to use the sourced font and colours.
# Version 1D. Date: 05.02.01 - Modify to only check job path if job moved from original location.
# Version 1E. Date: 09.02.01 - Modify the setting and useage of $TMP.
# Version 1F. Date: 14.03.01 - Check how "$GENESIS_EDIR" is set to ensure paths are set correctly.
# Version 1G. Date: 14.03.01 - Change default texteditor to use the command "form_callback_editor".
######################################################################### 
source $_genesis_root/sys/scripts/include_me

if (-e $JOB_PATH/user/control_log) then
   cp $JOB_PATH/user/control_log $TMP/tmp_cl.$$
   chmod 444 $TMP/tmp_cl.$$
   COM form_callback_editor,path=$TMP/tmp_cl.$$
   sleep 2
   chmod 777 $TMP/tmp_cl.$$
   \rm $TMP/tmp_cl.$$
else
   o_tooling
   o FONT $NORM_FNT
   o BG $WARN_COL
   o BW 0
   o LABEL No log file found
   o BG $NORM_COL
   o END

   do_gui
endif

exit 0
