@kohanajs/mod-cms
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [6.2.0](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v6.1.0...v6.2.0) (2022-03-17) | ||
### Features | ||
* add default edit /index template ([b60f6d5](https://gitlab.com/kohana-js/proposals/level0/mod-cms/commit/b60f6d5c4b359ca856bbd027902f19e24faf9902)) | ||
## [6.1.0](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v6.0.1...v6.1.0) (2022-03-15) | ||
@@ -7,0 +14,0 @@ |
@@ -23,3 +23,3 @@ const path = require('path'); | ||
templates: new Map([ | ||
['index', 'templates/admin/contents/index'], | ||
['index', HelperPage.getAdminTemplate(request.params['page_type'], 'index')], | ||
]), | ||
@@ -56,8 +56,6 @@ ...options, | ||
this.setTemplate(`templates/admin/page/page_types/${page_type}/index`, | ||
Object.assign( | ||
this.state.get(ControllerMixinView.TEMPLATE).data, | ||
{ items, page_type } | ||
) | ||
) | ||
Object.assign( | ||
this.state.get(ControllerMixinView.TEMPLATE).data, | ||
{ items, page_type } | ||
); | ||
} | ||
@@ -64,0 +62,0 @@ |
@@ -234,4 +234,3 @@ const {SQL} = require("@kohanajs/constants"); | ||
this.setTemplate(`templates/admin/page/page_types/${editTemplateFolder.toLowerCase()}/edit`, templateData); | ||
this.setTemplate(HelperPage.getAdminTemplate(editTemplateFolder.toLowerCase(), 'edit'), templateData); | ||
} | ||
@@ -238,0 +237,0 @@ |
@@ -9,2 +9,7 @@ const { ORM, KohanaJS } = require("kohanajs"); | ||
class HelperPage{ | ||
static getAdminTemplate(page_type, action="index"){ | ||
if(KohanaJS.config.cms.blueprint[page_type])return `templates/admin/page/page_types/${page_type}/${action}`; | ||
return `templates/admin/page/page_types/default/${action}`; | ||
} | ||
static arrayToObject(values=[], languageId= 1){ | ||
@@ -11,0 +16,0 @@ const result = {}; |
{ | ||
"name": "@kohanajs/mod-cms", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "The CMS module for KohanaJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107095
78
1589