diff --git a/composer.lock b/composer.lock index 49a8761..1eddddc 100644 --- a/composer.lock +++ b/composer.lock @@ -791,16 +791,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.1", + "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -812,7 +812,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -849,7 +849,7 @@ "polyfill", "portable" ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/yaml", @@ -903,30 +903,30 @@ }, { "name": "twig/twig", - "version": "v1.42.5", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e" + "reference": "597a03e85a60af6feee4f5127f3ef4279a1694c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", - "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/597a03e85a60af6feee4f5127f3ef4279a1694c3", + "reference": "597a03e85a60af6feee4f5127f3ef4279a1694c3", "shasum": "" }, "require": { - "php": ">=5.5.0", + "php": ">=7.1.3", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.0" + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.42-dev" + "dev-master": "1.43-dev" } }, "autoload": { @@ -963,7 +963,7 @@ "keywords": [ "templating" ], - "time": "2020-02-11T05:59:23+00:00" + "time": "2020-07-05T13:00:49+00:00" }, { "name": "vlucas/valitron", @@ -971,12 +971,12 @@ "source": { "type": "git", "url": "https://github.com/vlucas/valitron.git", - "reference": "4af076d19f3cd4fd61f560cba115316834c7fe81" + "reference": "9268adeeb48ba155e35dca861f5990283e14eafb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/valitron/zipball/4af076d19f3cd4fd61f560cba115316834c7fe81", - "reference": "4af076d19f3cd4fd61f560cba115316834c7fe81", + "url": "https://api.github.com/repos/vlucas/valitron/zipball/9268adeeb48ba155e35dca861f5990283e14eafb", + "reference": "9268adeeb48ba155e35dca861f5990283e14eafb", "shasum": "" }, "require": { @@ -1012,7 +1012,7 @@ "validation", "validator" ], - "time": "2020-05-14T14:50:07+00:00" + "time": "2020-07-10T08:55:05+00:00" } ], "packages-dev": [], diff --git a/content/01-cyanine-theme/03-content-elements.yaml b/content/01-cyanine-theme/03-content-elements.yaml index abcd5bc..baedf47 100644 --- a/content/01-cyanine-theme/03-content-elements.yaml +++ b/content/01-cyanine-theme/03-content-elements.yaml @@ -1,12 +1,12 @@ meta: title: 'Content Elements' - description: "There are a lot of other settings for your content area. For example: \nAdd an edit-button for github, gitlab or other plattforms.\nShow the author.\nShow the publish date.\nShow the chapter numbers in the navigation.\n" - heroimage: null + description: "There are a lot of other settings for your content area. For example: \n" + heroimage: '' heroimagealt: null owner: testauthor author: trendschau manualdate: null - modified: '2020-07-09' + modified: '2020-06-14' created: '2020-06-11' time: 21-05-02 navtitle: 'content elements' diff --git a/cypress/test01-system-setup.spec.js b/cypress/test01-system-setup.spec.js index a303185..74eb02f 100644 --- a/cypress/test01-system-setup.spec.js +++ b/cypress/test01-system-setup.spec.js @@ -104,28 +104,23 @@ describe('Typemill Setup', function() { cy.visit('/tm/user/trendschau') cy.url().should('include', '/tm/user/trendschau') - - cy.get('input[name="showusername"]') + cy.get('input[name="user[username]"]') .should('have.value', 'trendschau') - .and('have.attr','disabled') - cy.get('input[name="username"]') - .should('have.value', 'trendschau') - cy.get('input[name="firstname"]') + cy.get('input[name="user[firstname]"]') .clear() .type('Sebastian') .should('have.value', 'Sebastian') - cy.get('input[name="lastname"]') + cy.get('input[name="user[lastname]"]') .clear() .type('Schürmanns') .should('have.value', 'Schürmanns') - cy.get('input[name="email"]') + cy.get('input[name="user[email]"]') .should('have.value', 'trendschau@gmail.com') - .and('have.attr','required') - cy.get('select[name="userrole"]') - .should('have.attr','required') - cy.get('input[name="password"]') + cy.get('select[name="user[userrole]"]') + .should('have.value','administrator') + cy.get('input[name="user[password]"]') .should('have.value', '') - cy.get('input[name="newpassword"]') + cy.get('input[name="user[newpassword]"]') .should('have.value', '') cy.get('#userform').submit() diff --git a/cypress/test02-initial-frontend.spec.js b/cypress/test02-initial-frontend.spec.js index 0a49524..534b959 100644 --- a/cypress/test02-initial-frontend.spec.js +++ b/cypress/test02-initial-frontend.spec.js @@ -18,8 +18,8 @@ describe('Typemill Initial Frontend', function() expect($a[4].href).to.match(/welcome\/markdown-test/) expect($a[5].href).to.match(/cyanine-theme/) expect($a[6].href).to.match(/cyanine-theme\/landingpage/) - expect($a[7].href).to.match(/cyanine-theme\/footer/) - expect($a[8].href).to.match(/cyanine-theme\/colors-and-fonts/) + expect($a[7].href).to.match(/cyanine-theme\/colors-and-fonts/) + expect($a[8].href).to.match(/cyanine-theme\/footer/) expect($a[9].href).to.match(/cyanine-theme\/content-elements/) }) }) diff --git a/system/Controllers/PageController.php b/system/Controllers/PageController.php index cc0998c..3a58db3 100644 --- a/system/Controllers/PageController.php +++ b/system/Controllers/PageController.php @@ -329,7 +329,8 @@ class PageController extends Controller foreach ($structure as $key => $item) { - $filename = ($item->elementType == 'folder') ? DIRECTORY_SEPARATOR . 'index.yaml' : $item->pathWithoutType . '.yaml'; + # $filename = ($item->elementType == 'folder') ? DIRECTORY_SEPARATOR . 'index.yaml' : $item->pathWithoutType . '.yaml'; + $filename = $item->pathWithoutType . '.yaml'; if(file_exists($contentPath . $filename)) { diff --git a/system/Controllers/SettingsController.php b/system/Controllers/SettingsController.php index e29ea0e..422b3d5 100644 --- a/system/Controllers/SettingsController.php +++ b/system/Controllers/SettingsController.php @@ -702,7 +702,7 @@ class SettingsController extends Controller $user = new User(); $validate = new Validation(); $userroles = $this->c->acl->getRoles(); - + $redirectRoute = ($userdata['username'] == $_SESSION['user']) ? $this->c->router->pathFor('user.account') : $this->c->router->pathFor('user.show', ['username' => $userdata['username']]); # check if user is allowed to view (edit) userlist and other users @@ -833,11 +833,13 @@ class SettingsController extends Controller $fields = $this->c->dispatcher->dispatch('onUserfieldsLoaded', new OnUserfieldsLoaded($fields))->getData(); # only roles who can edit content need profile image and description - if($this->c->acl->isAllowed($role, 'content', 'create')) + if($this->c->acl->isAllowed($role, 'mycontent', 'create')) { $newfield['image'] = ['label' => 'Profile-Image', 'type' => 'image']; $newfield['description'] = ['label' => 'Author-Description (Markdown)', 'type' => 'textarea']; - array_splice($fields,1,0,$newfield); + + $fields = array_slice($fields, 0, 1, true) + $newfield + array_slice($fields, 1, NULL, true); + # array_splice($fields,1,0,$newfield); } # Only admin can change userroles diff --git a/system/Settings.php b/system/Settings.php index 9ce8309..b553cea 100644 --- a/system/Settings.php +++ b/system/Settings.php @@ -82,7 +82,7 @@ class Settings 'contentFolder' => 'content', 'cache' => true, 'cachePath' => $rootPath . 'cache', - 'version' => '1.3.7.2', + 'version' => '1.3.8', 'setup' => true, 'welcome' => true, 'images' => ['live' => ['width' => 820], 'thumbs' => ['width' => 250, 'height' => 150]], diff --git a/system/author/js/vue-blox.js b/system/author/js/vue-blox.js index 18ca7a7..2433121 100644 --- a/system/author/js/vue-blox.js +++ b/system/author/js/vue-blox.js @@ -2175,7 +2175,7 @@ const medialib = Vue.component('medialib', { this.$parent.showmedialib = false; - this.$parent.createmarkdown(); + this.$parent.createmarkdown(image.src_live); /* this.$parent.updatemarkdown(imgmarkdown, image.src_live); */ } if(this.parentcomponent == 'files') @@ -2209,7 +2209,7 @@ const medialib = Vue.component('medialib', { this.$parent.showmedialib = false; - this.$parent.createmarkdown(); + this.$parent.createmarkdown(file.url); /* this.$parent.updatemarkdown(imgmarkdown, file.url);*/ } if(this.parentcomponent == 'files') diff --git a/system/author/js/vue-shared.js b/system/author/js/vue-shared.js index b63a96f..1a13a8e 100644 --- a/system/author/js/vue-shared.js +++ b/system/author/js/vue-shared.js @@ -64,6 +64,11 @@ Vue.component('component-image', { /* is called from child component medialib */ this.update(url); }, + createmarkdown: function(url) + { + /* is called from child component medialib */ + this.update(url); + }, deleteImage: function() { this.imgpreview = false; diff --git a/system/author/layouts/layout.twig b/system/author/layouts/layout.twig index 88c5395..7284f58 100644 --- a/system/author/layouts/layout.twig +++ b/system/author/layouts/layout.twig @@ -19,8 +19,8 @@ - - + + @@ -74,14 +74,14 @@ - + - - - + + + diff --git a/system/author/layouts/layoutAuth.twig b/system/author/layouts/layoutAuth.twig index b8b6bb0..67c75f8 100644 --- a/system/author/layouts/layoutAuth.twig +++ b/system/author/layouts/layoutAuth.twig @@ -20,7 +20,7 @@ - + @@ -56,6 +56,6 @@ {% block content %}{% endblock %} - + \ No newline at end of file diff --git a/system/author/layouts/layoutBlank.twig b/system/author/layouts/layoutBlank.twig index 2502f61..6263470 100644 --- a/system/author/layouts/layoutBlank.twig +++ b/system/author/layouts/layoutBlank.twig @@ -19,7 +19,7 @@ - + diff --git a/system/author/layouts/layoutBlox.twig b/system/author/layouts/layoutBlox.twig index 95955cb..d033196 100644 --- a/system/author/layouts/layoutBlox.twig +++ b/system/author/layouts/layoutBlox.twig @@ -20,7 +20,7 @@ - + {{ assets.renderCSS() }} @@ -197,17 +197,17 @@ - + - - - - - - + + + + + +