Commit 4f7470d1 authored by Tino Goratsch's avatar Tino Goratsch

- added the possibility to define a subtitle for an article

- extended the maximum length of an article title to 255 characters
parent aae4d86a
Pipeline #18265643 failed with stages
in 3 minutes and 51 seconds
......@@ -60,6 +60,7 @@ class Create extends AbstractFormAction
'start' => '',
'end' => '',
'title' => '',
'subtitle' => '',
'text' => '',
];
......
......@@ -73,6 +73,10 @@ class Migration extends AbstractMigration
43 => [
'ALTER TABLE `{pre}articles` ADD COLUMN `layout` VARCHAR(120) NOT NULL AFTER `text`;',
],
44 => [
'ALTER TABLE `{pre}articles` MODIFY COLUMN `title` VARCHAR(255) NOT NULL;',
'ALTER TABLE `{pre}articles` ADD COLUMN `subtitle` VARCHAR(255) NOT NULL AFTER `title`;',
]
];
}
......
......@@ -27,7 +27,7 @@ class Schema implements Modules\Installer\SchemaInterface
*/
public function getSchemaVersion()
{
return 43;
return 44;
}
/**
......@@ -72,7 +72,8 @@ class Schema implements Modules\Installer\SchemaInterface
`start` DATETIME NOT NULL,
`end` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
`title` VARCHAR(120) NOT NULL,
`title` VARCHAR(255) NOT NULL,
`subtitle` VARCHAR(255) NOT NULL,
`text` TEXT NOT NULL,
`layout` VARCHAR(120) NOT NULL,
`user_id` INT(10) UNSIGNED,
......
......@@ -52,6 +52,7 @@ class ArticlesModel extends AbstractModel implements UpdatedAtAwareModelInterfac
'end' => DataProcessor\ColumnTypes::COLUMN_TYPE_DATETIME,
'updated_at' => DataProcessor\ColumnTypes::COLUMN_TYPE_DATETIME,
'title' => DataProcessor\ColumnTypes::COLUMN_TYPE_TEXT,
'subtitle' => DataProcessor\ColumnTypes::COLUMN_TYPE_TEXT,
'text' => DataProcessor\ColumnTypes::COLUMN_TYPE_TEXT_WYSIWYG,
'layout' => DataProcessor\ColumnTypes::COLUMN_TYPE_TEXT,
'user_id' => DataProcessor\ColumnTypes::COLUMN_TYPE_INT,
......
......@@ -14,7 +14,8 @@
</div>
</div>
<div id="tab-2" class="tab-pane fade">
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength=120 data_attributes=['seo-slug-base' => 'true'] label={lang t="articles|title"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength=255 data_attributes=['seo-slug-base' => 'true'] label={lang t="articles|title"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="subtitle" value=$form.subtitle maxlength=255 label={lang t="articles|subtitle"}}
{include file="asset:System/Partials/form_group.wysiwyg.tpl" name="text" value=$form.text required=true advanced=true label={lang t="articles|text"}}
{include file="asset:System/Partials/form_group.select.tpl" options=$layouts labelRequired=true label={lang t="articles|layout"}}
{event name="menus.layout.render_manage_menu_item" uri_pattern=$SEO_URI_PATTERN path=$SEO_ROUTE_NAME}
......
{extends file="asset:`$LAYOUT`"}
{if !empty($page.subtitle)}
{block PAGE_TITLE}
<h2>
{page_title}<br>
<small>{$page.subtitle}</small>
</h2>
{/block}
{/if}
{block CONTENT}
{$page.toc}
{$page.text|rewrite_uri}
......
......@@ -14,6 +14,7 @@
<item key="select_active">Bitte wählen Sie aus, ob der Artikel veröffentlicht werden soll oder nicht.</item>
<item key="select_create_menu_item">Bitte wählen Sie aus, ob für diesen Artikel ein Menüpunkt erstellt werden soll oder nicht.</item>
<item key="select_layout">Bitte wählen Sie das Seiten-Layout aus.</item>
<item key="subtitle">Untertitel</item>
<item key="text">Text</item>
<item key="text_to_short">Der Text darf nicht leer sein.</item>
<item key="title">Titel</item>
......
......@@ -14,6 +14,7 @@
<item key="select_active">Please select, whether the article should be active or not.</item>
<item key="select_create_menu_item">Please select, whether you want to create am menu item for this article or not.</item>
<item key="select_layout">Please select the site layout for this article.</item>
<item key="subtitle">Subtitle</item>
<item key="text">Text</item>
<item key="text_to_short">The text should not be empty.</item>
<item key="title">Title</item>
......
......@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - 2018-xx-yy
### Added
- added the possibility to define a subtitle for an article
### Changed
- extended the maximum length of an article title to 255 characters
## [4.22.1] - 2018-02-23
### Fixed
- Fixed a bug when trying to save a menu item
......
......@@ -49,7 +49,9 @@
{include file="asset:System/Partials/breadcrumb.tpl" breadcrumb=$BREADCRUMB}
{/block}
</div>
<h2>{page_title}</h2>
{block PAGE_TITLE}
<h2>{page_title}</h2>
{/block}
{event name="layout.content_before"}
{block CONTENT}{/block}
</main>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment