Skip to content

Commit

Permalink
Fixed article type default (#420)
Browse files Browse the repository at this point in the history
* fixed article type

* fixed articlejsconfig

* fixed MR
  • Loading branch information
adriansieber authored and wachterjohannes committed Dec 4, 2019
1 parent ebdfff3 commit 666f95e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Admin/ArticleJsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getParameters()
$type = $this->getType($structure->getStructure());
if (!array_key_exists($type, $config['types'])) {
$config['types'][$type] = [
'default' => $type,
'default' => $structure->getKey(),
'title' => $this->getTitle($type),
];
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/dist/main.js

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

3 changes: 2 additions & 1 deletion Resources/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ define(['underscore', 'config', 'css!suluarticlecss/main'], function(_, Config)
_.each(types, function(config, type) {
var permissions = Config.get('sulu_security.contexts')['sulu.modules.articles_' + type];
if (permissions && permissions['view'] !== false) {
typeList[config.default] = config;
typeList[type] = config;
}
});

return typeList;
}

Expand Down

0 comments on commit 666f95e

Please sign in to comment.