<?php

Lib::loadClass('View');
Lib::loadClass('ProcesLogMenuView');

class ProcesLogView extends View {

	var $_menu;
	var $_cnt;

	function __construct() {
		parent::__construct();
		$this->_menu = new ProcesLogMenuView();
		$this->_cnt = null;
	}

	function set_content_view($view) {
		$this->_cnt = $view;
	}

	function set_menu($key, $value) {
		$this->_menu->set($key, $value);
	}

	function render() {
		$cnt_out = 'TODO: content';

		$out = '<style type="text/css">' . "
body { margin:0; font-family:arial; }
#proces-panel { margin:0 0 10px 0; padding:0 5px; background:#000; color:#fff; border-bottom:2px solid #969696; overflow:hidden; font-size:12px; }
 #proces-panel form { display:inline; }
 #proces-panel a { color:#fff; text-decoration:none; }
 #proces-panel a:hover { color:#fff; text-decoration:underline; }
#proces-content { margin:0; padding:0 14px; background:#fff; color:#333; font-size:12px; }
 #proces-content em { color:#999; }
.next-steps {border-top:2px solid #ddd; bacground:#eee;}
" 	. '</style>' . "\n"
		. $this->_menu->render()
		. '<div id="proces-content">'
			. ((isset($this->_cnt) && $this->_cnt instanceof View)? $this->_cnt->render() : '')
		. '</div>';
		return $out;
	}

}
