<?php
namespace carabi_office;
/**
 * Description of class
 *
 * @author sasha
 */
class pagehandler_incidents extends pagehandler_supportDocs {
	var $size;
	
	public function process() {
		$this->doctypeName = 'INCIDENT';
		$this->mainField = 'DEFENITION';
		$this->categoryField = 'KATEGORIYA';
		$this->categoryVocab = 'Kategoriya';
		$this->unsupportedStatus = 20775;
		if (\lib_office::hasPermission($this->user(), \lib_office::PERMISSION_INCIDENTS)) {
			$this->executeAction();
		} else {
			header("Location: " . \lib_office::OFFICE_ROOT() . "/login");
		}
	}
	
	protected function index() {
		$tpl = $this->createTemplate("content.supportDocs.tpl");
		$this->readDocsList(true);
		$tpl->assign('size', $this->size);
		$tpl->assign('colModel', $this->colModel);
		$tpl->assign("pagehandler", $this);
		$tpl->assign("docsType", "incidents");
		$tpl->display();
	}
}
?>
