mirror of
https://github.com/typemill/typemill.git
synced 2025-08-05 05:37:45 +02:00
Version 1.2.2 Draft Management
This commit is contained in:
2
cache/lastCache.txt
vendored
2
cache/lastCache.txt
vendored
@@ -1 +1 @@
|
||||
1532420761
|
||||
1532454659
|
21
composer.lock
generated
21
composer.lock
generated
@@ -653,7 +653,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.4.12",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
@@ -771,7 +771,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.42",
|
||||
"version": "v2.8.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
@@ -821,20 +821,21 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.35.3",
|
||||
"version": "v1.35.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f"
|
||||
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/b48680b6eb7d16b5025b9bfc4108d86f6b8af86f",
|
||||
"reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
|
||||
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=5.3.3",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
@@ -873,16 +874,16 @@
|
||||
},
|
||||
{
|
||||
"name": "Twig Team",
|
||||
"homepage": "http://twig.sensiolabs.org/contributors",
|
||||
"homepage": "https://twig.symfony.com/contributors",
|
||||
"role": "Contributors"
|
||||
}
|
||||
],
|
||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||
"homepage": "http://twig.sensiolabs.org",
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2018-03-20T04:25:58+00:00"
|
||||
"time": "2018-07-13T07:12:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
|
@@ -2,6 +2,24 @@
|
||||
|
||||
This is the version history with some release notes.
|
||||
|
||||
## Version 1.2.2: Draft Management
|
||||
|
||||
_Release date: 24.07.2018_
|
||||
|
||||
Version 1.2.2 introduces a draft management. Follow the instruction for simple updates in the [documentation](/gettings-started/update), so update the `system` folder and please also update the theme `typemill`.
|
||||
|
||||
The changes are:
|
||||
|
||||
- Safe a draft.
|
||||
- Publish a page.
|
||||
- Depublish a page.
|
||||
- Delete a page.
|
||||
- All buttons for editing are fixed at the bottom of the page now.
|
||||
- Created a new shared contentController for the whole page management.
|
||||
- Extended the content-api with update, depublish and delete functionalities.
|
||||
- Converted markdown to json for edit- and draft-management (stored as txt).
|
||||
- Extended the vue-js for the editor.
|
||||
|
||||
## Version 1.2.1: Improved editor and fixes
|
||||
|
||||
_Release date: 06.07.2018_
|
||||
|
@@ -28,13 +28,13 @@ class ContentBackendController extends ContentController
|
||||
|
||||
# set item
|
||||
if(!$this->setItem()){ die('no item'); return $this->render404($response, array( 'navigation' => $this->structure, 'settings' => $this->settings, 'content' => $this->errors )); }
|
||||
|
||||
|
||||
# set the status for published and drafted
|
||||
$this->setPublishStatus();
|
||||
|
||||
# set path
|
||||
$this->setItemPath($this->item->fileType);
|
||||
|
||||
|
||||
# add the modified date for the file
|
||||
$this->item->modified = ($this->item->published OR $this->item->drafted) ? filemtime($this->settings['contentFolder'] . $this->path) : false;
|
||||
|
||||
|
@@ -143,7 +143,7 @@ abstract class ContentController
|
||||
# search for the url in the structure
|
||||
$item = Folder::getItemForUrl($this->structure, $this->params['url']);
|
||||
}
|
||||
|
||||
|
||||
if($item)
|
||||
{
|
||||
if($item->elementType == 'file')
|
||||
@@ -161,7 +161,7 @@ abstract class ContentController
|
||||
$this->item = $item;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$this->errors = ['errors' => ['message' => 'requested page-url not found']];
|
||||
return false;
|
||||
}
|
||||
@@ -170,13 +170,13 @@ abstract class ContentController
|
||||
protected function setItemPath($fileType)
|
||||
{
|
||||
$this->path = $this->item->pathWithoutType . '.' . $fileType;
|
||||
}
|
||||
}
|
||||
|
||||
protected function setPublishStatus()
|
||||
{
|
||||
$this->item->published = false;
|
||||
$this->item->drafted = false;
|
||||
|
||||
|
||||
if(file_exists($this->settings['rootPath'] . $this->settings['contentFolder'] . $this->item->pathWithoutType . '.md'))
|
||||
{
|
||||
$this->item->published = true;
|
||||
@@ -184,14 +184,16 @@ abstract class ContentController
|
||||
# add file-type in case it is a folder
|
||||
$this->item->fileType = "md";
|
||||
}
|
||||
elseif(file_exists($this->settings['rootPath'] . $this->settings['contentFolder'] . $this->item->pathWithoutType . '.txt'))
|
||||
|
||||
if(file_exists($this->settings['rootPath'] . $this->settings['contentFolder'] . $this->item->pathWithoutType . '.txt'))
|
||||
{
|
||||
$this->item->drafted = true;
|
||||
|
||||
# add file-type in case it is a folder
|
||||
$this->item->fileType = "txt";
|
||||
}
|
||||
elseif($this->item->elementType == "folder")
|
||||
|
||||
if(!$this->item->drafted && !$this->item->published && $this->item->elementType == "folder")
|
||||
{
|
||||
# set txt as default for a folder, so that we can create an index.txt for a folder.
|
||||
$this->item->fileType = "txt";
|
||||
@@ -217,7 +219,7 @@ abstract class ContentController
|
||||
}
|
||||
|
||||
protected function setContent()
|
||||
{
|
||||
{
|
||||
# if the file exists
|
||||
if($this->item->published OR $this->item->drafted)
|
||||
{
|
||||
|
@@ -43,7 +43,7 @@ class Settings
|
||||
'contentFolder' => 'content',
|
||||
'cache' => true,
|
||||
'cachePath' => $rootPath . 'cache',
|
||||
'version' => '1.2.1',
|
||||
'version' => '1.2.2',
|
||||
'setup' => true,
|
||||
'welcome' => true
|
||||
];
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/fontello/css/fontello.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20180706" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20180724" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -35,7 +35,7 @@
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20180706"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20180706"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20180724"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20180724"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user