├── assets
└── plugins
│ └── templatesedit
│ ├── lang
│ ├── en.php
│ ├── es.php
│ ├── nl.php
│ ├── ru.php
│ ├── english.php
│ ├── russian-UTF8.php
│ ├── nederlands-utf8.php
│ └── spanish.php
│ ├── .htaccess
│ ├── tpl
│ ├── button.tpl.php
│ ├── option.tpl.php
│ ├── element.tpl.php
│ ├── select.tpl.php
│ ├── datalist.tpl.php
│ ├── textarea.tpl.php
│ ├── input.tpl.php
│ ├── tab.tpl.php
│ ├── thumb.tpl.php
│ ├── b_field_category.tpl.php
│ ├── date.tpl.php
│ ├── b_field.tpl.php
│ ├── builder_code.tpl.php
│ ├── builder.tpl.php
│ └── document.tpl.php
│ ├── configs
│ ├── custom_fields.example.php
│ ├── template__default.php
│ ├── template_default.php
│ └── fields.php
│ ├── plugin.templatesedit.php
│ ├── css
│ └── builder.css
│ ├── js
│ ├── Sortable.min.js
│ └── TemplatesEditBuilder.js
│ └── class
│ ├── templateseditbuilder.class.php
│ └── templatesedit.class.php
├── README.md
└── install
└── assets
└── plugins
└── templatesedit.tpl
/assets/plugins/templatesedit/lang/en.php:
--------------------------------------------------------------------------------
1 |
3 | Order Deny,Allow
4 | Deny from all
5 |
6 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/button.tpl.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/option.tpl.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # templatesedit3
2 | [EVO] templatesEdit3 — плагин для изменения вида документов в админ панели Evolution CMS
3 |
4 | Demo: https://www.youtube.com/watch?v=WRWa8jR7sbc
5 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/element.tpl.php:
--------------------------------------------------------------------------------
1 | <= $data['tag'] ?? 'div' ?> id="= $data['id'] ?? '' ?>" class="= $data['class'] ?? '' ?>" = $data['attr'] ?? '' ?>>= $data['content'] ?? '' ?>= $data['tag'] ?? 'div' ?>>
2 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/select.tpl.php:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/datalist.tpl.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/textarea.tpl.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/input.tpl.php:
--------------------------------------------------------------------------------
1 | />
2 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/tab.tpl.php:
--------------------------------------------------------------------------------
1 |
2 |
2 |
Edit config: = $data['filename'] ?? '' ?>
3 |
4 |
5 |
7 |
8 |
9 |
10 |
30 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/plugin.templatesedit.php:
--------------------------------------------------------------------------------
1 | event;
13 |
14 | switch ($e->name) {
15 | case 'OnDocFormTemplateRender':
16 | global $content;
17 | $e->addOutput(templatesedit::getInstance($content)
18 | ->renderTemplate());
19 | break;
20 |
21 | case 'OnDocFormRender':
22 | global $content;
23 | $e->addOutput(templatesedit::getInstance($content)
24 | ->renderAfterTemplate());
25 | break;
26 |
27 | case 'OnDocFormSave':
28 | (new templatesedit())->OnDocFormSave((int) $id, (string) $mode);
29 | break;
30 |
31 | case 'OnTempFormRender':
32 | $e->addOutput((new templateseditbuilder())->renderTemplate());
33 | break;
34 |
35 | case 'OnTempFormSave':
36 | (new templateseditbuilder())->saveTemplate();
37 | break;
38 |
39 | case 'OnTempFormDelete':
40 | (new templateseditbuilder())->deleteTemplate((int) $id);
41 | break;
42 | }
43 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/lang/english.php:
--------------------------------------------------------------------------------
1 | 'Role',
5 | 'fields' => 'Base fields',
6 | 'tmplvars' => 'Parameters (TV)',
7 | 'categories' => 'Categories',
8 | // action
9 | 'action.empty' => 'Empty',
10 | 'action.del' => 'Delete',
11 | 'action.get' => 'Get default config',
12 | 'action.set' => 'Set',
13 | 'action.set_default' => 'Default for all',
14 | 'action.del_default' => 'Delete default config',
15 | // confirm
16 | 'confirm.del' => 'Attention! \nAre you sure you want to delete the configuration?',
17 | 'confirm.del_default' => 'Attention! \nThis will delete the global template.',
18 | 'confirm.set_default' => 'Attention! \nThis will overwrite the global template by default and will use for documents with a blank template.',
19 | // info
20 | 'info.used_default_config' => 'Config is used by default',
21 | 'info.used_config_role_admin' => 'Use admin role configuration',
22 | 'info.default_template' => 'This config is used as global.',
23 | 'info.there_is_config' => 'There is a saved config for this template.',
24 | // import / export
25 | 'import_export' => 'Import / Export',
26 | 'import.btn' => 'Import',
27 | 'export.btn' => 'Export',
28 | ];
29 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/lang/russian-UTF8.php:
--------------------------------------------------------------------------------
1 | 'Роль',
5 | 'fields' => 'Основные поля',
6 | 'tmplvars' => 'Параметры (TV)',
7 | 'categories' => 'Категории',
8 | // action
9 | 'action.empty' => 'Очистить',
10 | 'action.del' => 'Удалить',
11 | 'action.get' => 'Загрузить основной конфиг',
12 | 'action.set' => 'Установить',
13 | 'action.set_default' => 'По умолчанию для всех',
14 | 'action.del_default' => 'Удалить конфиг по умолчанию',
15 | // confirm
16 | 'confirm.del' => 'Внимание! \nВы уверены что хотите удалить конфигурацию?',
17 | 'confirm.del_default' => 'Внимание! \nВы уверены что хотите удалить конфигурацию используемую по умолчанию для всех?',
18 | 'confirm.set_default' => 'Внимание! \nБудет перезаписан основной шаблон используемый по умолчанию и также будет использоваться для документов с шаблоном blank.',
19 | // info
20 | 'info.used_default_config' => 'Используется конфигурация по умолчанию',
21 | 'info.used_config_role_admin' => 'Использовать конфигурацию роли администратора',
22 | 'info.default_template' => 'Этот конфиг используется как основной',
23 | 'info.there_is_config' => 'Есть сохраненный конфиг',
24 | // import / export
25 | 'import_export' => 'Импорт / Экспорт',
26 | 'import.btn' => 'Импорт',
27 | 'export.btn' => 'Экспорт',
28 | ];
29 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/lang/nederlands-utf8.php:
--------------------------------------------------------------------------------
1 | 'Role',
5 | 'fields' => 'Standaard velden',
6 | 'tmplvars' => 'Parameters (TV)',
7 | 'categories' => 'Categorieën',
8 | // action
9 | 'action.empty' => 'Legen',
10 | 'action.del' => 'Verwijderen',
11 | 'action.get' => 'Standaard configuratie gebruiken',
12 | 'action.set' => 'Instellen',
13 | 'action.set_default' => 'Standaard voor alle',
14 | 'action.del_default' => 'Verwijder standaard configuratie',
15 | // confirm
16 | 'confirm.del' => 'Let op! \nWeet u zeker dat u de configuratie wilt verwijderen?',
17 | 'confirm.del_default' => 'Let op! \nDit zal de standaard template verwijderen.',
18 | 'confirm.set_default' => 'Let op! \nDit zal standaard de algemene template overschrijven en worden gebruikt voor documenten met een lege template.',
19 | // info
20 | 'info.used_default_config' => 'Configuratie wordt standaard gebruikt',
21 | 'info.used_config_role_admin' => 'Gebruik beheerdersrol configuratie',
22 | 'info.default_template' => 'Deze configuratie wordt gebruikt als globaal.',
23 | 'info.there_is_config' => 'Er is een opgeslagen configuratie voor deze sjabloon.',
24 | // import / export
25 | 'import_export' => 'Importeren / Exporteren',
26 | 'import.btn' => 'Importeren',
27 | 'export.btn' => 'Exporteren',
28 | ];
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/lang/spanish.php:
--------------------------------------------------------------------------------
1 | 'Rol',
5 | 'fields' => 'Campos base',
6 | 'tmplvars' => 'Parámetros (TV)',
7 | 'categories' => 'Categorías',
8 | // action
9 | 'action.empty' => 'Vacío',
10 | 'action.del' => 'Borrar',
11 | 'action.get' => 'Obtener la configuración predeterminada',
12 | 'action.set' => 'Establecer',
13 | 'action.set_default' => 'Predeterminado para todos',
14 | 'action.del_default' => 'Eliminar configuración predeterminada',
15 | // confirm
16 | 'confirm.del' => 'Atención! \n¿Estás seguro de que quieres eliminar la configuración?',
17 | 'confirm.del_default' => 'Atención! \nEsto eliminará la plantilla global.',
18 | 'confirm.set_default' => 'Atención! \nEsto sobrescribirá la plantilla global de forma predeterminada y se usará para documentos con una plantilla en blanco.',
19 | // info
20 | 'info.used_default_config' => 'La configuración se usa por defecto',
21 | 'info.used_config_role_admin' => 'Usar la configuración del rol de administrador',
22 | 'info.default_template' => 'Esta configuración se utiliza como global.',
23 | 'info.there_is_config' => 'Hay una configuración guardada para esta plantilla.',
24 | // import / export
25 | 'import_export' => 'Importar / Exportar',
26 | 'import.btn' => 'Importar',
27 | 'export.btn' => 'Exportar',
28 | ];
29 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/configs/template__default.php:
--------------------------------------------------------------------------------
1 | [
10 | 'title' => $_lang['settings_general'],
11 | 'default' => true,
12 | 'fields' => [
13 | 'pagetitle' => [],
14 | 'longtitle' => [],
15 | 'description' => [],
16 | 'menutitle' => [],
17 | 'parent' => [],
18 | 'weblink' => [],
19 | 'template' => []
20 | ]
21 | ],
22 | 'Content' => [
23 | 'title' => $_lang['description'],
24 | 'fields' => [
25 | 'introtext' => [
26 | 'rows' => 5
27 | ],
28 | 'content' => [
29 | 'rows' => 15
30 | ],
31 | 'richtext' => [],
32 | ]
33 | ],
34 | 'Seo' => [
35 | 'title' => 'SEO',
36 | 'fields' => [
37 | 'metaTitle' => [],
38 | 'titl' => [],
39 | 'metaDescription' => [],
40 | 'desc' => [],
41 | 'metaKeywords' => [],
42 | 'keyw' => [],
43 | 'alias' => [],
44 | 'link_attributes' => [],
45 | 'menuindex' => [],
46 | 'hidemenu' => [],
47 | 'noIndex' => [],
48 | 'sitemap_exclude' => [],
49 | 'sitemap_priority' => [],
50 | 'sitemap_changefreq' => []
51 | ]
52 | ],
53 | 'Settings' => [
54 | 'title' => $_lang['settings_page_settings'],
55 | 'fields' => [
56 | 'published' => [],
57 | 'alias_visible' => [],
58 | 'isfolder' => [],
59 | 'donthit' => [],
60 | 'contentType' => [],
61 | 'type' => [],
62 | 'content_dispo' => [],
63 | 'pub_date' => [],
64 | 'unpub_date' => [],
65 | 'createdon' => [],
66 | 'editedon' => [],
67 | 'searchable' => [],
68 | 'cacheable' => [],
69 | 'syncsite' => []
70 | ]
71 | ]
72 | ];
73 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/configs/template_default.php:
--------------------------------------------------------------------------------
1 | [
10 | 'default' => true,
11 | 'title' => $_lang['settings_general'],
12 | 'fields' => [
13 | 'pagetitle' => [
14 | 'class' => 'form-control-lg'
15 | ],
16 | 'longtitle' => [],
17 | 'description' => [],
18 | 'menutitle' => [],
19 | 'parent' => [],
20 | 'weblink' => [],
21 | 'template' => []
22 | ]
23 | ],
24 | 'Content' => [
25 | 'title' => $_lang['description'],
26 | 'fields' => [
27 | 'introtext' => [
28 | 'titleClass' => 'col-xs-12',
29 | 'fieldClass' => 'col-xs-12',
30 | 'rows' => 5
31 | ],
32 | 'content' => [
33 | 'titleClass' => 'col-xs-12 form-row pt-1',
34 | 'fieldClass' => 'col-xs-12',
35 | 'selectClass' => 'float-xs-right',
36 | 'rows' => 15
37 | ],
38 | 'richtext' => [],
39 | ]
40 | ],
41 | 'Seo' => [
42 | 'title' => 'SEO',
43 | 'fields' => [
44 | 'metaTitle' => [],
45 | 'titl' => [],
46 | 'metaDescription' => [],
47 | 'desc' => [],
48 | 'metaKeywords' => [],
49 | 'keyw' => [],
50 | 'alias' => [],
51 | 'link_attributes' => [],
52 | 'menuindex' => [],
53 | 'hidemenu' => [],
54 | 'noIndex' => [],
55 | 'sitemap_exclude' => [],
56 | 'sitemap_priority' => [],
57 | 'sitemap_changefreq' => []
58 | ]
59 | ],
60 | 'Settings' => [
61 | 'title' => $_lang['settings_page_settings'],
62 | 'fields' => [
63 | 'published' => [],
64 | 'alias_visible' => [],
65 | 'isfolder' => [],
66 | 'donthit' => [],
67 | 'contentType' => [],
68 | 'type' => [],
69 | 'content_dispo' => [],
70 | 'pub_date' => [],
71 | 'unpub_date' => [],
72 | 'createdon' => [],
73 | 'editedon' => [],
74 | 'searchable' => [],
75 | 'cacheable' => [],
76 | 'syncsite' => []
77 | ]
78 | ]
79 | ];
80 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/configs/fields.php:
--------------------------------------------------------------------------------
1 | [
6 | 'title' => $_lang['resource_title'],
7 | 'help' => $_lang['resource_title_help']
8 | ],
9 | 'longtitle' => [
10 | 'title' => $_lang['long_title'],
11 | 'help' => $_lang['resource_long_title_help']
12 | ],
13 | 'description' => [
14 | 'title' => $_lang['resource_description'],
15 | 'help' => $_lang['resource_description_help']
16 | ],
17 | 'alias' => [
18 | 'title' => $_lang['resource_alias'],
19 | 'help' => $_lang['resource_alias_help']
20 | ],
21 | 'link_attributes' => [
22 | 'title' => $_lang['link_attributes'],
23 | 'help' => htmlspecialchars($_lang['link_attributes_help'], ENT_QUOTES)
24 | ],
25 | 'published' => [
26 | 'title' => $_lang['resource_opt_published'],
27 | 'help' => $_lang['resource_opt_published_help']
28 | ],
29 | 'pub_date' => [
30 | 'title' => $_lang['page_data_publishdate'],
31 | 'help' => $_lang['page_data_publishdate_help']
32 | ],
33 | 'unpub_date' => [
34 | 'title' => $_lang['page_data_unpublishdate'],
35 | 'help' => $_lang['page_data_unpublishdate_help']
36 | ],
37 | 'parent' => [
38 | 'title' => $_lang['resource_parent'],
39 | 'help' => $_lang['resource_parent_help']
40 | ],
41 | 'isfolder' => [
42 | 'title' => $_lang['resource_opt_folder'],
43 | 'help' => $_lang['resource_opt_folder_help']
44 | ],
45 | 'introtext' => [
46 | 'title' => $_lang['resource_summary'],
47 | 'help' => $_lang['resource_summary_help']
48 | ],
49 | 'content' => [
50 | 'title' => $_lang['resource_content'],
51 | 'help' => ''
52 | ],
53 | 'richtext' => [
54 | 'title' => $_lang['resource_opt_richtext'],
55 | 'help' => $_lang['resource_opt_richtext_help']
56 | ],
57 | 'weblink' => [
58 | 'title' => $_lang['weblink'],
59 | 'help' => $_lang['resource_weblink_help']
60 | ],
61 | 'template' => [
62 | 'title' => $_lang['page_data_template'],
63 | 'help' => $_lang['page_data_template_help']
64 | ],
65 | 'type' => [
66 | 'title' => $_lang['resource_type'],
67 | 'help' => $_lang['resource_type_message']
68 | ],
69 | 'contentType' => [
70 | 'title' => $_lang['page_data_contentType'],
71 | 'help' => $_lang['page_data_contentType_help']
72 | ],
73 | 'content_dispo' => [
74 | 'title' => $_lang['resource_opt_contentdispo'],
75 | 'help' => $_lang['resource_opt_contentdispo_help']
76 | ],
77 | 'menuindex' => [
78 | 'title' => $_lang['resource_opt_menu_index'],
79 | 'help' => $_lang['resource_opt_menu_index_help']
80 | ],
81 | 'searchable' => [
82 | 'title' => $_lang['page_data_searchable'],
83 | 'help' => $_lang['page_data_searchable_help']
84 | ],
85 | 'cacheable' => [
86 | 'title' => $_lang['page_data_cacheable'],
87 | 'help' => $_lang['page_data_cacheable_help']
88 | ],
89 | 'createdon' => [
90 | 'title' => $_lang['createdon'],
91 | 'help' => $_lang['createdon']
92 | ],
93 | 'editedon' => [
94 | 'title' => $_lang['editedon'],
95 | 'help' => $_lang['editedon']
96 | ],
97 | 'menutitle' => [
98 | 'title' => $_lang['resource_opt_menu_title'],
99 | 'help' => $_lang['resource_opt_menu_title_help']
100 | ],
101 | 'donthit' => [
102 | 'title' => $_lang['track_visitors_title'],
103 | 'help' => $_lang['resource_opt_trackvisit_help']
104 | ],
105 | 'hidemenu' => [
106 | 'title' => $_lang['resource_opt_show_menu'],
107 | 'help' => $_lang['resource_opt_show_menu_help']
108 | ],
109 | 'alias_visible' => [
110 | 'title' => $_lang['resource_opt_alvisibled'],
111 | 'help' => $_lang['resource_opt_alvisibled_help']
112 | ],
113 | 'syncsite' => [
114 | 'title' => $_lang['resource_opt_emptycache'],
115 | 'help' => $_lang['resource_opt_emptycache_help']
116 | ]
117 | ];
118 |
--------------------------------------------------------------------------------
/assets/plugins/templatesedit/tpl/builder.tpl.php:
--------------------------------------------------------------------------------
1 |