Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration 0.12 with flat-pages 0.1.5 #805

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .meteor/packages
Expand Up @@ -71,3 +71,5 @@ reactioncommerce:reaction-sample-data # default Reaction data
# Themes
reactioncommerce:default-theme # default Reaction theme
#my:custom-theme

ramusus:reaction-flat-pages
8 changes: 5 additions & 3 deletions .meteor/versions
Expand Up @@ -37,6 +37,7 @@ cfs:base-package@0.0.30
cfs:collection@0.5.5
cfs:collection-filters@0.2.4
cfs:data-man@0.0.6
cfs:ejson-file@0.0.0
cfs:file@0.1.17
cfs:filesystem@0.1.2
cfs:graphicsmagick@0.0.18
Expand Down Expand Up @@ -99,7 +100,7 @@ localstorage@1.0.5
logging@1.0.8
matb33:collection-hooks@0.8.1
mdg:validated-method@1.0.2
mdg:validation-error@0.2.0
mdg:validation-error@0.4.0
meteor@1.1.10
meteor-base@1.0.1
meteorhacks:fast-render@2.13.0
Expand Down Expand Up @@ -133,6 +134,7 @@ ordered-dict@1.0.4
promise@0.5.1
raix:eventemitter@0.1.3
raix:ui-dropped-event@0.0.7
ramusus:reaction-flat-pages@0.1.5
random@1.0.5
rate-limit@1.0.0
react@0.1.10
Expand All @@ -148,7 +150,7 @@ reactioncommerce:launchdock-connect@0.2.1
reactioncommerce:reaction-accounts@1.7.0
reactioncommerce:reaction-analytics@1.2.3
reactioncommerce:reaction-analytics-libs@1.1.0
reactioncommerce:reaction-auth-net@0.6.0
reactioncommerce:reaction-auth-net@0.6.1
reactioncommerce:reaction-braintree@1.5.3
reactioncommerce:reaction-catalog@0.2.2
reactioncommerce:reaction-checkout@1.0.0
Expand All @@ -160,7 +162,7 @@ reactioncommerce:reaction-inventory@0.2.3
reactioncommerce:reaction-layout@1.0.0
reactioncommerce:reaction-logger@0.1.0
reactioncommerce:reaction-orders@1.0.0
reactioncommerce:reaction-paymentmethod@0.0.4
reactioncommerce:reaction-paymentmethod@0.0.5
reactioncommerce:reaction-paypal@1.3.0
reactioncommerce:reaction-product-variant@1.0.0
reactioncommerce:reaction-router@1.1.0
Expand Down
4 changes: 2 additions & 2 deletions packages/reaction-accounts/server/methods/accounts.js
Expand Up @@ -34,8 +34,8 @@ Accounts.registerLoginHandler(function (options) {
Accounts.onCreateUser(function (options, user) {
const shop = ReactionCore.getCurrentShop();
const shopId = shop._id;
const defaultVisitorRole = ["anonymous", "guest", "product", "tag", "index", "cart/checkout", "cart/completed"];
const defaultRoles = ["guest", "account/profile", "product", "tag", "index", "cart/checkout", "cart/completed"];
const defaultVisitorRole = ["anonymous", "guest", "product", "page", "tag", "index", "cart/checkout", "cart/completed"];
const defaultRoles = ["guest", "account/profile", "product", "page", "tag", "index", "cart/checkout", "cart/completed"];
let roles = {};
let additionals = {
profile: {}
Expand Down
23 changes: 23 additions & 0 deletions packages/reaction-i18n/private/data/i18n/en.json
Expand Up @@ -12,6 +12,8 @@
"dashboardLabel": "Dashboard",
"ordersLabel": "Orders",
"addProductLabel": "Add Product",
"addPageLabel": "Add Page",
"flatPagesLabel": "Flat pages",
"accountsLabel": "Accounts"
},
"dashboard": {
Expand All @@ -38,6 +40,8 @@
"coreDescription": "Reaction core shop configuration",
"genericPaymentLabel": "Generic Payment",
"genericPaymentDescription": "Generic Payment Method",
"flatPagesLabel": "Flat Pages",
"flatPagesDescription": "Easily add flat pages anywhere into Reaction",
"i18NLabel": "i18n",
"i18NTitle": "i18n",
"i18NDescription": "Internationalization utilities",
Expand Down Expand Up @@ -80,6 +84,7 @@
"utilities": "Utilities"
},
"settings": {
"flatPagesLabel": "Flat Pages",
"accountSettingsLabel": "Account Settings",
"addShopMemberLabel": "Add Shop Member",
"authorizenetSettingsLabel": "Authorize.net Settings",
Expand Down Expand Up @@ -612,6 +617,24 @@
"unknownError": "Unknown error"
}
},
"pageDetail": {
"pageManagement": "Page management",
"makeInvisible": "Make invisible",
"isNotVisible": "This page is not visible to customers.",
"makeItVisible": "You can make it visible",
"whenYouAreDone": "when you're done editing.",
"notFoundTitle": "Oops!",
"notFoundError": "This is no the page you were looking for.",
"publishPageVisible": "is now visible",
"publishPageHidden": "is now hidden",
"noTitle": "No title"
},
"pageDetailEdit": {
"title": "Page title",
"pageTitle": "Page subtitle",
"content": "Add a page content",
"handle": "Add address of page"
},
"error": {
"nameRequired": "Name is required.",
"isRequired": "{{field}} is required.",
Expand Down
23 changes: 23 additions & 0 deletions packages/reaction-i18n/private/data/i18n/ru.json
Expand Up @@ -12,6 +12,8 @@
"dashboardLabel": "Панель управления",
"ordersLabel": "Заказы",
"addProductLabel": "Создать продукт",
"addPageLabel": "Создать страницу",
"flatPagesLabel": "Простые страницы",
"accountsLabel": "Пользователи"
},
"dashboard": {
Expand All @@ -36,6 +38,8 @@
"coreDescription": "Базовые настройки Reaction",
"genericPaymentLabel": "Образец платёжной системы",
"genericPaymentDescription": "Тестирование платежей. Образец для портирования любых Платёжных систем",
"flatPagesLabel": "Простые страницы",
"flatPagesDescription": "Управление простыми страницами в Reaction",
"i18NLabel": "i18n",
"i18NTitle": "i18n",
"i18NDescription": "Интернационализация",
Expand Down Expand Up @@ -75,6 +79,7 @@
"utilities": "Утилиты"
},
"settings": {
"flatPagesLabel": "Простые страницы",
"accountSettingsLabel": "Настройки учетных записей",
"addShopMemberLabel": "Добавить сотрудника",
"authorizenetSettingsLabel": "Настройки Authorize.net",
Expand Down Expand Up @@ -594,6 +599,24 @@
"unknownError": "Неизвестная ошибка"
}
},
"pageDetail": {
"pageManagement": "Управление страницей",
"makeInvisible": "Сделать невидимой",
"isNotVisible": "Эта страница невидима для покупателей.",
"makeItVisible": "Вы можете сделать его видимой",
"whenYouAreDone": "когда закончите редактирование.",
"notFoundTitle": "Упс!",
"notFoundError": "Страница не найдена.",
"publishPageVisible": "теперь виден",
"publishPageHidden": "теперь скрыт",
"noTitle": "Без заголовка"
},
"pageDetailEdit": {
"title": "Название",
"pageTitle": "Другое название",
"content": "Добавьте содержимое страницы",
"handle": "Укажите адрес страницы"
},
"error": {
"nameRequired": "Название обязательно.",
"isRequired": "Поле \"{{field}}\" обязательно.",
Expand Down
Expand Up @@ -28,6 +28,19 @@ Template.createContentMenu.helpers({
}
}
});
} else if (item.route === "/pages/createPage") {
Meteor.call("ReactionFlatPages.methods.createPage", (error, pageId) => {
if (Meteor.isClient) {
if (error) {
throw new Meteor.Error("createProduct error", error);
} else if (pageId) {
// go to new page
ReactionRouter.go("page", {
handle: pageId
});
}
}
});
}
}
};
Expand Down
2 changes: 2 additions & 0 deletions packages/reaction-sample-data/private/data/Shops.json
Expand Up @@ -3056,6 +3056,7 @@
"anonymous",
"guest",
"product",
"page",
"tag",
"index",
"cart/checkout",
Expand All @@ -3065,6 +3066,7 @@
"account/profile",
"guest",
"product",
"page",
"tag",
"index",
"cart/checkout",
Expand Down
4 changes: 2 additions & 2 deletions packages/reaction-schemas/common/schemas/shops.js
Expand Up @@ -243,11 +243,11 @@ ReactionCore.Schemas.Shop = new SimpleSchema({
},
"defaultVisitorRole": {
type: [String],
defaultValue: ["anonymous", "guest", "product", "tag", "index", "cart/checkout", "cart/completed"]
defaultValue: ["anonymous", "guest", "product", "page", "tag", "index", "cart/checkout", "cart/completed"]
},
"defaultRoles": {
type: [String],
defaultValue: ["guest", "account/profile", "product", "tag", "index", "cart/checkout", "cart/completed"]
defaultValue: ["guest", "account/profile", "product", "page", "tag", "index", "cart/checkout", "cart/completed"]
},
"layout": {
type: [ReactionCore.Schemas.Layout],
Expand Down