<?php
$this->customconfigs['packageName'] = 'publics';
$this->customconfigs['task'] = 'publics';
$this->customconfigs['formcaption'] = 'Публикация';
$this->customconfigs['migx_add'] = 'Добавить публикацию';
$this->customconfigs['update_win_title'] = 'Публикация';
$this->customconfigs['classname'] = 'modResource';
$this->customconfigs['getlistsort'] = 'id';
$this->customconfigs['getlistsortdir'] = 'desc';
$this->customconfigs['gridpagesize'] = '100';
$this->customconfigs['gridload_mode'] = '2';
$this->customconfigs['check_resid'] = '2';
$this->customconfigs['includeTVs'] = 'img,tags';
$this->customconfigs['tabs'] = [];
$this->customconfigs['tabs'][] =
[
'caption' => 'Документ',
'fields' => [[
'field' => 'pagetitle',
'caption' => 'Заголовок'
], [
'field' => 'deletedon',
'caption' => 'Дата публикации',
'inputTVtype' => 'date'
], [
'field' => 'img',
'caption' => 'Изображение в списке',
'inputTV' => 'img'
], [
'field' => 'longtitle',
'caption' => 'Расширенный заголовок'
], [
'field' => 'description',
'caption' => 'Описание',
'inputTVtype' => 'textarea'
], [
'field' => 'introtext',
'caption' => 'Аннотация',
'inputTVtype' => 'textarea'
], [
'field' => 'tags',
'caption' => 'Список тегов',
'inputTV' => 'tags'
], [
'field' => 'content',
'caption' => 'Контент',
'inputTVtype' => 'richtext'
], [
'field' => 'cacheable',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '0'
], [
'field' => 'hidemenu',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '1'
], [
'field' => 'isfolder',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '1'
], [
'field' => 'published',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '0'
], [
'field' => 'show_in_tree',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '0'
], [
'field' => 'template',
'caption' => '',
'inputTVtype' => 'hidden',
'default' => '4'
]]
];
$this->customconfigs['filters'] = [];
$this->customconfigs['filters'][] = [ // Фильтрация по коду
'name' => 'search',
'label' => 'Поиск',
'emptytext' => 'Поиск по заголовку',
'type' => 'textbox',
'getlistwhere' => '{"pagetitle:LIKE":"%[[+search]]%"}',
];
$gridcontextmenus['update']['active'] = 1;
$gridcontextmenus['publish']['active'] = 1;
$gridcontextmenus['unpublish']['active'] = 1;
$gridcontextmenus['remove']['active'] = 1;
$gridactionbuttons['addItem']['active'] = 1;
$gridactionbuttons['bulk']['active'] = 1;
$columns = '[{
"header": "ID"
, "width": "20"
, "dataIndex": "id"
, "sortable": "false"
},{
"header": "Заголовок"
, "width": "300"
, "dataIndex": "pagetitle"
, "sortable": "false"
},{
"header": "Аннотация"
, "width": "300"
, "dataIndex": "introtext"
, "sortable": "false"
},{
"header": "Дата"
, "width": "80"
, "dataIndex": "deletedon"
, "hidden": "true"
, "hideable": "false"
, "renderer": "this.renderDate"
},{
"header": "Пуб.."
, "width": "40"
, "dataIndex": "published"
, "hidden": "true"
, "hideable": "false"
, "renderer": "this.renderClickCrossTick"
}]';
$this->customconfigs['columns'] = $this->modx->fromJson($columns);