@kohanajs/mod-cms
Advanced tools
Comparing version 1.0.0 to 1.2.0
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -1,15 +0,16 @@ | ||
const {ControllerAdmin} = require("@kohanajs/mod-admin"); | ||
const {KohanaJS, ORM} = require("kohanajs"); | ||
const { ControllerAdmin } = require('@kohanajs/mod-admin'); | ||
const { KohanaJS, ORM } = require('kohanajs'); | ||
const PageProxy = ORM.require('PageProxy'); | ||
const Page = ORM.require('Page'); | ||
class ControllerAdminPage extends ControllerAdmin{ | ||
constructor(request){ | ||
super(request, PageProxy, { | ||
class ControllerAdminPage extends ControllerAdmin { | ||
constructor(request) { | ||
super(request, Page, { | ||
roles: new Set(['admin', 'staff']), | ||
databases: new Map([ | ||
['pagetype', `${KohanaJS.config.auth.databasePath}/pagetype.sqlite`], | ||
['content', `${KohanaJS.config.auth.databasePath}/www/content.sqlite`] | ||
['draft', `${KohanaJS.config.auth.databasePath}/content.sqlite`], | ||
['live', `${KohanaJS.config.auth.databasePath}/www/content.sqlite`] | ||
]), | ||
database : 'pagetype', | ||
database: 'pagetype', | ||
}); | ||
@@ -19,8 +20,15 @@ } | ||
async action_update() { | ||
//if publish state change from 0 to 1, | ||
//a live version of | ||
// 1. page attributes, | ||
// 2. page values, | ||
// 3. page Items + Page Item values, | ||
// 4. page Blocks, block attribute, block values | ||
// will be cloned to live database | ||
} | ||
async action_index(){ | ||
async action_index() { | ||
} | ||
async action_read(){ | ||
async action_read() { | ||
@@ -27,0 +35,0 @@ } |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -0,0 +0,0 @@ const {ControllerAdmin} = require("@kohanajs/mod-admin"); |
@@ -14,5 +14,5 @@ const {ORM} = require('kohanajs'); | ||
["language_id", "Translate"], | ||
["language_id", "PageBlockValue"], | ||
["language_id", "PageValue"], | ||
["language_id", "PageItemValue"] | ||
["language_id", "PageItemValue"], | ||
["language_id", "PageBlockValue"] | ||
]; | ||
@@ -19,0 +19,0 @@ } |
@@ -10,2 +10,4 @@ const {ORM} = require('kohanajs'); | ||
end = null; | ||
page_type_id = null; | ||
current_page_version_id = null; | ||
@@ -21,9 +23,12 @@ static joinTablePrefix = 'page'; | ||
["start", "Date"], | ||
["end", "Date"] | ||
["end", "Date"], | ||
["page_type_id", "Int"], | ||
["current_page_version_id", "Int"] | ||
]); | ||
static hasMany = [ | ||
["page_id", "PageVersion"], | ||
["page_id", "PageAttribute"], | ||
["page_id", "PageBlock"], | ||
["page_id", "PageValue"], | ||
["page_id", "PageItem"] | ||
["page_id", "PageItem"], | ||
["page_id", "PageBlock"] | ||
]; | ||
@@ -30,0 +35,0 @@ static belongsToMany = new Set([ |
@@ -5,2 +5,3 @@ const {ORM} = require('kohanajs'); | ||
page_id = null; | ||
page_version_id = null; | ||
page_type_attribute_name = null; | ||
@@ -17,3 +18,4 @@ value = null; | ||
static belongsTo = new Map([ | ||
["page_id", "Page"] | ||
["page_id", "Page"], | ||
["page_version_id", "PageVersion"] | ||
]); | ||
@@ -20,0 +22,0 @@ } |
@@ -5,2 +5,3 @@ const {ORM} = require('kohanajs'); | ||
page_id = null; | ||
page_version_id = null; | ||
weight = null; | ||
@@ -15,3 +16,4 @@ | ||
static belongsTo = new Map([ | ||
["page_id", "Page"] | ||
["page_id", "Page"], | ||
["page_version_id", "PageVersion"] | ||
]); | ||
@@ -18,0 +20,0 @@ static hasMany = [ |
@@ -5,2 +5,3 @@ const {ORM} = require('kohanajs'); | ||
page_id = null; | ||
page_version_id = null; | ||
page_field_collection_name = null; | ||
@@ -17,3 +18,4 @@ weight = null; | ||
static belongsTo = new Map([ | ||
["page_id", "Page"] | ||
["page_id", "Page"], | ||
["page_version_id", "PageVersion"] | ||
]); | ||
@@ -20,0 +22,0 @@ static hasMany = [ |
@@ -0,0 +0,0 @@ const {ORM} = require('kohanajs'); |
@@ -15,4 +15,3 @@ const {ORM} = require('kohanajs'); | ||
static hasMany = [ | ||
["page_type_id", "PageTypeAttribute"], | ||
["page_type_id", "PageProxy"] | ||
["page_type_id", "PageTypeAttribute"] | ||
]; | ||
@@ -19,0 +18,0 @@ static belongsToMany = new Set([ |
@@ -5,4 +5,5 @@ const {ORM} = require('kohanajs'); | ||
page_id = null; | ||
page_version_id = null; | ||
language_id = null; | ||
page_field_type_name = null; | ||
page_field_name = null; | ||
page_field_type_attribute_name = null; | ||
@@ -15,3 +16,3 @@ value = null; | ||
static fields = new Map([ | ||
["page_field_type_name", "String!"], | ||
["page_field_name", "String!"], | ||
["page_field_type_attribute_name", "String"], | ||
@@ -22,2 +23,3 @@ ["value", "String!"] | ||
["page_id", "Page"], | ||
["page_version_id", "PageVersion"], | ||
["language_id", "Language"] | ||
@@ -24,0 +26,0 @@ ]); |
@@ -0,0 +0,0 @@ require('kohanajs').addNodeModule(__dirname); |
@@ -0,0 +0,0 @@ const { HelperCRUD: RouteCRUD } = require('@kohanajs/mod-admin'); |
{ | ||
"name": "@kohanajs/mod-cms", | ||
"version": "1.0.0", | ||
"version": "1.2.0", | ||
"description": "The CMS module for KohanaJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# mod-cms | ||
CMS module support multi-language content |
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
22775
41
746