<?php
/**
 * Класс для облегчения формирования UI в модулях
 */

class ui_config_module_dv_imoney extends ui_config_module {

	protected $MODULE_PATH;

	public $headerText = DV_IMONEY;

	function ui_config_module_dv_imoney ( $view, $params ) {
		$this->tabs[] = array(
			'id' => "info",
			'caption' => DV_IMONEY_ADMIN_TEMPLATE_INFO_TAB,
			'location' => "module.3dvimoney.info",
			'group' => "admin"
		);
		$this->tabs[] = array(
			'id' => "settings",
			'caption' => DV_IMONEY_ADMIN_TEMPLATE_SETTINGS_TAB,
			'location' => "module.3dvimoney.settings",
			'group' => "admin"
		);

		$this->activeTab = $view;
		$this->locationHash = "module.3dvimoney.".$view . ($params ? "(".$params.")" : "");
		$this->treeMode = "modules";

		$module_settings = nc_Core::get_object()->modules->get_by_keyword('3dvimoney');
		$this->treeSelectedNode = "module-".$module_settings['Module_ID'];
	}

	public function add_settings_toolbar() {
		$this->toolbar[] = array(
			'id' => "settings",
			'caption' => DV_IMONEY_ADMIN_TEMPLATE_GENERAL_TAB,
			'location' => "module.3dvimoney.settings",
			'group' => "admin"
		);

		$this->toolbar[] = array(
			'id' => "display",
			'caption' => DV_IMONEY_ADMIN_TEMPLATE_DISPLAY_TAB,
			'location' => "module.3dvimoney.display",
			'group' => "admin"
		);

		$this->toolbar[] = array(
			'id' => "system",
			'caption' => DV_IMONEY_ADMIN_TEMPLATE_SYSTEM_TAB,
			'location' => "module.3dvimoney.system",
			'group' => "admin"
		);


		$this->activeToolbarButtons[] = $this->activeTab;
		$this->activeTab = 'settings';
	}

}


