meraproject/themes/merakomis/dictionary/staffing/controller.php

49 lines
1.4 KiB
PHP
Raw Normal View History

<?
namespace controller\themes\merakomis\dictionary\staffing;
use core\core\structure\eRowClick;
use ms\ms\structure\msControllerTable;
use themes\Merakomis;
use themes\merakomis\Emp;
use themes\merakomis\structure\merakomisControllerTable;
class Api extends merakomisControllerTable {
static $class = 'themes\merakomis\dictionary\Staffing';
public static function getForm() {
$res = [];
if(Emp::$IS_AUTH) {
$_POST[static::$class::$ID] = $_POST['id'];
$res = static::$class::getFormInfo($_POST);
$res['title'] = 'Редактор должности по штатке';
}
echo je($res);
}
public static function getTableData($post = [])
{
$post['options'][\ModuleTable::ROW_CLICK] = eRowClick::CUSTOM;
$post['getData'] = true;
$res = parent::getTableData($post);
$res['title'] = ['title'=>'Штатное расписание','subtitle'=>Merakomis::$STAFFING_TABLE_SUBTITLE,'text'=>Merakomis::$STAFFING_TABLE_TEXT];
$res['title'] = [
'title' => 'Штатное расписание',
'edit' => true,
'subtitle' => Merakomis::$STAFFING_TABLE_SUBTITLE,
'text' => Merakomis::$STAFFING_TABLE_TEXT,
'subtitle_var' => Merakomis::$_STAFFING_TABLE_SUBTITLE,
'text_var' => Merakomis::$_STAFFING_TABLE_TEXT,
];
echo je($res);
}
}