From 3ecacb31a909e8fb747e49a42c853f82da007c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 20 Feb 2019 11:16:43 +0000 Subject: [PATCH] [REF] website_slide: split short from long description in channel model Purpose of this commit is to provide a better way to display channel information. Description is split into two fields. A text one, holding the short description and used in channel header. A long html one, holding more details course description. Commit linked to task ID 1941250 and PR #31272. --- .../data/slide_channel_demo.xml | 22 +++++++------------ addons/website_slides/models/slide_channel.py | 3 ++- .../views/website_slides_templates_course.xml | 6 +++-- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/addons/website_slides/data/slide_channel_demo.xml b/addons/website_slides/data/slide_channel_demo.xml index 61fc7337d4b..b44cf47dd79 100644 --- a/addons/website_slides/data/slide_channel_demo.xml +++ b/addons/website_slides/data/slide_channel_demo.xml @@ -4,14 +4,13 @@ Basics of Gardening training - latest + most_voted - -
Learn the basics of gardening !
+ Learn the basics of gardening !
Requirements @@ -34,8 +33,7 @@ public - -
In this training you will learn how to take care of trees: when to plant, potted trees, ...
+ Learn how to take care of your favorite trees. Learn when to plant, how to manage potted trees, ...
Interesting Facts @@ -60,8 +58,7 @@ public - -
A lot of nice documentation: trees, wood, gardens. After that you will know everything.
+ A lot of nice documentation: trees, wood, gardens. A gold mine for references.
Trees @@ -87,9 +84,8 @@ public - -
Knowing which kind of wood to use depending on your application is important. In this course you -will learn the basics of wood characteristics.
+ Knowing which kind of wood to use depending on your application is important. In this course you +will learn the basics of wood characteristics.
Introduction @@ -107,9 +103,7 @@ will learn the basics of wood characteristics. invite - -
We're also Santa Claus! Belligerent and numerous. I am the man with no name, - Zapp Brannigan!
+ We're also Santa Claus! Belligerent and numerous. I am the man with no name, Zapp Brannigan!
Introduction @@ -129,7 +123,7 @@ will learn the basics of wood characteristics. invite -
All you need to know about furniture creation.
+ All you need to know about furniture creation.
Introduction diff --git a/addons/website_slides/models/slide_channel.py b/addons/website_slides/models/slide_channel.py index ca3930d5b5d..3dfba4e7576 100644 --- a/addons/website_slides/models/slide_channel.py +++ b/addons/website_slides/models/slide_channel.py @@ -74,7 +74,8 @@ class Channel(models.Model): # description name = fields.Char('Name', translate=True, required=True) active = fields.Boolean(default=True) - description = fields.Html('Description', translate=tools.html_translate, sanitize_attributes=False) + description = fields.Text('Short Description', translate=True) + description_html = fields.Html('Description', translate=tools.html_translate, sanitize_attributes=False) channel_type = fields.Selection([ ('documentation', 'Documentation'), ('training', 'Training')], string="Course type", default="documentation", required=True) diff --git a/addons/website_slides/views/website_slides_templates_course.xml b/addons/website_slides/views/website_slides_templates_course.xml index d536813f3f9..0ed270e2fbd 100644 --- a/addons/website_slides/views/website_slides_templates_course.xml +++ b/addons/website_slides/views/website_slides_templates_course.xml @@ -238,8 +238,8 @@ @@ -353,6 +354,7 @@ +