Skip to content

Commit

Permalink
Merge branch 'release/1.0' of github.com:sulu/SuluArticleBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Oct 10, 2019
2 parents 33d0f0e + 7043e79 commit 2358e55
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Content/ArticleDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function getConfigurationBuilder()
['column' => 'published', 'title' => 'sulu_article.smart-content.published'],
['column' => 'authored', 'title' => 'sulu_article.smart-content.authored'],
['column' => 'created', 'title' => 'sulu_article.smart-content.created'],
['column' => 'title', 'title' => 'sulu_article.smart-content.title'],
['column' => 'title.raw', 'title' => 'sulu_article.smart-content.title'],
['column' => 'author_full_name', 'title' => 'sulu_article.smart-content.author-full-name'],
]
);
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/dist/components/articles/edit/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/dist/services/base-router.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/public/dist/services/list-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/public/dist/services/manager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/public/dist/services/typed-router.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Resources/public/dist/utils/template-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Resources/public/js/components/articles/edit/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ define([
'sulucontent/components/open-ghost-overlay/main',
'services/sulucontent/smart-content-manager',
'./adapter/article',
'./adapter/article-page'
], function($, _, config, Util, ArticleManager, ArticleRouter, UserManager, SecurityChecker, CopyLocale, OpenGhost, SmartContentManager, Article, ArticlePage) {
'./adapter/article-page',
'suluarticle/utils/template-helper'
], function($, _, config, Util, ArticleManager, ArticleRouter, UserManager, SecurityChecker, CopyLocale, OpenGhost, SmartContentManager, Article, ArticlePage, TemplateHelper) {

'use strict';

Expand All @@ -41,7 +42,7 @@ define([
},

templates: {
url: '/admin/api/articles<% if (!!id) { %>/<%= id %><% } %>?locale=<%= locale %>',
url: '/admin/api/articles<% if (!!data.id) { %>/<%= data.id %><% } %>?locale=<%= data.locale %>',
pageSwitcher: [
'<div class="page-changer">',
' <span class="title"><%= label %></span>',
Expand Down Expand Up @@ -562,10 +563,10 @@ define([
},

getUrl: function(action) {
var url = _.template(this.defaults.templates.url, {
var url = TemplateHelper.transformTemplateData(_.template(this.defaults.templates.url, {
id: this.options.id,
locale: this.options.locale
});
}));

if (action) {
url += '&action=' + action;
Expand Down
12 changes: 6 additions & 6 deletions Resources/public/js/services/base-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* with this source code in the file LICENSE.
*/

define(['underscore', 'services/husky/mediator'], function(_, Mediator) {
define(['underscore', 'services/husky/mediator', 'suluarticle/utils/template-helper'], function(_, Mediator, TemplateHelper) {

'use strict';

Expand All @@ -16,11 +16,11 @@ define(['underscore', 'services/husky/mediator'], function(_, Mediator) {
},

routes = {
list: _.template('articles/<%= locale %>'),
add: _.template('articles/<%= locale %>/add'),
edit: _.template('articles/<%= locale %>/edit:<%= id %>/<%= tab %>'),
editPage: _.template('articles/<%= locale %>/edit:<%= id %>/page:<%= page %>/<%= tab %>'),
addPage: _.template('articles/<%= locale %>/edit:<%= id %>/add-page/<%= tab %>')
list: TemplateHelper.transformTemplateData(_.template('articles/<%= data.locale %>')),
add: TemplateHelper.transformTemplateData(_.template('articles/<%= data.locale %>/add')),
edit: TemplateHelper.transformTemplateData(_.template('articles/<%= data.locale %>/edit:<%= data.id %>/<%= data.tab %>')),
editPage: TemplateHelper.transformTemplateData(_.template('articles/<%= data.locale %>/edit:<%= data.id %>/page:<%= data.page %>/<%= data.tab %>')),
addPage: TemplateHelper.transformTemplateData(_.template('articles/<%= data.locale %>/edit:<%= data.id %>/add-page/<%= data.tab %>'))
},

goto = function(route, trigger, force) {
Expand Down
8 changes: 4 additions & 4 deletions Resources/public/js/services/list-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* with this source code in the file LICENSE.
*/

define(['underscore', 'services/husky/translator'], function(_, translator) {
define(['underscore', 'services/husky/translator', 'suluarticle/utils/template-helper'], function(_, translator, TemplateHelper) {

'use strict';

Expand Down Expand Up @@ -43,9 +43,9 @@ define(['underscore', 'services/husky/translator'], function(_, translator) {
),

templates = {
draftIcon: _.template('<span class="draft-icon" title="<%= title %>"/>'),
publishedIcon: _.template('<span class="published-icon" title="<%= title %>"/>'),
shadowIcon: _.template('<span class="fa-share" title="<%= title %>"></span>'),
draftIcon: TemplateHelper.transformTemplateData(_.template('<span class="draft-icon" title="<%= data.title %>"/>')),
publishedIcon: TemplateHelper.transformTemplateData(_.template('<span class="published-icon" title="<%= data.title %>"/>')),
shadowIcon: TemplateHelper.transformTemplateData(_.template('<span class="fa-share" title="<%= data.title %>"></span>')),
};

return {
Expand Down
30 changes: 15 additions & 15 deletions Resources/public/js/services/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
* with this source code in the file LICENSE.
*/

define(['jquery', 'services/husky/util'], function($, Util) {
define(['jquery', 'services/husky/util', 'suluarticle/utils/template-helper'], function($, Util, TemplateHelper) {
'use strict';

var templates = {
url: _.template(
url: TemplateHelper.transformTemplateData(_.template(
'/admin/api/articles' +
'<% if (typeof id !== "undefined") { %>/<%= id %><% } %>' +
'<% if (typeof postfix !== "undefined") { %>/<%= postfix %><% } %>' +
'<% if (typeof version !== "undefined") { %>/<%= version %><% } %>' +
'?locale=<%= locale %>' +
'<% if (typeof action !== "undefined") { %>&action=<%= action %><% } %>' +
'<% if (typeof ids !== "undefined") { %>&ids=<%= ids.join(",") %><% } %>'
),
pageUrl: _.template(
'/admin/api/articles/<%= articleId %>/pages' +
'<% if (typeof pageId !== "undefined" && !!pageId) { %>/<%= pageId %><% } %>' +
'?locale=<%= locale %>' +
'<% if (typeof action !== "undefined") { %>&action=<%= action %><% } %>'
)
'<% if (typeof data.id !== "undefined") { %>/<%= data.id %><% } %>' +
'<% if (typeof data.postfix !== "undefined") { %>/<%= data.postfix %><% } %>' +
'<% if (typeof data.version !== "undefined") { %>/<%= data.version %><% } %>' +
'?locale=<%= data.locale %>' +
'<% if (typeof data.action !== "undefined") { %>&action=<%= data.action %><% } %>' +
'<% if (typeof data.ids !== "undefined") { %>&ids=<%= data.ids.join(",") %><% } %>'
)),
pageUrl:TemplateHelper.transformTemplateData( _.template(
'/admin/api/articles/<%= data.articleId %>/pages' +
'<% if (typeof data.pageId !== "undefined" && !!data.pageId) { %>/<%= data.pageId %><% } %>' +
'?locale=<%= data.locale %>' +
'<% if (typeof data.action !== "undefined") { %>&action=<%= data.action %><% } %>'
))
};

return {
Expand Down
Loading

0 comments on commit 2358e55

Please sign in to comment.