diff options
| author | Robot Odoo <xmo+roboto@odoo.com> | 2019-02-21 18:29:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-21 18:29:32 +0100 |
| commit | 1af67ffdfa370ade4ea12f227d7c4fae5bc02170 (patch) | |
| tree | aac3e5369f84e6e7ddc0f013aa99b21c22dc86e2 | |
| parent | 5da4fa46970f7f79cf2cb7e2c2488a3b20430a98 (diff) | |
| parent | 039df4a79e27867e216cf48d28274f3ea3d7fdfc (diff) | |
[MERGE] website_slides: improve layout of courses main pages and apply various fixes
Purpose of this merge is to provide several fixes related to new elearning
application [1]. This is second batch of fixes [2]. Those are mainly fixes
and improvements for front-end templates: layouting, clean design. Some
other fixes are also included, notably links and search capabilities.
See sub commits for more details.
Thanks to @awa-odoo @jem-odoo @stefanorigano @qmo-odoo @dbeguin
for their work as most of code come from cherry-picks.
Merge linked to task ID 1941250.
[1] eLearning feature: see task ID 1902304
[2] First batch of fixes landed at 5cec06b179f3dfe48c091f627d9e9c3255c30438
closes odoo/odoo#31317
29 files changed, 508 insertions, 298 deletions
diff --git a/addons/gamification/data/gamification_karma_rank_demo.xml b/addons/gamification/data/gamification_karma_rank_demo.xml index 45b57ae34f3..26c639a8cc9 100644 --- a/addons/gamification/data/gamification_karma_rank_demo.xml +++ b/addons/gamification/data/gamification_karma_rank_demo.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<odoo><data noupdate="1"> +<odoo><data noupdate="0"> <!-- Set demo karma for test tour as demo user--> <record id="base.user_demo" model="res.users"> <field name="karma">20</field> @@ -15,7 +15,7 @@ <field name="description_motivational" type="html"> <div class="media align-items-center"> <div class="media-body">Reach the next rank and gain a very nice mug !</div> - <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.jpg"/> + <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/> </div></field> <field name="karma_min">100</field> <field name="image" type="base64" file="gamification/static/img/rank_student_badge.svg"/> @@ -27,7 +27,7 @@ <field name="description_motivational" type="html"> <div class="media align-items-center"> <div class="media-body">Reach the next rank and gain a very magic wand !</div> - <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.jpg"/> + <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/> </div></field> <field name="karma_min">500</field> <field name="image" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/> @@ -39,7 +39,7 @@ <field name="description_motivational" type="html"> <div class="media align-items-center"> <div class="media-body">Reach the next rank and gain a very nice hat !</div> - <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.jpg"/> + <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/> </div></field> <field name="karma_min">2000</field> <field name="image" type="base64" file="gamification/static/img/rank_master_badge.svg"/> @@ -51,7 +51,7 @@ <field name="description_motivational" type="html"> <div class="media align-items-center"> <div class="media-body">Reach the next rank and gain a week-end with a unicorn !</div> - <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.jpg"/> + <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/> </div></field> <field name="karma_min">10000</field> <field name="image" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/> diff --git a/addons/gamification/static/img/rank_misc_hat.jpg b/addons/gamification/static/img/rank_misc_hat.jpg Binary files differdeleted file mode 100644 index 68abf33bc14..00000000000 --- a/addons/gamification/static/img/rank_misc_hat.jpg +++ /dev/null diff --git a/addons/gamification/static/img/rank_misc_hat.png b/addons/gamification/static/img/rank_misc_hat.png Binary files differnew file mode 100644 index 00000000000..172219569c0 --- /dev/null +++ b/addons/gamification/static/img/rank_misc_hat.png diff --git a/addons/gamification/static/img/rank_misc_mug.jpg b/addons/gamification/static/img/rank_misc_mug.jpg Binary files differdeleted file mode 100644 index 09cc5567b0e..00000000000 --- a/addons/gamification/static/img/rank_misc_mug.jpg +++ /dev/null diff --git a/addons/gamification/static/img/rank_misc_mug.png b/addons/gamification/static/img/rank_misc_mug.png Binary files differnew file mode 100644 index 00000000000..08e1fae9a1f --- /dev/null +++ b/addons/gamification/static/img/rank_misc_mug.png diff --git a/addons/gamification/static/img/rank_misc_unicorn.jpg b/addons/gamification/static/img/rank_misc_unicorn.jpg Binary files differdeleted file mode 100644 index 5612d5f7855..00000000000 --- a/addons/gamification/static/img/rank_misc_unicorn.jpg +++ /dev/null diff --git a/addons/gamification/static/img/rank_misc_unicorn.png b/addons/gamification/static/img/rank_misc_unicorn.png Binary files differnew file mode 100644 index 00000000000..c22056dcabe --- /dev/null +++ b/addons/gamification/static/img/rank_misc_unicorn.png diff --git a/addons/gamification/static/img/rank_misc_wand.jpg b/addons/gamification/static/img/rank_misc_wand.jpg Binary files differdeleted file mode 100644 index 4e2ec0457f3..00000000000 --- a/addons/gamification/static/img/rank_misc_wand.jpg +++ /dev/null diff --git a/addons/gamification/static/img/rank_misc_wand.png b/addons/gamification/static/img/rank_misc_wand.png Binary files differnew file mode 100644 index 00000000000..0101c36f8d9 --- /dev/null +++ b/addons/gamification/static/img/rank_misc_wand.png diff --git a/addons/website_profile/static/src/scss/website_profile.scss b/addons/website_profile/static/src/scss/website_profile.scss index 1a00803b1b9..e9fd045da45 100644 --- a/addons/website_profile/static/src/scss/website_profile.scss +++ b/addons/website_profile/static/src/scss/website_profile.scss @@ -120,6 +120,73 @@ $bronze: #eea91e; } } +/// Progress Circle +.o_wprofile_progress_circle { + position: relative; + + $circle-size: 220px; + $circle-background: rgba(black, 0.1); + $circle-color: theme-color('primary'); + $inset-size: $circle-size - 20; + $transition-length: 1s; + + .o_progress_circle_container, .o_pc, .o_pc div { + @include size($circle-size); + } + + .o_pc_overlay, .o_pc, .o_pc div { + border-radius: 50%; + } + + .o_progress_circle_container { + position: relative; + margin: 0 auto; + background-color: inherit; + } + + .o_pc_overlay { + $tmp-gap: ($circle-size - $inset-size)/2; + @include o-position-absolute($tmp-gap, $left: $tmp-gap); + @include size($inset-size); + + background-color: inherit; + } + + .o_pc { + background-color: $circle-background; + + div { + position: absolute; + -webkit-backface-visibility: hidden; + transition: transform $transition-length; + + &.o_pc_slice { + clip: rect(0px, $circle-size, $circle-size, $circle-size/2); + + .o_pc_fill { + clip: rect(0px, $circle-size/2, $circle-size, 0px); + background-color: $circle-color; + } + } + } + + $i: 0; + $increment: 180deg / 100; + @while $i <= 100 { + &[data-progress='#{$i}'] { + .o_pc_slice.full, .o_pc_fill { + transform: rotate($increment * $i); + } + .o_pc_fill.o_pc_bar { + transform: rotate($increment * $i * 2); + } + $i: $i + 1; + } + } + } +} + + .o_wprofile_next_rank_card { div { text-align: center; diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml index 8831b93e351..b7ab4704115 100644 --- a/addons/website_profile/views/website_profile.xml +++ b/addons/website_profile/views/website_profile.xml @@ -252,19 +252,29 @@ </template> <template id="profile_next_rank_card" name="Profile Next Rank Card"> - <div class="card-body o_wprofile_next_rank_card mt-2 pt-2"> - <div><img class="o_wprofile_img_medium" t-attf-src="/web/image/gamification.karma.rank/#{user.next_rank_id.id}/image_medium"/></div> - <div><span class="text-center font-weight-bold">"<span t-field="user.next_rank_id.name"/>"</span></div> - <div><span class="text-center"><span class="font-weight-bold text-primary" t-field="user.karma"/>/<span class="font-weight-bold" t-field="user.next_rank_id.karma_min"/> xp</span></div> - <div class="progress o_wprofile_next_rank_progress"> - <t t-if="user.next_rank_id.karma_min - user.rank_id.karma_min > 0"> - <div class="progress-bar o_wprofile_next_rank_progress_bar" style="background-color: #00A09D !important" - t-att-style="'width: '+ str(100*(user.karma - user.rank_id.karma_min)/(user.next_rank_id.karma_min - user.rank_id.karma_min))+'%'"></div> - </t> - <t t-else=""> - <div class="progress-bar o_wprofile_next_rank_progress_bar" style="background-color: #00A09D !important" - t-att-style="'width: 0%'"></div> - </t> + <div t-attf-class="o_wprofile_progress_circle #{bg_class if bg_class else ''}"> + <div class="o_progress_circle_container"> + <div class="o_pc" t-att-data-progress="int(100*(user.karma - user.rank_id.karma_min)/(user.next_rank_id.karma_min - user.rank_id.karma_min))" > + <div class="o_pc_circle"> + <div class="o_pc_slice full"> + <div class="o_pc_fill"/> + </div> + <div class="o_pc_slice"> + <div class="o_pc_fill full"/> + <div class="o_pc_fill o_pc_bar"/> + </div> + </div> + </div> + <div class="o_pc_overlay d-flex flex-column align-items-center justify-content-center"> + <img class="img-fluid" + t-attf-src="/web/image/gamification.karma.rank/#{user.next_rank_id.id}/image_medium" + t-att-alt="user.next_rank_id.name + ' badge'" + t-att-style="'max-width: ' + (img_max_width if img_max_width else '60%;')"/> + <h4 class="mt-2 mb-0">"<span t-field="user.next_rank_id.name"/>"</h4> + <small> + <span class="font-weight-bold text-primary" t-field="user.karma"/>/<span class="font-weight-bold" t-field="user.next_rank_id.karma_min"/> xp + </small> + </div> </div> </div> </template> @@ -305,10 +315,10 @@ Ranks & Badges </h1> <p> - Do not stop learning with <t t-esc="user.company_id.name"/>. Collects points on the forum or the eLearning platform. Those points will make you reach new ranks. + Keep learning with <t t-esc="user.company_id.name"/>. Collect points on the forum or on the eLearning platform. Those points will make you reach new ranks. </p> <p> - <span class="font-weight-bold">How do I earn badges?</span> When you finish a course, reach milestones, you're awarded badges. + <span class="font-weight-bold">How do I earn badges?</span> When you finish a course or reach milestones, you're awarded badges. </p> <p> <span class="font-weight-bold">How do I score more points?</span> You can score more points by answering quizzes at the end of each course content. Points can also be earned on the forum. Follow this link to the guidelines of the forum. diff --git a/addons/website_rating/static/src/js/website_mail.js b/addons/website_rating/static/src/js/website_mail.js index 8f21f740c98..6fd9a305e95 100644 --- a/addons/website_rating/static/src/js/website_mail.js +++ b/addons/website_rating/static/src/js/website_mail.js @@ -33,6 +33,11 @@ odoo.define('website_rating.thread', function(require) { init: function(parent, options){ this._super.apply(this, arguments); + // apply ratio to default rating value + if (options.default_rating_value) { + options.default_rating_value = parseFloat(options.default_rating_value) / STAR_RATING_RATIO; + } + // default options this.options = _.defaults(this.options, { 'default_message': false, @@ -50,7 +55,7 @@ odoo.define('website_rating.thread', function(require) { '5': _t("I love it"), }; this.user_click = false; // user has click or not - this.set("star_value", this.options.rating_default_value); + this.set("star_value", this.options.default_rating_value); this.on("change:star_value", this, this._onChangeStarValue); }, start: function(){ @@ -59,7 +64,7 @@ odoo.define('website_rating.thread', function(require) { // rating stars self.$input = self.$('input[name="rating_value"]'); self.$star_list = self.$('.stars').find('i'); - self.set("star_value", self.options.rating_default_value); // set the default value to trigger the display of star widget + self.set("star_value", self.options.default_rating_value); // set the default value to trigger the display of star widget }); }, @@ -265,7 +270,7 @@ odoo.define('website_rating.thread', function(require) { _onChangeRatingDomain: function(){ var domain = []; if(this.get('rating_value')){ - domain = [['rating_value', '=', this.get('rating_value')]]; + domain = [['rating_value', '=', this.get('rating_value') * STAR_RATING_RATIO]]; } this._changeCurrentPage(1, domain); }, diff --git a/addons/website_rating/static/src/xml/website_mail.xml b/addons/website_rating/static/src/xml/website_mail.xml index 11534a768c2..d4e8dd83218 100644 --- a/addons/website_rating/static/src/xml/website_mail.xml +++ b/addons/website_rating/static/src/xml/website_mail.xml @@ -79,7 +79,7 @@ <div class="rate_text"> <span class="badge badge-info"></span> </div> - <input type="hidden" readonly="readonly" name="rating_value" t-att-value="default_rating"/> + <input type="hidden" readonly="readonly" name="rating_value" t-att-value="default_rating || ''"/> </div> </t> diff --git a/addons/website_rating/views/website_rating_templates.xml b/addons/website_rating/views/website_rating_templates.xml index 32dc3d3c573..8ce20495b32 100644 --- a/addons/website_rating/views/website_rating_templates.xml +++ b/addons/website_rating/views/website_rating_templates.xml @@ -18,7 +18,7 @@ Rating widget static: show 5 stars (full or empty) regarding the given rating_avg and rating_count --> <template id="rating_widget_stars_static" name="Rating: static star widget"> - <t t-set="rating_avg" t-value="round(rating_avg * 100) / 100"/> + <t t-set="rating_avg" t-value="round(rating_avg * 100) / 100 / 2"/> <t t-set="val_decimal" t-value="round(rating_avg % 1, 1)"/> <t t-set="val_integer" t-value="int(rating_avg)"/> <t t-set="empty_star" t-value="5 - (val_integer+1) if val_decimal else 5 - val_integer"/> diff --git a/addons/website_slides/controllers/mail.py b/addons/website_slides/controllers/mail.py index 1273ebe1119..5ec41d9de88 100644 --- a/addons/website_slides/controllers/mail.py +++ b/addons/website_slides/controllers/mail.py @@ -33,6 +33,7 @@ class SlidesMail(http.Controller): ('res_id', '=', res_id), ('website_published', '=', True), ('author_id', '=', request.env.user.partner_id.id), + ('message_type', '=', 'comment'), ('id', '=', message_id) ] # restrict to the given message_id message = request.env['mail.message'].search(domain, limit=1) diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 085eab7d5a8..7ab6b6052d7 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -100,9 +100,8 @@ class WebsiteSlides(WebsiteProfile): tags |= search_tag return tags - def _build_channel_domain(self, base_domain, slide_type=None, **post): + def _build_channel_domain(self, base_domain, slide_type=None, my=False, **post): search_term = post.get('search') - category_id = post.get('category_id') channel_tag_id = post.get('channel_tag_id') tags = self._extract_channel_tag_search(**post) @@ -111,15 +110,16 @@ class WebsiteSlides(WebsiteProfile): domain = expression.AND([ domain, ['|', ('name', 'ilike', search_term), ('description', 'ilike', search_term)]]) - if category_id: - domain = expression.AND([domain, [('category_ids', 'in', [category_id])]]) - elif channel_tag_id: + if channel_tag_id: domain = expression.AND([domain, [('tag_ids', 'in', [channel_tag_id])]]) elif tags: domain = expression.AND([domain, [('tag_ids', 'in', tags.ids)]]) if slide_type and 'nbr_%s' % slide_type in request.env['slide.channel']: domain = expression.AND([domain, [('nbr_%s' % slide_type, '>', 0)]]) + + if my: + domain = expression.AND([domain, [('partner_ids', '=', request.env.user.partner_id.id)]]) return domain def _prepare_channel_values(self, **kwargs): @@ -179,24 +179,29 @@ class WebsiteSlides(WebsiteProfile): }) @http.route('/slides/all', type='http', auth="public", website=True) - def slides_channel_all(self, slide_type=None, **post): + def slides_channel_all(self, slide_type=None, my=False, **post): """ Home page displaying a list of courses displayed according to some criterion and search terms. - : param string slide_type: if provided, filter the slide.channels - to contain at least one slide of type 'slide_type' - : param dict post: post parameters, including - * search_term: keywords entered in the search box, used to filter on slide content; - * category_id: id of a slide.category; - * channel_tag_id: id of a channel.tag; + :param string slide_type: if provided, filter the course to contain at + least one slide of type 'slide_type'. Used notably to display courses + with certifications; + :param bool my: if provided, filter the slide.channels for which the + current user is a member of + :param dict post: post parameters, including + + * ``search``: filter on course description / name; + * ``channel_tag_id``: filter on courses containing this tag; + * ``channel_tag_group_id_<id>``: filter on courses containing this tag + in the tag group given by <id> (used in navigation based on tag group); """ domain = request.website.website_domain() - domain = self._build_channel_domain(domain, slide_type=slide_type, **post) + domain = self._build_channel_domain(domain, slide_type=slide_type, my=my, **post) order = self._channel_order_by_criterion.get(post.get('sorting', 'date'), 'create_date desc') channels = request.env['slide.channel'].search(domain, order=order) - channels_layouted = list(itertools.zip_longest(*[iter(channels)] * 4, fillvalue=None)) + # channels_layouted = list(itertools.zip_longest(*[iter(channels)] * 4, fillvalue=None)) tag_groups = request.env['slide.channel.tag.group'].search(['&', ('tag_ids', '!=', False), ('website_published', '=', True)]) search_tags = self._extract_channel_tag_search(**post) @@ -204,10 +209,13 @@ class WebsiteSlides(WebsiteProfile): return request.render('website_slides.courses_all', { 'user': request.env.user, 'is_public_user': request.website.is_public_user(), - 'channels_layouted': channels_layouted, + 'channels': channels, 'tag_groups': tag_groups, 'search_term': post.get('search'), + 'search_slide_type': slide_type, + 'search_my': my, 'search_tags': search_tags, + 'search_channel_tag_id': post.get('channel_tag_id'), }) def _prepare_additional_channel_values(self, values, **kwargs): @@ -221,11 +229,12 @@ class WebsiteSlides(WebsiteProfile): '/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>', '/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>/page/<int:page>' ], type='http', auth="public", website=True, sitemap=sitemap_slide) - def channel(self, channel, category=None, tag=None, page=1, slide_type=None, sorting=None, search=None, **kw): + def channel(self, channel, category=None, tag=None, page=1, slide_type=None, uncategorized=False, sorting=None, search=None, **kw): if not channel.can_access_from_current_website(): raise werkzeug.exceptions.NotFound() + domain = [('channel_id', '=', channel.id)] - if not request.env.user.has_group('website.group_website_publisher'): + if not channel.can_publish: domain = expression.AND([ domain, ['&', ('website_published', '=', True), ('channel_id.website_published', '=', True)] @@ -250,7 +259,10 @@ class WebsiteSlides(WebsiteProfile): elif tag: domain += [('tag_ids.id', '=', tag.id)] pager_url += "/tag/%s" % tag.id - if slide_type: + if uncategorized: + domain += [('category_id', '=', False)] + pager_url += "?uncategorized=1" + elif slide_type: domain += [('slide_type', '=', slide_type)] pager_url += "?slide_type=%s" % slide_type @@ -270,6 +282,7 @@ class WebsiteSlides(WebsiteProfile): 'search_category': category, 'search_tag': tag, 'search_slide_type': slide_type, + 'search_uncategorized': uncategorized, 'slide_types': slide_types, 'sorting': actual_sorting, 'search': search, @@ -287,6 +300,7 @@ class WebsiteSlides(WebsiteProfile): ('model', '=', channel._name), ('res_id', '=', channel.id), ('author_id', '=', request.env.user.partner_id.id), + ('message_type', '=', 'comment'), ('website_published', '=', True) ], order='write_date DESC', limit=1).read(['body', 'rating_value']) last_message_data = last_message_values[0] if last_message_values else {} @@ -301,24 +315,48 @@ class WebsiteSlides(WebsiteProfile): # Display uncategorized slides # fetch slides; done as sudo because we want to display all of them but # unreachable ones won't be clickable (+ slide controller will crash anyway) - if not category: + if not category and not uncategorized: category_data = [] for category in request.env['slide.slide'].sudo().read_group(domain, ['category_id'], ['category_id']): category_id, name = category.get('category_id') or (False, _('Uncategorized')) + slides_sudo = request.env['slide.slide'].sudo().search(category['__domain'], limit=4, offset=0, order=order) category_data.append({ 'id': category_id, 'name': name, + 'slug_name': slug((category_id, name)) if category_id else name, 'total_slides': category['category_id_count'], - 'slides': request.env['slide.slide'].sudo().search(category['__domain'], limit=4, offset=0, order=order) + 'slides': slides_sudo, }) + elif uncategorized: + slides_sudo = request.env['slide.slide'].sudo().search(domain, limit=self._slides_per_page, offset=pager['offset'], order=order) + category_data = [{ + 'id': False, + 'name': _('Uncategorized'), + 'slug_name': _('Uncategorized'), + 'total_slides': len(slides_sudo), + 'slides': slides_sudo, + }] else: slides_sudo = request.env['slide.slide'].sudo().search(domain, limit=self._slides_per_page, offset=pager['offset'], order=order) category_data = [{ 'id': category.id, 'name': category.name, + 'slug_name': slug(category), 'total_slides': len(slides_sudo), 'slides': slides_sudo, }] + + # post slide-fetch computation: promoted, user completion (separated because sudo-ed) + if not request.website.is_public_user() and channel.is_member: + displayed_slide_ids = list(set(sid for item in category_data for sid in item['slides'].ids)) + done_slide_ids = request.env['slide.slide.partner'].sudo().search([ + ('slide_id', 'in', displayed_slide_ids), + ('partner_id', '=', request.env.user.partner_id.id), + ('completed', '=', True) + ]).mapped('slide_id').ids + else: + done_slide_ids = [] + values['done_slide_ids'] = done_slide_ids values['slide_promoted'] = request.env['slide.slide'].sudo().search(domain, limit=1, order=order) values['category_data'] = category_data @@ -500,7 +538,7 @@ class WebsiteSlides(WebsiteProfile): } # JSONRPC - @http.route('/slides/slide/like', type='json', auth="user", website=True) + @http.route('/slides/slide/like', type='json', auth="public", website=True) def slide_like(self, slide_id, upvote): if request.website.is_public_user(): return {'error': 'public_user'} diff --git a/addons/website_slides/data/slide_channel_demo.xml b/addons/website_slides/data/slide_channel_demo.xml index 3e77e537155..78e760228e0 100644 --- a/addons/website_slides/data/slide_channel_demo.xml +++ b/addons/website_slides/data/slide_channel_demo.xml @@ -83,7 +83,7 @@ <field name="promote_strategy">latest</field> <field name="website_published" eval="True"/> <field name="enroll">public</field> - <field name="image" type="base64" file="website_slides/static/src/img/channel_demo_flowers.jpg"/> + <field name="image" type="base64" file="website_slides/static/src/img/channel_demo_tree_1.jpg"/> <field name="description">Knowing which kind of wood to use depending on your application is important. In this course you will learn the basics of wood characteristics.</field> </record> @@ -131,21 +131,20 @@ will learn the basics of wood characteristics.</field> <field name="sequence">10</field> </record> - <record id="slide_tag_demo_0" model="slide.tag"> - <field name="name">Tag0</field> + <record id="slide_tag_demo_cheatsheet" model="slide.tag"> + <field name="name">CheatSheet</field> </record> - <record id="slide_tag_demo_1" model="slide.tag"> - <field name="name">Tag1</field> + <record id="slide_tag_demo_theory" model="slide.tag"> + <field name="name">Theory</field> </record> - <record id="slide_tag_demo_2" model="slide.tag"> - <field name="name">Tag2</field> + <record id="slide_tag_demo_exercises" model="slide.tag"> + <field name="name">Exercises</field> </record> - <record id="slide_tag_demo_tools" model="slide.tag"> <field name="name">Tools</field> </record> - <record id="slide_tag_demo_colorfull" model="slide.tag"> - <field name="name">Colorfull</field> + <record id="slide_tag_demo_colorful" model="slide.tag"> + <field name="name">Colorful</field> </record> <record id="slide_tag_demo_howto" model="slide.tag"> <field name="name">HowTo</field> diff --git a/addons/website_slides/data/slide_slide_demo.xml b/addons/website_slides/data/slide_slide_demo.xml index 8971ec2fa8f..80c45a5313f 100644 --- a/addons/website_slides/data/slide_slide_demo.xml +++ b/addons/website_slides/data/slide_slide_demo.xml @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <odoo><data noupdate="0"> + <!-- CHANNEL 0: Basics of Gardening --> + <!-- ================================================== --> <record id="slide_slide_demo_0_0" model="slide.slide"> <field name="name">Know-How Summary</field> <field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/> @@ -10,11 +12,14 @@ <field name="category_id" ref="website_slides.slide_category_demo_0_0"/> <field name="website_published" eval="True"/> <field name="is_preview" eval="True"/> - <field name="public_views">40</field> + <field name="public_views">10</field> + <field name="completion_time">2.5</field> <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_tools')), (4, ref('website_slides.slide_tag_demo_howto'))]"/> <field name="description">A summary of know-how: how and what.</field> </record> + <!-- CHANNEL 1: Taking care of Trees --> + <!-- ================================================== --> <record id="slide_slide_demo_1_0" model="slide.slide"> <field name="name">Tree Infographic</field> <field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_1.jpg"/> @@ -24,7 +29,8 @@ <field name="website_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">5</field> - <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorfull'))]"/> + <field name="completion_time">0.5</field> + <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/> <field name="description">Just some basics Tree Infographic.</field> </record> <record id="slide_slide_demo_1_1" model="slide.slide"> @@ -34,9 +40,9 @@ <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_0"/> <field name="website_published" eval="True"/> - <field name="is_preview" eval="True"/> - <field name="public_views">10</field> - <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorfull'))]"/> + <field name="is_preview" eval="False"/> + <field name="public_views">5</field> + <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/> <field name="description">Just some basics Interesting Tree Facts.</field> </record> <record id="slide_slide_demo_1_2" model="slide.slide"> @@ -47,8 +53,8 @@ <field name="category_id" ref="website_slides.slide_category_demo_1_0"/> <field name="website_published" eval="True"/> <field name="is_preview" eval="False"/> - <field name="public_views">15</field> - <field name="tag_ids" eval="[(5, 0)]"/> + <field name="public_views">10</field> + <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful')), (4, ref('website_slides.slide_tag_demo_theory'))]"/> <field name="description">Just some basics Energy Efficiency Facts.</field> </record> <record id="slide_slide_demo_1_3" model="slide.slide"> @@ -126,6 +132,71 @@ <field name="description">A summary of know-how: how and what.</field> </record> + <!-- CHANNEL 2: Trees, Wood and Garden --> + <!-- ================================================== --> + <record id="slide_slide_demo_2_0" model="slide.slide"> + <field name="name">Main Trees Categories</field> + <field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/> + <field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_1.jpg"/> + <field name="slide_type">presentation</field> + <field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/> + <field name="category_id" ref="website_slides.slide_category_demo_2_0"/> + <field name="website_published" eval="True"/> + <field name="is_preview" eval="False"/> + <field name="public_views">0</field> + <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/> + <field name="description">A summary of know-how: how and what.</field> + </record> + <record id="slide_slide_demo_2_1" model="slide.slide"> + <field name="name">A Mighty Forest from Ages</field> + <field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_1.jpg"/> + <field name="slide_type">webpage</field> + <field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/> + <field name="category_id" ref="website_slides.slide_category_demo_2_0"/> + <field name="html_content" type="html"> +<section class="s_cover parallax bg-black-50 pt16 pb16" data-scroll-background-ratio="0" style="background-image: none;"> + <span class="s_parallax_bg oe_img_bg oe_custom_bg" style="background-image: url('/website_slides/static/src/img/slide_demo_tree_img_1.jpg'); background-position: 50% 0;"></span> + <div class="container"> + <div class="row s_nb_column_fixed"> + <div class="col-lg-12 s_title"> + <h1 class="s_title_thin o_default_snippet_text" style="font-size: 62px; text-align: center;">Catchy Headline</h1> + </div> + <div class="col-lg-12 s_text pt16 pb16"> + <p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p> + </div> + <div class="col-lg-12 s_btn text-center pt16 pb16"> + <a href="/aboutus" class="btn btn-delta rounded-circle o_default_snippet_text">About us</a> + <a href="/contactus" class="btn btn-primary rounded-circle o_default_snippet_text">Contact us</a> + </div> + </div> + </div> +</section> +<section class="s_text_image pt32 pb32"> + <div class="container"> + <div class="row align-items-center"> + <div class="col-lg-6 pt16 pb16"> + <img src="/website_slides/static/src/img/slide_demo_tree_img_2.jpg" class="img img-fluid mx-auto" alt="Odoo • Image and Text"/> + </div> + <div class="col-lg-6 pt16 pb16"> + <h2 class="o_default_snippet_text">Section Subtitle</h2> + <p class="o_default_snippet_text">Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p> + <p class="o_default_snippet_text">Start with the customer – find out what they want and give it to them.</p> + <div class="s_btn text-left pt16 pb16"> + <a href="#" class="btn btn-outline-primary o_default_snippet_text">Discover more</a> + </div> + </div> + </div> + </div> +</section></field> + <field name="website_published" eval="True"/> + <field name="is_preview" eval="False"/> + <field name="public_views">0</field> + <field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_theory'))]"/> + <field name="description">Mighty forest just don't appear in a few weeks. Learn how time made our forests mighty and mysterious.</field> + </record> + + <!-- CHANNEL 2: Trees, Wood and Garden --> + <!-- ================================================== --> <record id="slide_slide_demo_5_0" model="slide.slide"> <field name="name">How to find quality wood</field> <field name="url">https://www.youtube.com/watch?v=5WMqwTnZ-qs</field> diff --git a/addons/website_slides/data/slide_user_demo.xml b/addons/website_slides/data/slide_user_demo.xml index 12700c81712..aa08a5b1755 100644 --- a/addons/website_slides/data/slide_user_demo.xml +++ b/addons/website_slides/data/slide_user_demo.xml @@ -1,6 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <odoo><data noupdate="0"> + <!-- CHANNEL 0: Basics of Gardening --> + <!-- ================================================== --> + <record id="slide_channel_0_partner_admin" model="slide.channel.partner"> + <field name="channel_id" ref="website_slides.channel_public"/> + <field name="partner_id" ref="base.partner_admin"/> + </record> + <record id="slide_slide_0_0_partner_admin" model="slide.slide.partner"> + <field name="slide_id" ref="website_slides.slide_slide_demo_0_0"/> + <field name="partner_id" ref="base.partner_admin"/> + <field name="completed" eval="True"/> + </record> + <record id="slide_channel_0_partner_demo" model="slide.channel.partner"> + <field name="channel_id" ref="website_slides.channel_public"/> + <field name="partner_id" ref="base.partner_demo"/> + </record> + <record id="slide_slide_0_0_partner_demo" model="slide.slide.partner"> + <field name="slide_id" ref="website_slides.slide_slide_demo_0_0"/> + <field name="partner_id" ref="base.partner_demo"/> + </record> + + + <!-- CHANNEL 1: Taking care of Trees --> + <!-- ================================================== --> <record id="slide_channel_1_partner_admin" model="slide.channel.partner"> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="partner_id" ref="base.partner_admin"/> @@ -59,4 +82,17 @@ <field name="message_id" ref="website_slides.message_channel_1_demo"/> </record> + <!-- CHANNEL 2: Trees, Wood and Garden --> + <!-- ================================================== --> + <record id="slide_channel_2_partner_admin" model="slide.channel.partner"> + <field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/> + <field name="partner_id" ref="base.partner_admin"/> + </record> + <record id="slide_slide_2_0_partner_admin" model="slide.slide.partner"> + <field name="slide_id" ref="website_slides.slide_slide_demo_2_0"/> + <field name="partner_id" ref="base.partner_admin"/> + <field name="vote">1</field> + <field name="completed" eval="True"/> + </record> + </data></odoo> diff --git a/addons/website_slides/models/slide_slide.py b/addons/website_slides/models/slide_slide.py index 6c39f8a7cd6..0ab75feec59 100644 --- a/addons/website_slides/models/slide_slide.py +++ b/addons/website_slides/models/slide_slide.py @@ -109,8 +109,8 @@ class Slide(models.Model): completion_time = fields.Float('# Hours', default=1, digits=(10, 4)) # subscribers partner_ids = fields.Many2many('res.partner', 'slide_slide_partner', 'slide_id', 'partner_id', - string='Subscribers', groups='base.group_website_publisher') - slide_partner_ids = fields.One2many('slide.slide.partner', 'slide_id', string='Subscribers information', groups='base.group_website_publisher') + string='Subscribers', groups='website.group_website_publisher') + slide_partner_ids = fields.One2many('slide.slide.partner', 'slide_id', string='Subscribers information', groups='website.group_website_publisher') user_membership_id = fields.Many2one( 'slide.slide.partner', string="Subscriber information", compute='_compute_user_membership_id', help="Subscriber information for the current logged in user") diff --git a/addons/website_slides/static/src/img/banner_default.svg b/addons/website_slides/static/src/img/banner_default.svg new file mode 100644 index 00000000000..1d8cbdaf77a --- /dev/null +++ b/addons/website_slides/static/src/img/banner_default.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1280" height="515"><defs><path id="a" d="M0 0L1280 0 1280 515 0 515z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><use fill="#845978" xlink:href="#a"/><g mask="url(#b)"><g transform="translate(-64 -902)"><path fill="#FFF" opacity=".105" d="M2443 1200.003L1425.898 1227.592 2428.994 1053.537 2410.807 959.354 1413.838 1188.559 2367.991 814.755 2332.04 726.066 1402.709 1149.229 2264.239 596.223 2212.162 516.325 1376.929 1117.888 2118.458 399.473 2052.002 331.594 1351.903 1085.917 1940.74 238.14 1862.693 184.686 1316.365 1067.012 1732.352 113.368 1645.54 76.631 1281.269 1047.257 1507.742 33.798 1415.612 14.927 1241.359 1043.705 1268.482 0 1174.518 0 1201.53 1039.145 1031.165 14.307 938.981 32.888 1163.316 1051.484 797.46 76.631 710.65 113.368 1124.834 1062.875 583.567 182.638 505.363 235.852 1094.152 1089.198 390.988 331.587 324.544 399.471 1062.838 1114.751 233.088 513.158 180.759 592.892 1044.335 1151.069 110.958 726.063 75.002 814.755 1025.021 1186.927 33.079 955.542 14.605 1049.674 1021.586 1227.721 0 1200.003 0 1295.992 1017.114 1268.403 14.001 1442.465 32.191 1536.639 1029.174 1307.438 75.002 1681.24 110.958 1769.932 1040.3 1346.768 178.761 1899.772 230.838 1979.679 1066.076 1378.114 324.544 2096.524 390.983 2164.406 1091.094 1410.09 502.255 2257.855 580.3 2311.319 1126.649 1428.964 710.641 2382.632 797.453 2419.374 1161.731 1448.736 935.256 2462.199 1027.383 2481.071 1201.646 1452.3 1174.518 2496 1268.482 2496 1241.475 1456.834 1411.837 2481.691 1504.019 2463.109 1279.686 1444.516 1645.54 2419.374 1732.352 2382.632 1318.176 1433.141 1859.435 2313.36 1937.649 2260.148 1348.874 1406.818 2052.009 2164.406 2118.458 2096.524 1380.157 1381.246 2209.92 1982.84 2262.241 1903.103 1398.639 1344.912 2332.047 1769.932 2367.991 1681.24 1417.991 1309.061 2409.923 1540.453 2428.386 1446.317 1421.502 1268.286 2443 1295.992 2443 1200.003"/><path fill="#845978" d="M64 1417L1344 1417 1344 1248 64 1248z"/><g transform="translate(892 1246)" fill="#573F51"><path d="M354.867 14.066L362.3 28 86.043 91.596 84.19 74.089z"/><path d="M248.749 6.147L253.38 18.931 28.168 71.1 30.604 58.435z"/><path d="M294.541 7.005L311.054 0 324.033 8.712 58.485 79.222 52.043 70.679z"/><path d="M172.008 16.138L209.092 6.884 213.083 12.127 0.734 61.158 0.891 56.487z"/></g><path fill="#573F51" d="M1111.493 1204.155c-.021.535-.06 1.102-.117 1.69-.356 3.73-1.408 8.343-3.014 11.624-2.639 5.398-4.017 11.736-3.912 16.782.105 5.044.703 9.657 1.787 13.639 1.082 3.979 2.8 6.916.164 9.283-1.315 1.183-2.172 1.28-3.133 1.056-.962-.225-2.029-.772-3.763-.88-3.468-.212-3.412.795-6.057 2.963-2.643 2.166-7.56 1.829-11.07.81-3.514-1.02-2.025-2.47-1.05-3.375 1.15-1.077 8.05-5.494 9.373-6.577 1.324-1.084 2.84-1.774 4.922-4.717 1.52-2.144 1.396-9.167 1.696-9.991.3-.824.118-26.067.225-27.286.004-.05.008-.118.011-.197.087-1.89.015-11.867-.166-15.148-.189-3.424-1.874-21.513-1.859-24.342.016-2.49-.223-10.77-.078-12.715.449-5.982 1.684-12.607 2.079-14.625-4.06-5.473-20.5-23.557-17.062-29.655 1.181-2.097 4.16-6.867 10.993-14.678 1.111-1.27 5.622-8.67 6.564-10.051 3.358-4.921 6.404-7.743 9.178-8.714.107-.066.203-.118.287-.154.1-.043.197-.088.292-.135.95-.765 2.077-1.477 2.687-1.967.56-.45.956-1.005 1.227-1.616a27.455 27.455 0 0 1-.397-.353c-3.066-1.651-6.327-5.703-7.704-11.32-1.135-4.632-1.509-9.206-.696-12.845.076-.969.141-1.94.123-2.693-.153-.132-.3-.27-.44-.414a4.451 4.451 0 0 1-1.253-2.742c-.086-1.08.41-1.714-.018-2.698-.936-2.12-.973-2.25.426-4.104 3.676-4.872 11.968-6.568 17.706-5.853 7.174.893 14.118 3.489 20.54 6.725 3.652 1.84 7.251 3.79 10.968 5.497 3.375 1.55 6.992 3.113 10.735 3.438 4.154.362 8.352-.28 12.49.392 1.773.287 4.26.443 5.61 1.78.247.247 2.205 3.21 1.81 3.409.094-.23-.967-1.403-1.137-1.597-.788-.9-1.703-1.352-2.893-1.395-2.524-.103-5.085.247-7.543.8.274.097 5.012 2.04 4.89 2.328-.026-.35-4.149-.697-4.446-.721a26.884 26.884 0 0 0-7.93.544c2.858.066 5.61.68 8.367 1.354-1.572.144-3.148.282-4.71.535-2.477.392-4.769 1.304-7.147 2.055 1.694.207 3.297-.054 4.943-.397 2.87-.585 5.825-.892 8.754-.665 2.58.206 5.575.828 7.278 2.95.675.842 1.216 1.858 1.36 2.94.042.318-.558 2.82-.905 2.474.293.189.435-1.687.407-1.808-.198-.881-.796-1.653-1.454-2.248-1.619-1.46-3.95-1.475-6.002-1.233-3.993.473-7.308 2.489-11.08 3.576a17.61 17.61 0 0 1-1.43.348c.369.618.762 1.225 1.192 1.814 3.905 5.34 10.308 2.235 15.31.52 5.26-1.803 12.645-2.675 17.262.952 1.685 1.324 2.916 3.496 3.463 5.545.46 1.726.58 3.588.226 5.343-.363 1.792-1.099 2.206-.193 3.969 1.318 2.584 3.388 4.936 5.84 6.492 1.452.92 3.156 1.594 4.903 1.485.444-.025 4.764-1.718 4.345-2.093.185.127-2.114 2.112-2.303 2.225-1.719 1.036-3.787 1.18-5.717.757-3.102-.674-6.367-2.076-9.164-3.541 1.545 2.146 2.88 4.442 4.263 6.694-1.37-1.242-2.724-2.503-4.113-3.723-1.867-1.632-3.826-3.274-6.185-4.136-2.203.983-4.22 2.36-6.147 3.799 3.977-.252 8.627.185 11.438 3.366 1.346 1.499 2.244 3.439 2.053 5.485-.036.397-1.543 4.917-1.985 4.59 1.155.42.785-5.933.5-6.49-1.256-2.448-3.925-3.62-6.564-3.715-4.79-.176-9.434 1.916-13.8 3.646-6.352 2.513-12.744 3.538-18.602 1.868 3.06 6.546 5.709 13.409 11.322 18.436 8.568 7.246 20.031 9.339 30.543 10.576 13.703 1.516 26.903 2.15 37.383 11.108 7.138 5.962 19.081 8.482 28.586 7.96-12.672.697-17.935 12.337-26.638 19.17-8.704 6.835-20.646 4.315-31.13 3.53-13.225-1.088-15.62 13.118-20.58 22.017-4.578 7.515-14.337 11.684-22.559 10.776-7.242-1.04-15.38-7.999-23.157-10.374.444 2.193.875 4.066.977 4.355.174.5 2.238 4.612 4.258 9.212l.151-.157.121.274c.48 1.099.92 2.14 1.308 3.094 1.502 3.69 2.926 9.864 1.196 18.319a212.782 212.782 0 0 1-.93 4.289c-1.299 5.803-2.16 9.635-1.35 17.602.223 2.225.77 4.009 1.255 5.586.917 2.99 1.712 5.576-.135 9.723-2.092 4.689-2.836 6.772-5.12 6.898-.625.032-1.266-.082-1.962-.356-2.96-1.16-4.164-8.26-2.866-12.488.598-1.944 1.118-3.414 1.575-4.71.498-1.413.892-2.528 1.21-3.745.581-2.25-2.86-21.918-3.369-24.276-.162-.752-.338-2.483-.558-4.675-.236-2.334-.528-5.24-.895-7.723l-.104-.697.247.29c-.31-2.02-.674-3.757-1.11-4.73-1.467-3.28-2.739-3-6.226-12.887-.306-.868-.602-1.722-.89-2.562-5.065 1.12-9.121 2.356-12.317 3.4-1.002.327-2.797 1.098-4.632 1.72.236 1.513.475 2.763.686 3.499.238.828.321 2.097.262 3.61z"/><path fill="#573F51" d="M1257.956 1185.867l.35-.214.211.39c.262.487.546.89.8 1.245.206.29.399.563.555.844l.061.109c4.155 7.467 5.06 15.14 5.086 20.264.037 7.473-2.373 17.109-3.969 23.485l-.231.919c.202 1.712.469 4.139.776 7.794.258 3.046.818 5.549 1.314 7.759 1.109 4.94 1.986 8.84-1.051 15.342-3.33 7.135-5.332 10.32-8.382 10.32h-.002c-.76 0-1.582-.191-2.584-.607-4.362-1.797-6.106-12.685-4.048-18.994 1.303-3.988 1.936-6.68 2.496-9.053.288-1.222.561-2.376.895-3.579.397-1.433.012-5.182-1.146-11.138-2.149-6.859-4.144-17.743-5.215-23.593-.146-.795-.275-1.5-.386-2.09-.369-1.975-.591-3.935-.808-5.828-.284-2.498-.554-4.857-1.118-6.696l-.311-1.014.518.295a8.435 8.435 0 0 0-.539-1.199c-1.739-3.133-2.525-1.848-3.936-6.913-1.073-3.85-2.386-7.25-4.824-11.594-.45 1.492-.972 2.944-1.467 4.45-.956 2.897-.981 5.362.018 8.193.372 1.055.661 2.155.879 3.283l.396-.17.092.522c.666 3.78.638 8.161-.082 13.025-1.258 8.369-5.06 15.851-9.181 23.415-.456.834-.956 1.661-1.483 2.538-2.069 3.434-4.209 6.985-3.53 10.831.24 1.357.664 2.715 1.117 4.154.708 2.268 1.443 4.614 1.383 6.941-.068 2.557-2.373 5.529-5.246 5.529-.293 0-.586-.031-.875-.094a32.806 32.806 0 0 1-1.978-.539c-1.333-.391-2.711-.799-4.04-.799-.814 0-1.54.15-2.22.461-.771.349-1.437.971-2.081 1.573-.201.191-.401.376-.606.556-1.635 1.443-3.043 2.228-4.708 2.621a15.96 15.96 0 0 1-3.687.409c-2.217 0-4.606-.39-7.102-1.161-.991-.309-3.054-.945-3.027-2.516.017-1.011.875-1.777 1.501-2.338l.329-.292c1.471-1.282 3.194-2.342 4.865-3.369.629-.389 1.286-.792 1.901-1.193 1.976-1.282 4.056-2.706 6.548-4.474 2.504-1.779 4.154-3.616 5.045-5.621.362-.812.772-1.619 1.167-2.398.774-1.529 1.576-3.109 2.029-4.762 1.025-3.75 1.81-15.59 1.818-15.697.195-5.522.458-11.423 1.046-17.151l.019-.185.15-.11c.1-.075.202-.149.305-.223.154-1.448.33-2.892.533-4.327.564-3.995 1.788-8.564-.075-12.392-1.48-3.041-1.218-6.035-1.48-9.355-.567-7.134-3.397-13.732-4.369-20.789a129.162 129.162 0 0 1-1.115-21.947c.093-2.66.242-5.345.652-7.965-.542-.86-1.107-1.598-1.697-2.116-2.767-2.43-16.811-11.084-19.283-15.707-2.477-4.623-.7-13.566.509-18.364 1.178-4.672 3.27-4.536 3.799-9.789.528-5.253 6.764-14.781 6.764-14.781s3.495-9.884 9.583-12.833c2.455-1.957 4.892-2.262 6.785-2.144.402-.1 4.41-1.094 8.661-2.19l-.045-.326c-2.84-.43-1.969-1.46-1.969-1.46s-.765.524-1.376.311c-1.565-.542-2.594-1.837-2.938-2.946-.345-1.108-.325-9.416-.89-10.669-.565-1.253-2.065-3.684-1.708-4.71.36-1.027 1.268-2.701 1.075-3.081-.194-.379-1.532-3.146-.991-4.745.196-.577.913-1.815 1.77-3.183-.175.187-.275.3-.275.3s.021-1.98 1.6-5.357c1.581-3.377 4.995-6.182 4.995-6.182l-.223 2.941s.534-2.55 3.965-3.455c3.43-.905 5.793.203 5.793.203l-1.948 1.433s3.144-1.532 6.542-1.134c3.399.396 6.636 3.149 6.636 3.149l-1.811.264s1.814 1.754 4.033 3.082c2.22 1.327 2.577 2.319 2.577 2.319s-1.825.38-2.071 2.489c-.247 2.109-.764 8.577-1.637 10.968-.663 1.813-1.795 3.57-2.304 4.313l.286.762c-1.129 2.61.276 4.743-.122 7.572a2.276 2.276 0 0 1-.34.877c13.797-2.203 30.236-1.437 38.839 1.84 16.726 6.432 26.376 23.159 45.675 23.802 19.301.644 38.601-12.223 58.543-7.076 5.79 1.287 9.649 4.504 13.511 8.363 5.146 4.503 10.291 9.006 16.084 12.223-12.225 4.504-21.873 2.573-23.805 18.657-1.285 13.509-1.93 26.375-17.369 29.592-13.511 3.217-27.663-3.86-39.887 4.504-7.72 5.146-7.077 14.797-11.58 21.872-4.502 9.651-10.936 16.083-21.871 14.797-12.226-1.287-21.873-9.65-34.098-9.007-2.497 0-4.996.607-7.493 1.819.9 8.704 1.49 16.902 1.077 20.069-.535 4.103-.024 6.368.676 7.846zm-47.861-77.259c1.04-3.92-.19-10.75-.803-14.726-.442-2.847-1.741-5.627-2.935-8.179-2.549 5.476-6.527 10.322-5.576 13.589 1.11 3.814 5.099 5.725 8.48 11.07.24-.634.691-1.929.691-1.929l.143.175z"/><g transform="translate(873 1139)"><path fill="#418ECA" d="M25.659 35.361c-3.172-2.336-6.91-.743-11.387 5.818-.707 1.039-4.095 6.596-4.929 7.549-5.133 5.867-7.37 9.449-8.257 11.024-2.707 4.801 10.995 19.498 13.189 22.801 2.192 3.301 1.362-6.213 1.362-6.213S7.703 63.739 7.749 63.136c.139-1.771 8.088-8.693 8.088-8.693s14.449-15.673 9.822-19.082"/><path fill="#1A1919" d="M12.857 51.647c-.474-1.979-.629-3.155.447-5.129.995-1.787 1.971-3.936 3.437-5.476 1.325-1.397 3.519-3.25 3.992-5.325 2.244-1.478 3.091-1.706 4.926-.356 4.627 3.409-9.822 19.082-9.822 19.082s-.308.237-1.477 1.316c-.536-1.429-1.226-2.819-1.503-4.112"/><path fill="#F1DCBC" d="M7.677 67.01c.265.114.596.29.919.272 0-.835-.057-1.567.078-2.329 2.082 3.634 6.963 11.387 6.963 11.387s.83 9.514-1.362 6.213c-1.503-2.263-8.412-9.878-11.739-15.992.605-.009 1.199-.003 1.761-.01 1.161.001 2.266.133 3.38.459"/><path fill="#2D2118" d="M67.078 66.508c-.148-.429-.288-.86-.423-1.295.256.374.301.868.423 1.295-.095-.271-.065-.227 0 0zm4.192-7.726c-.312 1.108-.841 2.211-1.687 3.014.877-3.611 1.518-6.704-.744-9.975 2.497 1.554 3.199 4.218 2.431 6.961-.235.835.232-.83 0 0zm-4.727 5.777c-1.107-1.913-1.362-4.535-2.186-6.615-.729-1.845-1.721-3.524-3.028-5.019 2.897.461 5.47 2.197 5.433 5.41-.026 2.201-.433 4.31-.067 6.509a19.071 19.071 0 0 0-.152-.285zM19.642 7.837c-5.382 8.241-4.964 16.814.79 24.746 1.901 4.55 4.693 8.136 8.709 11.016 2.418 1.72 2.927 4.571 3.602 7.322 1.965 8.011 8.398 11.746 16.182 13.188 3.469.641 7.258 1.163 10.237 3.186 1.639 1.113 2.871 2.924 2.693 4.983-.04.467-2.34 4.658-2.906 3.93.15.384 2.912-1.891 3.093-2.13.938-1.226 1.142-2.818.883-4.309-.52-3.145-3.305-5.278-5.936-6.704 1.801-.147 3.633-.22 5.427.033 1.158 1.491 1.749 3.317 2.285 5.1.399 1.331.757 2.674 1.133 4.01.018-1.985.084-3.978-.043-5.96 1.195 2.048 2.714 4.243 4.419 5.909 1.059 1.039 2.433 1.773 3.94 1.799.165.003 2.42-.342 2.354-.498.116.407-3.308-.239-3.6-.401-1.156-.627-1.972-1.736-2.529-2.901-.938-1.968-1.317-4.29-1.126-6.46.127-1.484.762-1.453 1.707-2.45.924-.975 1.591-2.208 1.986-3.489.47-1.523.555-3.395.009-4.91-1.49-4.15-6.537-6.541-10.605-7.492-3.865-.904-9.179-1.482-9.533-6.438-.265-3.698.89-7.276-.058-10.944-1.556-6.014-6.959-7.692-12.174-9.532-1.925-.677-3.754-1.549-5.235-2.977-1.689-1.636-1.027-5.038-1.737-7.147-.761-2.268-2.502-3.616-4.715-4.386-.508-.177-6.552-1.424-6.553-.103-.284.896-1.934 2.851-2.699 4.009-.848 1.298.856-1.295 0 0z"/><path fill="#F1DCBC" d="M31.302 24.242s.144 2.631 1.084 4.209c.939 1.576 5.973 4.308 5.973 4.308s-8.682 7.089-9.748 7.458c-1.065.368-3.41.033-4.292-.462-.88-.494-1.908-3.696-1.85-4.009.062-.315 1.136-1.925 1.472-2.874.336-.95.238-6.918.238-6.918l7.123-1.712"/><path fill="#C8A67A" d="M27.466 32.44c-1.221.265-2.352-.03-3.377-.598.155-1.998.09-5.888.09-5.888l7.123-1.712s.144 2.619 1.078 4.198c-1.212 1.75-2.845 3.554-4.914 4"/><path fill="#418ECA" d="M52.384 76.226c-.717-1.746-2.198-21.275-2.647-24.105-.475-3-1.764-5.256-2.042-6.095-.279-.838-.416-1.917-.386-2.772.032-.854-.726-6.617-3.544-9.424-1.527-1.519-4.439-1.695-5.757-1.7-1.32-.005-3.031.637-4.788 1.815-2.395 1.606-8.073 6.813-8.966 6.086-.893-.727-.697-5.476-1.035-6-.341-.524-1.003.133-1.837.489-.834.356-3.258 2.817-3.902 3.783-.39.583-.845 1.989-1.181 3.305-.949 1.267-1.916 2.872-2.225 3.489-.559 1.117-1.23 3.015-.252 5.289.979 2.274 2.491 4.363 3.246 5.406.079.111.179.241.288.38.183 1.025.346 2.078.509 3.211.377 2.617-.365 4.675-.652 6.475-.29 1.8-1.27 6.198-1.752 8.706 0 0 23.626 3.676 22.547 2.343-1.521-1.87-2.272-4.221-3.175-5.982-1.638-3.2-.891-6.997-.824-8.552.07-1.556 1.284-3.484 2.005-4.455.723-.971 2.262-5.428 2.692-6.073.429-.645 1.076 1.212 1.697 2.651 2.231 5.159 5.655 20.019 5.667 24.018.002.836.199 2.199.814 4.919.598 2.649 2.132 11.967 2.466 13.809.334 1.844-.053 1.865-.637 3.915-.586 2.05-.368 3.201-.459 4.368-.09 1.169.142 2.555.222 4.022.059 1.07-.04 1.492-.077 2.029.374-.035.749-.063 1.123-.098.18-.714-.036-1.908-.036-1.908l.035-.777c.035-.778.771-1.516.771-1.516s.843 2.667.877 3.286a4.56 4.56 0 0 1-.051.757c.57-.054 1.14-.113 1.71-.17.051-.312.085-.632.105-.994.077-1.4-.681-9.843-.62-11.552.062-1.711.832-16.989.917-18.235.088-1.247-.131-2.398-.846-4.143z"/><path fill="#F1DCBC" d="M13.275 114.357c.248 2.93.465 5.505.518 6.485.142 2.57.195 10.608.117 11.522-.08.915 10.276-.407 10.454-3.326.08-1.332.027-2.455-.175-3.157-.551-1.919-1.355-8.497-1.409-11.782-3.166.125-6.334.209-9.505.258zm32.218-.586c-.014-.246-.036-.633-.067-1.125-3.666.317-7.336.602-11.008.84.807 2.436 1.666 5.042 2.654 7.846 2.619 7.427 3.574 7.218 4.677 9.679.352.787.643 2.24.886 3.907.143.979 1.293 3.566 3.45 7.762 3.916-6.327 5.657-10.023 5.223-11.089a95.252 95.252 0 0 0-.948-2.244c-1.548-3.546-3.162-6.761-3.297-7.145-.165-.464-1.457-6.384-1.57-8.431z"/><path fill="#252A1D" d="M46.24 162.453c.456-1.76-2.155-16.589-2.526-18.303-.254-1.175-.565-5.746-1.09-9.302 1.91 2.246 3.142 4.89 3.142 4.89s.696-3.069 1.62-5.936c.631-1.954 2.083-3.652 2.94-4.533.334.764.669 1.546.982 2.322 1.111 2.729 2.197 7.29.892 13.669-1.306 6.379-2.464 9.117-1.716 16.484.49 4.86 2.943 6.733.853 11.422-2.09 4.687-3.008 5.666-5.125 4.834-2.117-.828-2.998-6.143-2.061-9.191.936-3.048 1.636-4.597 2.089-6.356m-44.51 6.389c.866-.809 6.047-4.125 7.04-4.938.995-.815 2.133-1.332 3.698-3.543 1.14-1.611 1.047-6.884 1.273-7.503.224-.62.089-19.579.169-20.494.003-.037.006-.088.008-.147a16.36 16.36 0 0 1 3.131-1.887c2.284-1.059 4.805-1.744 7.337-1.736-.117 2.953-.955 7.146-2.35 9.998-1.983 4.055-3.017 8.815-2.938 12.605.077 3.788.527 7.253 1.341 10.242.813 2.989 2.103 5.196.124 6.974-1.976 1.775-2.577.294-5.18.132-2.605-.16-2.563.598-4.549 2.226-1.984 1.625-5.679 1.373-8.314.608-2.639-.767-1.521-1.855-.79-2.537"/><path fill="#1A1919" d="M38.727 49.838c.449.402.692 1.411.731 2.504-.284-.531-.544-.81-.752-.497-.309.463-1.191 2.895-1.929 4.589.11-.501.173-1.069.172-1.725-.054-1.02-1.073-7.101 1.778-4.871"/><path fill="#F1DCBC" d="M21.655 8.25c4.388-1.947 12.618 2.256 12.52 10.33-.1 8.073-5.219 10.99-6.67 11.38-1.454.391-7.342-5.104-8.449-9.697-1.105-4.594-1.795-10.064 2.599-12.013"/><path fill="#50341D" d="M23.135.769c-1.631.621-2.748 2.046-2.998 3.769-.12.797-.689 1.004-1.064 1.724a3.338 3.338 0 0 0-.298 2.244c.571 2.631 3.126 4.794 5.193 6.362 2.318 1.757 4.762 3.332 7.077 5.095 1.198.912 2.495 1.752 3.588 2.787 1.112 1.048 1.803 2.418 2.41 3.802 1.484 3.374 2.887 6.494 5.852 8.851 1.346 1.07 2.862 1.8 4.174 2.894a12.895 12.895 0 0 0 4.708 2.483c2.835.813 5.748.852 8.477 2.144 1.402.665 2.881 1.604 3.329 3.18.181.641.253 1.37.027 2.011-.029.087-.869 1.224-.98.987.083.36 1.463-.994 1.563-1.212.341-.746.402-1.609.307-2.415-.236-2.029-1.894-3.62-3.454-4.78-1.773-1.313-3.776-2.296-5.836-3.069-1.184-.438-2.308-.912-3.303-1.72 1.813.471 3.635.805 5.368 1.544 1.095.463 2.153 1.004 3.211 1.539-1.486-1.529-2.993-3.018-4.785-4.198a20.193 20.193 0 0 1 5.264 2.815c.179.135 2.663 1.999 2.54 2.233.194-.134-2.047-3.261-2.183-3.432 1.785.628 3.555 1.427 5.121 2.501.738.501 1.14 1.155 1.283 2.041.031.192.239 1.36.086 1.47.331.032.268-2.636.208-2.891-.325-1.39-1.844-2.481-2.858-3.371-2.366-2.078-5.292-3.345-7.792-5.233-2.252-1.699-3.93-4.136-5.459-6.469-1.685-2.569-3.198-5.247-4.788-7.874-2.795-4.622-6.177-9.043-10.386-12.473C33.37 1.364 27.417-.864 23.135.769c-.943.36.948-.361 0 0"/><path fill="#343534" d="M11.419 107.536c0 3.597-.359 12.226-.359 12.226s9.709 2.878 19.777 3.238c10.069.359 17.98-3.598 19.418-4.316 1.439-.72 6.114-1.079 6.114-1.079S41.625 82.724 37.31 75.172c-4.315-7.552-21.935-.719-21.935-.719s-3.956 29.486-3.956 33.083z"/><path fill="#CBCCCB" d="M35.787 113.862L65.21 113.862 65.21 91.636 35.787 91.636z"/><path fill="#FFFFFE" d="M53.356 102.432a3.386 3.386 0 1 1-6.775 0 3.386 3.386 0 0 1 6.775 0"/><path fill="#F1DCBC" d="M56.411 114.063c-.102-.647-1.022-4.939-1.601-6.029-.579-1.09-2.213-5.415-2.316-6.301a6.177 6.177 0 0 0-.081-.502c-.072-1.187-.117-2.162-.1-2.627.056-1.573.712-14.603.884-17.671-1.449.638-2.606 1.769-2.948 3.462-.025.119-.162.146-.251.081-1.181-.862-2.301-1.782-3.46-2.641.098.475.213 1.002.346 1.598.598 2.649 2.132 11.967 2.466 13.809.334 1.844-.053 1.865-.637 3.915a10.41 10.41 0 0 0-.38 2.055l-.028.02s-1.124 5.755-1.159 6.744c-.034.988.103 2.794-.102 3.44-.204.647-.953 2.248-.953 2.248s1.226.408 1.669-.102c.442-.511 1.635-2.419 1.635-2.589 0-.17.238 2.112.238 2.112s.238 1.123.851.987c.614-.135.818-.987 1.397-.987.579 0 .238.681.783.681s.817-.919 1.26-.988c.443-.068.409.545 1.124.477.716-.068 1.465-.546 1.363-1.192"/></g><g transform="translate(925 1113)"><path fill="#907E63" d="M43.628 20.934s2.299 6.159 2.791 7.309c.493 1.149 1.971 4.106 2.3 4.27.328.164.083-.411 2.956-.247 2.874.165 2.793 3.203 2.793 3.203s-17.247 12.424-22.502 12.26c-5.257-.165-14.432-9.027-14.432-9.027s2.408-1.697 5.036-2.026c2.627-.328 7.508-1.207 7.508-1.207l-.82-5.995 14.37-8.54"/><path fill="#605442" d="M44.112 22.228l-.484-1.294-14.37 8.54.82 5.995.024.655c.666.174 1.467 0 2.132-.092.548-.075 1.096-.154 1.647-.16 3.391-.034 3.815-2.246 5.641-3.714.738-.595 1.789-1.177 2.504-1.841.698-.646 1.863-1.468 1.995-2.402.298-2.125-.756-3.727.091-5.687"/><path fill="#907E63" d="M23.137 12.53c-.406 1.201.598 3.28.743 3.564.146.285-.536 1.543-.805 2.314-.269.77.857 2.596 1.281 3.537.425.941.411 7.181.669 8.013.259.834 1.031 1.806 2.206 2.213.46.16 1.035-.233 1.035-.233s-.779.92 2.134 1.171 4.239.024 4.958-.784a13.006 13.006 0 0 1 3.252-2.652c1.532-.891 3.177-1.235 4.235-3.428 1.059-2.195.244-5.143.316-5.759.072-.615.908-3.193 1.026-4.962.117-1.77.029-9.982-4.898-10.736-4.928-.754-8.752-2.182-11.997 1.184-.347.361-3.747 5.358-4.155 6.558z"/><path fill="#252A1D" d="M10.417 216.905a11.96 11.96 0 0 0 2.741-.509c1.224-.385 2.236-1.049 3.383-2.22.142-.147.282-.296.423-.448.45-.487.914-.99 1.472-1.293a3.933 3.933 0 0 1 1.637-.468c.996-.072 2.05.157 3.07.377.499.11 1.016.22 1.512.296.22.031.441.039.661.023 2.152-.156 3.716-2.509 3.626-4.429-.082-1.747-.762-3.463-1.416-5.124-.417-1.051-.81-2.047-1.064-3.048-.719-2.846.689-5.624 2.051-8.308.347-.687.676-1.331.972-1.982 2.673-5.892 5.112-11.703 5.595-18.042.273-3.683.054-6.965-.652-9.759l-.097-.387-.354.183c-1.25.648-2.542 1.271-3.791 1.876-2.015.974-4.099 1.981-6.081 3.12-1.893 1.087-3.476 2.185-4.841 3.359l-.106.09-.003.14c-.127 4.324-.002 8.758.154 12.904.001.081.061 8.992-.502 11.858-.249 1.263-.763 2.49-1.259 3.679a37.83 37.83 0 0 0-.742 1.858c-.558 1.549-1.695 3.019-3.473 4.488a140.341 140.341 0 0 1-4.659 3.709c-.438.336-.908.671-1.358.999-1.195.86-2.429 1.749-3.46 2.788l-.002.001-.228.237c-.438.454-1.041 1.074-.997 1.832.066 1.178 1.646 1.541 2.406 1.72 1.912.439 3.723.601 5.382.48m48.342-17.409c-.061-.729-.12-1.391-.177-1.998-2.779.008-5.558.027-8.333.166.123 1.295.118 2.214-.023 2.725a69.888 69.888 0 0 0-.673 2.688c-.419 1.782-.896 3.802-1.874 6.799-1.546 4.737-.235 12.915 3.039 14.265.754.312 1.371.455 1.942.455h.001c2.291 0 3.795-2.391 6.296-7.75 2.28-4.883 1.622-7.814.789-11.523-.372-1.659-.794-3.54-.987-5.827"/><path fill="#1A1919" d="M43.173 6.685C41.498 1.614 35.196-.77 29.067 1.234c-6.128 2.004-9.714 7.787-8.059 12.795 5.94-5.694 14.013-8.316 22.165-7.344"/><path fill="#1A1919" d="M42.825 26.504c5.014-1.74 7.194-8.587 4.866-15.295C45.364 4.504 39.413.477 34.398 2.216l8.427 24.288"/><path fill="#907E63" d="M10.651 78.683a45.745 45.745 0 0 1 1.863-3.532c1.434 1.934 3.564 3.845 5.364 7.127 2.666 4.863 2.646 2.235 6.408 2.956 3.761.723 2.648 2.609 4.168 4.851 1.519 2.242 2.614 3.583 2.169 5.555-.446 1.982-2.352 3.947-6.213 4.788-2.96.642-4.507.99-6.024-.878-1.517-1.866-3.068-8.237-5.338-10.474l-2.663-10.294c.093.056.223-.01.266-.099"/><path fill="#343534" d="M19.27 83.782s-2.21 36.436-1.916 49.688c.269 12.047-2.613 44.024-2.613 44.024l-3.945 27.935 21.639.606s3.332-31.497 3.661-37.41c.329-5.914 3.075-39.73 3.075-39.73s4.058 45.376 4.387 47.675c.329 2.299 3.09 30.951 3.09 30.951l7.213 3.394 12.941-1.697s-1.899-43.82-2.885-49.732c-.985-5.914-2.495-21.418-3.48-27.332-.985-5.912-7.228-41.395-7.228-41.395l-1.971-3.614-31.968-3.363"/><path fill="#D89A13" d="M52.236 79.356c.742-4.081 5.936-21.521 5.936-21.521l12.653 14.101-15.621 17.439 3.339 8.163s24.155-19.666 25.639-23.005c1.485-3.34-15.62-33.394-18.959-36.734-3.34-3.34-10.532-5.159-13.8-5.362-3.269-.204-20.337 12.783-20.337 12.783l-2.339-9.926s-9.352.124-13.183 3.244c-2.459 2.001-7.112 10.393-9.338 15.958-2.227 5.566-9.018 15.987-4.937 20.811 4.082 4.824 13.789 17.201 13.789 17.201A639.882 639.882 0 0 0 18.968 87l-.34-5.241c-2.716-2.696-6.805-7.234-6.805-10.195 0-4.452 5.33-12.244 5.33-12.244l1.984 30.162 32.376-.816s-.019-5.228.723-9.31z"/><g transform="rotate(24 -140.5 137.11)"><path fill="#CBCCCB" d="M0.909 25.869L33.909 25.869 33.909 0.869 0.909 0.869z"/><path fill="#FFFFFE" d="M21.663 12.71a4 4 0 1 1-8.001 0 4 4 0 0 1 8 0"/></g><path fill="#907E63" d="M63.861 83.712l-7.227 3.596c-2.666 4.862-2.646 2.234-6.407 2.955-3.762.722-2.648 2.609-4.168 4.851-1.52 2.241-2.615 3.582-2.17 5.555.447 1.982 2.352 3.947 6.213 4.788 2.961.643 4.508.991 6.024-.878 1.517-1.866 3.068-8.238 5.338-10.474l2.663-10.294c-.093.057-.223-.01-.266-.099"/><path fill="#D89A13" d="M63.687 63.981l7.138 7.955-15.621 17.439 3.339 8.163s24.155-19.666 25.639-23.005c.76-1.711-3.358-10.434-8.005-18.985"/><path fill="#907E63" d="M39.404 18.504c.021 2.062.83 3.728 1.805 3.718.975-.011 1.748-1.692 1.727-3.755-.022-2.063-.829-3.728-1.804-3.717-.976.009-1.75 1.69-1.728 3.754"/><path fill="#583F07" d="M27.989 38.209L31.086 45.22 30.232 36.567 27.989 38.209"/><path fill="#886210" d="M29.74 33.119L26.456 34.268 24.54 42.862 30.232 36.567 29.74 33.119"/><path fill="#886210" d="M47.748 30.82L39.921 38.757 48.623 36.403 49.5 40.618 51.196 32.024 47.748 30.82"/></g></g></g></g></svg>
\ No newline at end of file diff --git a/addons/website_slides/static/src/img/banner_default_all.svg b/addons/website_slides/static/src/img/banner_default_all.svg new file mode 100644 index 00000000000..7d5c3a66dae --- /dev/null +++ b/addons/website_slides/static/src/img/banner_default_all.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1280" height="515"><defs><path id="a" d="M0 0L1280 0 1280 515 0 515z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><use fill="#845978" xlink:href="#a"/><g mask="url(#b)"><g transform="translate(-238 -978)"><path fill="#FFF" opacity=".101" d="M2560 1257.215L1494.187 1286.119 2545.323 1103.766 2526.265 1005.092 1481.549 1245.226 2481.399 853.6 2443.725 760.682 1469.888 1204.02 2372.678 624.649 2318.107 540.942 1442.872 1171.185 2219.915 418.519 2150.277 347.403 1416.649 1137.689 2033.686 249.494 1951.901 193.491 1379.408 1117.883 1815.318 118.773 1724.348 80.284 1342.631 1097.186 1579.95 35.41 1483.409 15.639 1300.81 1093.465 1329.232 0 1230.768 0 1259.073 1088.687 1080.55 14.989 983.951 34.456 1219.029 1101.615 835.652 80.284 744.685 118.773 1178.704 1113.549 611.515 191.345 529.566 247.096 1146.553 1141.127 409.713 347.396 340.088 418.516 1113.739 1167.899 244.251 537.623 189.416 621.159 1094.35 1205.947 116.272 760.679 78.594 853.6 1074.111 1243.515 34.664 1001.099 15.304 1099.718 1070.511 1286.254 0 1257.215 0 1357.78 1065.826 1328.876 14.672 1511.237 33.732 1609.9 1078.463 1369.772 78.594 1761.395 116.272 1854.316 1090.122 1410.977 187.322 1990.346 241.893 2074.063 1117.133 1443.818 340.088 2196.479 409.708 2267.597 1143.349 1477.318 526.309 2365.501 608.092 2421.514 1180.607 1497.092 744.675 2496.227 835.644 2534.721 1217.369 1517.806 980.047 2579.588 1076.586 2599.359 1259.195 1521.54 1230.768 2615 1329.232 2615 1300.932 1526.29 1479.453 2600.009 1576.049 2580.541 1340.973 1513.385 1724.348 2534.721 1815.318 2496.227 1381.305 1501.468 1948.487 2423.652 2030.447 2367.904 1413.474 1473.89 2150.284 2267.597 2219.915 2196.479 1446.256 1447.099 2315.757 2077.374 2370.584 1993.836 1465.623 1409.033 2443.733 1854.316 2481.399 1761.395 1485.901 1371.472 2525.339 1613.896 2544.686 1515.272 1489.581 1328.754 2560 1357.78 2560 1257.215"/><path fill="#845978" d="M238 1530L1649 1530 1649 1288 238 1288z"/><path fill="#62495B" d="M1184.337 1239.582c.847 2.898-.292 11.332-2.838 16.44-2.61 5.243-3.973 11.4-3.87 16.3.104 4.9.696 9.381 1.768 13.249.61 2.202 1.424 4.075 1.53 5.704.116 1.291-.188 2.43-1.356 3.457-2.603 2.295-3.393.38-6.824.172-3.432-.206-3.377.77-5.994 2.872-2.615 2.1-7.481 1.773-10.954.786-1.726-.491-2.233-1.085-2.187-1.666-.052-.639.623-1.273 1.146-1.75 1.139-1.047 7.964-5.337 9.272-6.39 1.31-1.052 2.808-1.722 4.869-4.58 1.502-2.083 1.38-8.905 1.677-9.706.296-.8.117-25.32.223-26.503.103-1.182.032-11.58-.154-14.905-.187-3.326-1.853-20.897-1.838-23.644.015-2.42-.22-10.46-.078-12.351.41-5.36 1.482-11.253 1.951-13.672-4.047-5.29-17.535-20.276-17.058-27.208-.057-.897.08-1.685.456-2.335 1.178-2.043 4.149-6.69 10.967-14.3 1.108-1.237 5.609-8.446 6.549-9.792 2.508-3.59 4.842-6.03 7.015-7.427-.027.117-.055.234-.085.351.4-.253.795-.47 1.184-.652.237-.186.453-.34.638-.455.473-.493 1.117-.989 1.75-1.443.481-1.24 1.321-2.015 2.509-2.517-3.11-1.568-6.466-5.624-7.866-11.291-.793-3.207-1.213-6.385-1.116-9.238a36.606 36.606 0 0 1-.004-1.584c.05-2.044-.037 2.043 0 0 .03-1.213.25-3.094.303-4.57a7.24 7.24 0 0 1-.374-.35 4.327 4.327 0 0 1-1.252-2.69c-.086-1.057.41-1.68-.018-2.645-.936-2.078-.973-2.206.426-4.024 3.676-4.777 11.967-6.44 17.705-5.739 7.173.876 14.116 3.421 20.537 6.594 3.653 1.805 7.251 3.718 10.968 5.39 3.375 1.521 6.992 3.053 10.734 3.371 4.154.355 8.352-.273 12.49.385 1.772.281 4.26.434 5.608 1.746.248.241 2.206 3.148 1.81 3.342.095-.226-.966-1.376-1.136-1.566-.788-.882-1.703-1.326-2.893-1.368-2.524-.101-5.084.242-7.542.785.274.095 5.011 2 4.888 2.282-.025-.343-4.147-.683-4.444-.707a27.4 27.4 0 0 0-7.93.534c2.858.064 5.61.666 8.367 1.327-1.572.141-3.148.277-4.711.525-2.476.384-4.768 1.278-7.145 2.015 1.693.203 3.296-.053 4.942-.39 2.869-.573 5.825-.874 8.754-.652 2.58.202 5.574.812 7.277 2.893.675.826 1.216 1.822 1.359 2.883.022.163-.131.914-.333 1.544 4.53-.863 9.602-.703 13.088 2.02 1.676 1.31 2.9 3.46 3.444 5.487.458 1.708.577 3.55.225 5.286-.36 1.774-1.093 2.183-.192 3.927 1.311 2.557 3.37 4.884 5.808 6.424 1.445.911 3.14 1.577 4.877 1.47.442-.026 4.739-1.7 4.322-2.072.184.126-2.103 2.09-2.29 2.202-1.71 1.025-3.767 1.167-5.687.749-3.085-.667-6.333-2.054-9.115-3.504 1.537 2.123 2.864 4.395 4.24 6.623-1.362-1.229-2.709-2.476-4.09-3.683-1.857-1.615-3.806-3.24-6.152-4.093-2.191.973-4.198 2.336-6.114 3.76 3.956-.25 8.58.182 11.377 3.33 1.338 1.483 2.231 3.402 2.041 5.427-.035.392-1.534 4.865-1.974 4.541 1.149.416.78-5.87.497-6.42-1.249-2.423-3.903-3.582-6.528-3.677-4.764-.174-9.383 1.896-13.727 3.607-6.39 2.517-12.823 3.525-18.704 1.79 2.999 6.302 5.64 12.88 11.16 17.713 8.531 7.055 19.945 9.093 30.411 10.297 13.644 1.476 26.787 2.094 37.221 10.814 7.107 5.805 18.999 8.258 28.462 7.75-12.617.678-17.857 12.01-26.522 18.664-8.667 6.653-20.557 4.2-30.995 3.437-13.168-1.06-15.554 12.77-20.491 21.434-4.558 7.316-14.275 11.375-22.461 10.491-7.107-.997-15.08-7.592-22.722-9.996.467 2.288.937 4.31 1.045 4.606.212.6 3.277 6.553 5.59 12.14 1.463 3.533 2.892 9.43 1.173 17.681-1.72 8.25-3.245 11.791-2.26 21.321.641 6.24 3.83 8.669 1.184 14.64-.103.294-.219.596-.349.907-1.936 4.633-2.625 6.691-4.74 6.816-.578.031-1.172-.081-1.816-.352-2.175-.91-3.326-5.513-3.108-9.464.019-1.23.178-2.415.49-3.412.688-2.203 1.28-3.8 1.771-5.177.302-.93.556-1.757.77-2.639.54-2.223-2.647-21.654-3.117-23.984-.05-.245-.1-.596-.154-1.034-.475-3.534-1.13-13.188-2.435-16.05-1.452-3.185-2.71-2.913-6.159-12.517-.37-1.031-.726-2.042-1.071-3.033-5.187 1.108-9.326 2.34-12.572 3.377-.905.288-2.457.932-4.1 1.502.263 1.753.538 3.221.777 4.037zm-11.709-65.5c1.087-5.093 2.296-10.76 2.52-12.129.378-2.328 1.356-4.99.86-8.373-.388-2.641-.758-4.978-1.322-7.285-.747.847-1.202 1.338-1.202 1.338s-9.15 7.925-10.484 10.847c.444 1.05 2.883 5.021 5.29 8.849 1.714 2.697 3.396 5.3 4.338 6.753zm61.355-68.14c.228.352.467.7.718 1.041 3.884 5.285 10.252 2.212 15.227.516 1.19-.406 2.49-.765 3.843-1.034.062-.433.087-.88.074-.937-.198-.864-.796-1.621-1.454-2.205-1.619-1.431-3.95-1.446-6.002-1.208-3.992.463-7.307 2.44-11.08 3.506-.437.124-.88.23-1.326.32z"/><path fill="#62495B" d="M1331.97 1238.626l.367-.223.221.408c.275.51.574.931.84 1.303.216.303.42.59.583.883l.064.114c4.362 7.816 5.312 15.846 5.339 21.21.039 7.821-2.491 17.906-4.167 24.58l-.242.962c.212 1.792.492 4.332.815 8.157.27 3.188.858 5.808 1.379 8.121 1.164 5.17 2.085 9.252-1.103 16.058-3.496 7.467-5.598 10.801-8.8 10.801h-.002c-.797 0-1.66-.2-2.712-.635-4.58-1.881-6.41-13.277-4.25-19.88 1.368-4.174 2.033-6.992 2.62-9.475.303-1.28.59-2.487.94-3.746.417-1.5.013-5.424-1.203-11.658-2.256-7.179-4.35-18.57-5.474-24.693-.154-.832-.289-1.57-.406-2.188-.387-2.067-.62-4.118-.848-6.1-.298-2.614-.581-5.083-1.173-7.008l-.327-1.061.544.309a8.815 8.815 0 0 0-.566-1.255c-1.825-3.28-2.65-1.935-4.132-7.236-1.126-4.03-2.505-7.587-5.064-12.134-.473 1.561-1.02 3.08-1.54 4.657-1.003 3.032-1.03 5.612.02 8.575.39 1.104.693 2.256.921 3.436l.417-.178.096.547c.7 3.956.67 8.541-.086 13.632-1.32 8.76-5.312 16.59-9.638 24.507-.478.873-1.003 1.739-1.557 2.657-2.172 3.594-4.418 7.31-3.705 11.336.252 1.42.697 2.841 1.172 4.348.744 2.373 1.515 4.829 1.452 7.264-.071 2.677-2.49 5.787-5.507 5.787-.307 0-.615-.032-.918-.098a34.52 34.52 0 0 1-2.077-.564c-1.4-.41-2.846-.837-4.24-.837-.855 0-1.618.157-2.331.483-.81.365-1.509 1.016-2.185 1.646-.21.2-.42.394-.636.582-1.716 1.51-3.194 2.332-4.942 2.743a16.802 16.802 0 0 1-3.87.429c-2.328 0-4.836-.409-7.456-1.216-1.04-.323-3.206-.989-3.178-2.633.018-1.058.919-1.86 1.576-2.447l.345-.306c1.544-1.341 3.353-2.45 5.107-3.526.66-.407 1.35-.829 1.996-1.248 2.074-1.342 4.258-2.833 6.874-4.683 2.628-1.862 4.36-3.785 5.296-5.883.38-.85.81-1.695 1.225-2.51.812-1.6 1.654-3.254 2.13-4.984 1.076-3.925 1.9-16.317 1.908-16.43.205-5.779.481-11.955 1.098-17.95l.02-.194.158-.115c.106-.078.212-.156.32-.233.162-1.516.347-3.027.56-4.53.592-4.18 1.876-8.963-.08-12.97-1.553-3.182-1.278-6.316-1.553-9.79-.595-7.467-3.566-14.373-4.586-21.76a134.789 134.789 0 0 1-1.17-22.97c.096-2.784.253-5.595.683-8.337-.568-.9-1.161-1.672-1.78-2.214-2.905-2.543-17.648-11.6-20.243-16.44-2.6-4.838-.735-14.198.534-19.22 1.237-4.89 3.433-4.748 3.988-10.246.554-5.498 7.1-15.47 7.1-15.47s3.67-10.345 10.06-13.431c2.578-2.049 5.136-2.368 7.123-2.245.422-.104 4.63-1.145 9.092-2.29l-.047-.343c-2.981-.45-2.067-1.528-2.067-1.528s-.803.548-1.445.326c-1.642-.568-2.723-1.923-3.084-3.084-.362-1.16-.341-9.855-.934-11.167-.593-1.311-2.168-3.855-1.793-4.93.378-1.074 1.331-2.826 1.128-3.224-.203-.397-1.608-3.293-1.04-4.966.206-.605.958-1.9 1.858-3.332-.183.196-.289.314-.289.314s.023-2.072 1.68-5.607c1.66-3.534 5.244-6.47 5.244-6.47l-.234 3.078s.56-2.669 4.162-3.616c3.6-.947 6.081.213 6.081.213l-2.045 1.5s3.3-1.604 6.868-1.187c3.568.414 6.966 3.295 6.966 3.295l-1.901.277s1.904 1.836 4.233 3.226c2.33 1.388 2.706 2.427 2.706 2.427s-1.916.397-2.174 2.605c-.26 2.207-.802 8.977-1.719 11.48-.695 1.896-1.884 3.735-2.418 4.514l.3.797c-1.185 2.732.29 4.964-.128 7.925a2.378 2.378 0 0 1-.358.918c14.484-2.305 31.741-1.504 40.772 1.926 17.559 6.732 27.689 24.24 47.948 24.912 20.262.674 40.522-12.793 61.456-7.406 6.078 1.347 10.13 4.714 14.184 8.753 5.402 4.713 10.803 9.426 16.884 12.793-12.833 4.714-22.961 2.693-24.99 19.527-1.348 14.14-2.026 27.606-18.233 30.973-14.183 3.367-29.04-4.04-41.872 4.714-8.104 5.386-7.429 15.487-12.156 22.892-4.726 10.1-11.48 16.833-22.96 15.487-12.834-1.347-22.96-10.1-35.794-9.427-2.62 0-5.245.635-7.866 1.903.945 9.11 1.565 17.69 1.13 21.006-.56 4.294-.024 6.665.71 8.211zm-50.243-80.861c1.092-4.104-.2-11.253-.843-15.414-.464-2.979-1.828-5.89-3.08-8.56-2.677 5.731-6.853 10.803-5.855 14.223 1.166 3.992 5.353 5.992 8.902 11.585.251-.663.726-2.018.726-2.018l.15.184z"/></g></g></g></svg>
\ No newline at end of file diff --git a/addons/website_slides/static/src/img/channel_demo_tree_1.jpg b/addons/website_slides/static/src/img/channel_demo_tree_1.jpg Binary files differnew file mode 100644 index 00000000000..af533083e08 --- /dev/null +++ b/addons/website_slides/static/src/img/channel_demo_tree_1.jpg diff --git a/addons/website_slides/static/src/img/slide_demo_tree_img_3.jpg b/addons/website_slides/static/src/img/slide_demo_tree_img_3.jpg Binary files differnew file mode 100644 index 00000000000..4169af2313a --- /dev/null +++ b/addons/website_slides/static/src/img/slide_demo_tree_img_3.jpg diff --git a/addons/website_slides/static/src/js/slides_join_channel.js b/addons/website_slides/static/src/js/slides_join_channel.js index 342e27e738f..39e454dc93a 100644 --- a/addons/website_slides/static/src/js/slides_join_channel.js +++ b/addons/website_slides/static/src/js/slides_join_channel.js @@ -51,10 +51,10 @@ var JoinChannelButton = Widget.extend({ }, }).then(function (data) { if (! data.error) { - self.$('a.o_wslides_join_channel_link').text(_t('Joined')); + location.reload(); } else { if (data.error === 'public_user') { - self._popoverAlert(self.$el, _.str.sprintf(_t('Please <a href="/web/login?redirect=%s">login</a> to join this channel.'), (document.URL))); + self._popoverAlert(self.$el, _.str.sprintf(_t('Please <a href="/web/login?redirect=%s">login</a> to join this course.'), (document.URL))); } else if (data.error === 'join_done') { self._popoverAlert(self.$el, _t('You have already joined this channel')); } else { diff --git a/addons/website_slides/static/src/js/slides_like.js b/addons/website_slides/static/src/js/slides_like.js index 589ca6fefda..f0589373cb9 100644 --- a/addons/website_slides/static/src/js/slides_like.js +++ b/addons/website_slides/static/src/js/slides_like.js @@ -86,8 +86,11 @@ sAnimations.registry.websiteSlidesLike = sAnimations.Class.extend({ * @param {Object} parent */ start: function () { + var self = this; var defs = [this._super.apply(this, arguments)]; - defs.push(new LikeButton(this).attachTo($('.o_wslides_like'))); + $('.o_wslides_like').each(function () { + defs.push(new LikeButton(self).attachTo($(this))); + }); return $.when.apply($, defs); }, }); diff --git a/addons/website_slides/static/src/scss/website_slides.scss b/addons/website_slides/static/src/scss/website_slides.scss index a456bb99c61..b884a0df64f 100644 --- a/addons/website_slides/static/src/scss/website_slides.scss +++ b/addons/website_slides/static/src/scss/website_slides.scss @@ -1,13 +1,7 @@ // FIXME may be useless (check initial code here: https://github.com/odoo/odoo/blob/51be5bbfb38db784cb3406877cc0e8806b1bf55a/addons/website_slides/static/src/less/website_slides.less#L1) $nav-tabs-border-color: #dddddd !default; -$info: #dddddd !default; $body-bg: #FFFFFF !default; -$primary: #428bca !default; $link-color: theme-color('primary') !default; -$panel-footer-bg: #f5f5f5 !default; -$nav-link-hover-bg: #FFFFFF !default; -$navbar-default-link-hover-color: #333 !default; -$light: #f8f8f8 !default; $MAX-Z-INDEX : 2147483647 !default; @mixin top-covered-image { @@ -26,38 +20,39 @@ $MAX-Z-INDEX : 2147483647 !default; padding: 0px 32px 0px 32px; } +div .o_wslides_home_nav { + top: -40px; + + @include media-breakpoint-up(md) { + font-size: 1rem; + + .o_wslides_nav_navbar_right { + margin-left: auto; + padding-left: $spacer; + border-left: 1px solid $border-color; + } + } +} + .o_wslides_wrap { background-color: desaturate(map-get($grays, "200"), 80%); - .cta-title { - font-size: 1.2em; - } .o_wslides_course_card { - .card-body { - padding: 0.75em 1em; - } - .card-footer { - padding: 0.75em 1em; - } + border-width: 0 0 3px 0; } .o_wslides_lesson_card { - .card-body { - padding: 0.75em 1em; - } - .card-footer { - padding: 0.75em 1em; - } + border-width: 0 0 3px 0; } // responsive card-deck like - .row.o_wslides_row > div[class*='col-'] { - display: flex; - flex:1 0 auto; - .card { - width:100%; - } - } + // .row.o_wslides_row > div[class*='col-'] { + // display: flex; + // flex:1 0 auto; + // .card { + // width:100%; + // } + // } // tools // **************************************** @@ -65,7 +60,8 @@ $MAX-Z-INDEX : 2147483647 !default; .text_small_caps { font-variant: small-caps; } - img.o_wslides_img_muted { + + .o_wslides_entry_muted { opacity: 0.5; } img.o_wslides_img_center_crop { @@ -144,13 +140,8 @@ div .o_wslides_home_main { font-size: 1.2em; } } - .o_wslides_home_content_section_title, .o_wslides_home_aside_title { - h3 { - font-size: 1.4em; - } - h4 { - font-size: 1.3em; - } + .o_wprofile_next_rank_card { + background-color: transparent !important; } } diff --git a/addons/website_slides/views/website_slides_templates_course.xml b/addons/website_slides/views/website_slides_templates_course.xml index 8b63565dbbf..3459fba05a5 100644 --- a/addons/website_slides/views/website_slides_templates_course.xml +++ b/addons/website_slides/views/website_slides_templates_course.xml @@ -21,6 +21,9 @@ <li class="breadcrumb-item active" t-att-aria-current="'page' and search_tag" t-if="search_tag"> <a t-att-href="'/slides/%s/tag/%s' % (slug(channel), slug(search_tag))"><span t-esc="search_tag.name"/></a> </li> + <li class="breadcrumb-item active" t-att-aria-current="'page' and search_uncategorized" t-if="search_uncategorized"> + <a t-att-href="'/slides/%s?search_uncategorized=1' % (slug(channel))">Uncategorized</a> + </li> <li class="breadcrumb-item active" t-att-aria-current="'page' and search_slide_type" t-if="search_slide_type"> <a t-att-href="'/slides/%s?slide_type=%s' % (slug(channel), search_slide_type)"><span t-esc="slide_types[search_slide_type]"/></a> </li> @@ -123,7 +126,7 @@ </div> </div> <div class="row o_wslides_course_main"> - <div class="col-lg-12 o_wslides_container o_wslides_content_containerUNFUCKME"> + <div class="col-lg-12 o_wslides_container"> <div class="row o_wslides_course_content_main"> <!-- Channel presentation, aka general information + CTAs --> <div class="col-md-4 col-xs-12 o_wslides_course_content_aside"> @@ -159,8 +162,8 @@ <span class="col-5">Members</span> <span class="col" t-esc="channel.members_count"/> </div> - <div class="row mt8"><div class="col"><hr/></div></div> <t t-if="channel.channel_type == 'documentation'"> + <div class="row mt8"><div class="col"><hr/></div></div> <t t-set="slide_type_keys" t-value="slide_types.keys()"/> <t t-foreach="slide_type_keys" t-as="slide_type_key"> <div class="row mt8 align-items-center"> @@ -220,7 +223,7 @@ </div> </div> </div> - <div t-if="channel.can_upload" class="row justify-content-center mt8 mb8"> + <div t-if="channel.can_upload" class="row justify-content-center mt8"> <a role="button" class="btn btn-primary oe_slide_js_upload col-10" title="Upload Presentation" aria-label="Upload Presentation" href="#" t-att-data-channel-id="channel.id" @@ -313,8 +316,8 @@ <div t-if="not search" class="col-md-8 col-xs-12 mt16 o_wslides_channel_content_promoted"> <div class="row align-items-center"> <div class="col"> - <h3> Featured lesson</h3> - <hr/> + <h5 class="m-0"> Featured lesson</h5> + <hr class="mt-2"/> </div> </div> <div class="row" t-if="slide_promoted"> @@ -351,11 +354,14 @@ <t t-foreach="category_data" t-as="category"> <div class="row mt16 align-items-center"> <div class="col"> - <a t-att-href="'/slides/%s/category/%s' % (slug(channel), category['id'])" class="float-right"> - View all - </a> - <h3><t t-esc="category['name']"/></h3> - <hr/> + <t t-if="category['id']"> + <a t-att-href="'/slides/%s/category/%s' % (slug(channel), category['slug_name'])" class="float-right">View all</a> + </t> + <t t-else=""> + <a t-att-href="'/slides/%s?uncategorized=1' % (slug(channel))" class="float-right">View all</a> + </t> + <h5 class="m-0"><t t-esc="category['name']"/></h5> + <hr class="mt-2"/> </div> </div> <t t-call="website_slides.course_lessons_grid"> @@ -370,56 +376,59 @@ <!-- Embedded template: display a list of slides in a grid view --> <template id='course_lessons_grid' name="Course: Lessons Grid View"> - <div class="row o_wslides_row mt8"> - <div class="col-lg-3 col-md-6 col-12" t-foreach="slides" t-as="slide"> - <div class="card o_wslides_lesson_card"> - <img class="card-img-top img-fuild" style="max-height: 160px;" - t-att-src="'/slides/slide/%s/get_image?field=image_large' % slide.id" - t-att-alt="slide.name"/> - <div class="card-body"> - <h5 class="card-title" t-att-title="slide.name"> - <t t-if="slide.is_preview or channel.is_member or is_slides_publisher"> - <a t-attf-href="/slides/slide/#{slug(slide)}" t-esc="slide.name"/> - </t> - <t t-else=""> - <span class="text-muted" t-esc="slide.name"/> - </t> - </h5> - <h6 class="card-subtitle mb-2 text-muted"> - <t t-if="slide.is_preview"> - <span class="badge badge-info">Free preview</span> - </t> - <t t-if="not slide.is_published and user.has_group('website.group_website_publisher')"> - <span class="badge badge-danger">Unpublished</span> - </t> - </h6> - <div class="card-text"> - <div class="text-muted oe_no_empty" t-field="slide.description"/> - <div t-if="slide.tag_ids"> - <t t-foreach="slide.tag_ids" t-as="tag"> - <a t-att-href="'/slides/%s/tag/%s' % (slug(slide.channel_id), slug(tag))" class="badge badge-secondary"> - <t t-esc="tag.name"/> - </a> - </t> - </div> - </div> + <div class="row o_wslides_row mx-n2 mt8"> + <t t-foreach="slides" t-as="slide"> + <div class="col-md-3 col-sm-6 px-2 col-xs-12 d-flex flex-grow-1" t-call="website_slides.lesson_card"/> + </t> + </div> +</template> + +<template id='lesson_card' name="Lesson Card"> + <div class="card w-100 o_wslides_lesson_card mb-4"> + <t t-set="lesson_image" t-value="'/slides/slide/%s/get_image?field=image_large' % slide.id"/> + <t t-set="can_access" t-value="slide.is_preview or channel.is_member or is_slides_publisher"/> + <a t-if="can_access" t-attf-href="/slides/slide/#{slug(slide)}" t-title="slide.name"> + <div class="card-img-top" t-attf-style="padding-top: 50%; background-image: url(#{lesson_image}); background-size: cover; background-position:center"/> + </a> + <t t-else=""> + <div class="card-img-top" t-attf-style="padding-top: 50%; background-image: url(#{lesson_image}); background-size: cover; background-position:center"/> + </t> + <div class="card-body"> + <a t-if="can_access" class="card-title h5" t-attf-href="/slides/slide/#{slug(slide)}" t-esc="slide.name"/> + <span t-else="" class="card-title h5 text-muted" t-esc="slide.name"/> + <div class="card-subtitle mb-2 text-muted"> + <t t-if="slide.is_preview"> + <span class="badge badge-info">Free preview</span> + </t> + <t t-if="not slide.is_published and user.has_group('website.group_website_publisher')"> + <span class="badge badge-danger">Unpublished</span> + </t> + </div> + <div class="card-text mt-1"> + <div class="font-weight-light oe_no_empty" t-field="slide.description"/> + <div t-if="slide.tag_ids" class="border-top mt-2 pt-1"> + <t t-foreach="slide.tag_ids" t-as="tag"> + <a t-att-href="'/slides/%s/tag/%s' % (slug(slide.channel_id), slug(tag))" class="badge badge-light" t-esc="tag.name"/> + </t> </div> - <div class="card-footer"> - <!-- CHECKME: like only if logged --> - <div class="float-right text-right o_wslides_like"> - <span class="o_wslides_like_up" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id"> - <i class="fa fa-thumbs-up fa-1x" role="img" aria-label="Likes" title="Likes"></i> - <span t-esc="slide.likes"/> - </span> - <span class="o_wslides_like_down" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id"> - <i class="fa fa-thumbs-down fa-1x" role="img" aria-label="Dislikes" title="Dislikes"></i> - <span t-esc="slide.dislikes"/> - </span> - </div> - <small class="text-muted" t-field="slide.completion_time" t-options='{"widget": "float_time"}'/> -<!-- <t t-esc="slide.total_views"/> Views - <timeago class="timeago" t-att-datetime="slide.create_date"></timeago> --> + </div> + </div> + <div class="card-footer border-top-0 text-600"> + <div class="d-flex align-items-center small"> + <span class="font-weight-bold mr-auto" t-field="slide.completion_time" t-options='{"widget": "float_time"}'/> + <div class="o_wslides_like mr-2"> + <span class="o_wslides_like_up" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id"> + <i class="fa fa-thumbs-up fa-1x" role="img" aria-label="Likes" title="Likes"></i> + <span t-esc="slide.likes"/> + </span> + <span class="o_wslides_like_down" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id"> + <i class="fa fa-thumbs-down fa-1x" role="img" aria-label="Dislikes" title="Dislikes"></i> + <span t-esc="slide.dislikes"/> + </span> </div> + <t t-if="channel.is_member and slide.id in done_slide_ids"> + <span class="badge badge-pill badge-success"><i class="fa fa-check"/> Completed</span> + </t> </div> </div> </div> diff --git a/addons/website_slides/views/website_slides_templates_homepage.xml b/addons/website_slides/views/website_slides_templates_homepage.xml index 74b8e4a7558..cad54cf323d 100644 --- a/addons/website_slides/views/website_slides_templates_homepage.xml +++ b/addons/website_slides/views/website_slides_templates_homepage.xml @@ -5,16 +5,18 @@ <template id='courses_home' name="Odoo Courses Homepage"> <t t-call="website.layout"> <div class="wrap o_wslides_wrap"> - <section class="s_banner bg-900" style="background-image: url("/website_slides/static/src/img/channel_banner_mountain.jpg"); background-size: cover; background-position: 65% 55%"> - <div class="container py-5"> - <h1 class="display-3 mb-0">Reach new heights</h1> - <h2 class="mb-4">Start your online course today !</h2> - <div class="row mt-1 mb-3"> - <div class="col-lg-4"> - <p>Skill up and have an impact! Your business career starts here. Time to start a course.</p> - </div> - <div class="col-lg-3"> - <a href="/slides/all" class="btn btn-primary btn-lg">Pick a course</a> + <section class="s_banner overflow-hidden bg-900" style="background-image: url("/website_slides/static/src/img/banner_default.svg"); background-size: cover; background-position: 55% 65%"> + <div class="container align-items-center d-flex mb-5 mt-lg-5 pt-lg-4 pb-lg-1"> + <div> + <h1 class="display-3 mb-0">Reach new heights</h1> + <h2 class="mb-4">Start your online course today !</h2> + <div class="row mt-1 mb-3"> + <div class="col-lg-4"> + <p>Skill up and have an impact! Your business career starts here. Time to start a course.</p> + </div> + <div class="col-lg-3"> + <a href="slides/all" class="btn btn-primary btn-lg">Pick a course</a> + </div> </div> </div> </div> @@ -31,61 +33,65 @@ <a class="nav-link nav-link mr-md-2 o_wslides_home_all_slides" href="/slides/all"><i class="fa fa-graduation-cap mr-1"/>All courses</a> </div> <div class="navbar-nav o_wslides_nav_navbar_right"> - <a class="nav-link nav-link" href="/slides/all"><i class="fa fa-file mr-1"/>My courses</a> + <t t-if="is_public_user"> + <a class="nav-link nav-link" href="/web/login?redirect=/slides/all?my=1"><i class="fa fa-file mr-1"/>My courses</a> + </t><t t-else=""> + <a class="nav-link nav-link" href="/slides/all?my=1"><i class="fa fa-file mr-1"/>My courses</a> + </t> </div> </div> </nav> </div> <div class="container o_wslides_home_main"> <div class="row"> - <div class="col-md-9"> + <div class="col-lg-9 pr-lg-5"> <t t-if="channels_my"> <t t-set="void_count" t-value="3 - len(channels_my[:3])"/> - <div class="o_wslides_home_content_section"> - <div class="row mt16 o_wslides_home_content_section_title align-items-center"> + <div class="o_wslides_home_content_section mb-5"> + <div class="row o_wslides_home_content_section_title align-items-center"> <div class="col"> <a href="slides/all" class="float-right">View all</a> - <h3><i class="fa fa-trophy"/> Complete latest courses</h3> - <hr/> + <h5 class="m-0">Complete latest courses</h5> + <hr class="mt-2"/> </div> </div> - <div class="row o_wslides_row mt8"> + <div class="row o_wslides_row mx-n2 mt8"> <t t-foreach="channels_my[:3]" t-as="channel"> - <div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/> + <div class="col-md-4 col-sm-6 px-2 col-xs-12 d-flex flex-grow-1" t-call="website_slides.course_card"/> </t> </div> </div> </t> - <div class="o_wslides_home_content_section"> - <div class="row mt16 o_wslides_home_content_section_title align-items-center"> + <div class="o_wslides_home_content_section mb-5"> + <div class="row o_wslides_home_content_section_title align-items-center"> <div class="col"> <a href="slides/all" class="float-right">View all</a> - <h3><i class="fa fa-fire"/> Most popular courses</h3> - <hr/> + <h5 class="m-0">Most popular courses</h5> + <hr class="mt-2"/> </div> </div> - <div class="row o_wslides_row mt8"> + <div class="row o_wslides_row mx-n2 mt8"> <t t-foreach="channels_popular[:3]" t-as="channel"> - <div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/> + <div class="col-md-4 col-sm-6 px-2 col-xs-12 d-flex flex-grow-1" t-call="website_slides.course_card"/> </t> </div> </div> - <div class="o_wslides_home_content_section"> - <div class="row mt16 o_wslides_home_content_section_title align-items-center"> + <div class="o_wslides_home_content_section mb-5"> + <div class="row o_wslides_home_content_section_title align-items-center"> <div class="col"> <a href="slides/all" class="float-right">View all</a> - <h3><i class="fa fa-plus-square"/> Newest courses</h3> - <hr/> + <h5 class="m-0">Newest courses</h5> + <hr class="mt-2"/> </div> </div> - <div class="row o_wslides_row mt8"> + <div class="row o_wslides_row mx-n2 mt8"> <t t-foreach="channels_newest[:3]" t-as="channel"> - <div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/> + <div class="col-md-4 col-sm-6 px-2 col-xs-12 d-flex flex-grow-1" t-call="website_slides.course_card"/> </t> </div> </div> </div> - <div class="col-md-3"> + <div class="col-lg-3"> <t t-if="is_public_user"> <t t-call="website_slides.slides_home_achievements_small"/> <t t-call="website_slides.slides_home_users_small"/> @@ -120,9 +126,9 @@ <template id='courses_all' name="Odoo All Courses"> <t t-call="website.layout"> <div class="wrap o_wslides_wrap"> - <section class="s_banner bg-900" style="background-image: url("/website_slides/static/src/img/channel_banner_mountain_all.jpg"); background-size: cover; background-position: 65% 45%"> + <section class="s_banner bg-900" style="background-image: url("/website_slides/static/src/img/banner_default_all.svg"); background-size: cover; background-position: 80% 20%"> <div class="container py-5"> - <h1 class="display-3 mb-0">All Courses</h1> + <h1 class="display-3 mb-0"><t t-if="search_my">My Courses</t><t t-else="">All Courses</t></h1> <h3 class="mb-4">Start your online course today !</h3> </div> </section> @@ -159,10 +165,18 @@ </t> <!-- karma / profile --> <li class="nav-item ml-auto" t-if="not is_public_user"> - <a t-att-href="'/profile/user/%s' % user.id" class="nav-link mr-2"> + <a t-att-href="'/profile/user/%s' % user.id" class="nav-link mr-2" + role="button" title="My Profile"> <i class="fa fa-diamond"/> <t t-esc="user_id.karma"/> </a> </li> + <!-- clear filtering --> + <li class="nav-item" t-if="search_slide_type or search_my or search_tags or search_channel_tag_id"> + <a t-att-href="'/slides/all?%s' % keep_query('debug')" class="nav-link mr-2" + role="button" title="Clear filters"> + <i class="fa fa-eraser"/> + </a> + </li> </ul> <!-- search box --> <form method="GET" class="form-inline o_wslides_nav_navbar_right"> @@ -180,31 +194,17 @@ </div> </nav> </div> - <div class="container o_wslides_home_main"> - <t t-if="search_term and not channels_layouted"> - <div class="row"> - <div class="col"> - <p class="alert alert-info">No channel was found matching your search <t t-esc="search_term"/>.</p> - </div> - </div> - </t> - <t t-foreach="channels_layouted" t-as="channels_row"> - <t t-set="missing" t-value="0"/> - <div class="card-deck mb32"> - <t t-foreach="channels_row" t-as="channel"> - <t t-if="channel"> - <t t-call="website_slides.course_card"/> - </t> - <t t-else=""> - <t t-set="missing" t-value="missing + 1"/> - </t> - </t> - <t t-if="missing"> - <div t-att-class="'col-%s' % (missing * 3)"/> - </t> - </div> - </t> + <div class="container o_wslides_home_main pb-5"> + <div t-if="search_term and not channels" class="alert alert-info mb-5"> + No channel was found matching your search <code><t t-esc="search_term"/></code>. + </div> + <div t-else="" class="row mx-n2"> + <t t-foreach="channels" t-as="channel"> + <div class="col-12 col-sm-6 col-md-4 col-lg-3 px-2 d-flex flex-grow-1" t-call="website_slides.course_card"/> + </t> + </div> </div> + <section class="s_banner bg-900" style="background-image: url("/website/static/src/img/backgrounds/people.jpg"); background-size: cover; background-position: 65% 55%"> <div class="container py-5"> <h1 class="display-3 mb-0">Meet the people who transformed their company</h1> @@ -224,47 +224,32 @@ </template> <template id='course_card' name="Course Card"> - <div class="card o_wslides_course_card"> - <img class="card-img-top img-fuild o_wslides_img_center_crop" - style="max-height: 160px;" - t-att-src="'/web/image/slide.channel/%s/image_large' % channel.id" - t-att-alt="channel.name"/> + <div class="card w-100 o_wslides_course_card mb-4"> + <t t-set="course_image" t-value="'/web/image/slide.channel/%s/image_large' % channel.id"/> + <a t-attf-href="/slides/#{slug(channel)}" t-title="channel.name"> + <div class="card-img-top" t-attf-style="padding-top: 50%; background-image: url(#{course_image}); background-size: cover; background-position:center"/> + </a> <div class="card-body"> - <h5 class="card-title" t-att-title="channel.name"> - <a t-attf-href="/slides/#{slug(channel)}" t-esc="channel.name"/> - </h5> - <div class="card-text"> - <div class="text-muted oe_no_empty" t-field="channel.description"/> - <div t-if="channel.tag_ids"> + <a class="card-title h5" t-attf-href="/slides/#{slug(channel)}" t-esc="channel.name"/> + <div class="card-text mt-1"> + <div class="font-weight-light oe_no_empty" t-field="channel.description"/> + <div t-if="channel.tag_ids" class="border-top mt-2 pt-1"> <t t-foreach="channel.tag_ids" t-as="tag"> - <a t-att-href="'/slides/all?channel_tag_id=%s' % tag.id" class="badge badge-secondary"> - <t t-esc="tag.name"/> - </a> + <a t-att-href="'/slides/all?channel_tag_id=%s' % tag.id" class="badge badge-light" t-esc="tag.name"/> </t> </div> </div> </div> - <div class="card-footer"> - <div class="row justify-content-between align-items-center"> - <small class="text-muted col-3" t-field="channel.total_time" t-options='{"widget": "float_time"}'/> + <div class="card-footer border-top-0 text-600"> + <div class="d-flex justify-content-between align-items-center small"> + <span class="font-weight-bold" t-field="channel.total_time" t-options='{"widget": "float_time"}'/> <t t-if="channel.is_member and channel.completed"> - <div class="col-5"> - <span class="badge badge-pill badge-success pull-right"><i class="fa fa-check"/> Completed</span> - </div> - </t> - <t t-elif="channel.is_member"> - <div class="col"> - <div class="progress"> - <div class="progress-bar" role="progressbar" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100" t-attf-style="width:#{channel.completion}%;"> - </div> - </div> - </div> - </t> - <t t-else=""> - <div class="col-5"> - <small class="text-muted pull-right"><span t-esc="channel.total_slides"/> steps</small> - </div> + <span class="badge badge-pill badge-success pull-right"><i class="fa fa-check"/> Completed</span> </t> + <div t-elif="channel.is_member" class="progress w-50"> + <div class="progress-bar" role="progressbar" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100" t-attf-style="width:#{channel.completion}%;"/> + </div> + <t t-else=""><span class="font-weight-bold" t-esc="channel.total_slides"/> steps</t> </div> </div> </div> @@ -272,13 +257,11 @@ <template id='slides_home_achievements_small' name="Latest Achievements"> <div class="o_wslides_home_aside"> - <div class="row mt16 o_wslides_home_aside_title"> + <div class="row o_wslides_home_aside_title"> <div class="col"> - <a href="slides" class="text-muted float-right"> - <small class="float-right">View all</small> - </a> - <h3>Latest achievements</h3> - <hr/> + <a href="/slides" class="float-right">View all</a> + <h5 class="m-0">Latest achievements</h5> + <hr class="mt-2"/> </div> </div> <div class="row"> @@ -309,13 +292,11 @@ <template id='slides_home_users_small' name="Latest Users"> <div class="o_wslides_home_aside"> - <div class="row mt16 o_wslides_home_aside_title"> + <div class="row o_wslides_home_aside_title"> <div class="col"> - <a href="slides" class="text-muted float-right"> - <small class="float-right">View all</small> - </a> - <h3>Heroes of the week</h3> - <hr/> + <a href="/profile/users" class="float-right">View all</a> + <h5 class="m-0">Heroes of the week</h5> + <hr class="mt-2"/> </div> </div> <div class="row"> @@ -352,41 +333,47 @@ <template id='slides_home_user_profile_small' name="User Profile"> <div class="o_wslides_home_aside"> - <div class="row mt16 o_wslides_home_aside_title align-items-center"> - <div class="col-12"> - <t t-call="website_slides.slides_misc_user_image"/> - <a t-att-href="'/profile/user/%s' % user.id" class="float-right">Edit</a> - <h4 t-esc="user.name" class="font-weight-bold"/> - <hr/> + <div class="o_wslides_home_aside_title"> + <div class="d-flex align-items-center"> + <t t-call="website_slides.slides_misc_user_image"> + <t t-set="img_class" t-value="'rounded-circle mr-1'"/> + <t t-set="img_style" t-value="'height: 22px'"/> + </t> + <h5 t-esc="user.name" class="d-flex flex-grow-1 mb-0"/> + <a t-att-href="'/profile/user/%s' % user.id">Edit</a> </div> - <div class="col-12 mt8"> - <span class="font-weight-bold text-muted">Current rank:</span> - <a href="/profile/ranks" class="float-right" t-field="user.rank_id"/> - <t t-call="website_profile.profile_next_rank_card"/> - <div t-field="user.next_rank_id.description_motivational"/> + </div> + <hr class="mt-2"/> + <div class="mt8"> + <div class="d-flex align-items-center"> + <span class="font-weight-bold text-muted mr-2">Current rank:</span> + <img t-attf-src="/web/image/gamification.karma.rank/#{user.rank_id.id}/image_small" height="16" alt="" class="mr-1"/> + <a href="/profile/ranks" t-field="user.rank_id"/> </div> + <div class="font-weight-bold text-muted mt-1">Next rank:</div> + <t t-call="website_profile.profile_next_rank_card"> + <t t-set="bg_class">bg-200</t> + <t t-set="img_max_width">50%</t> + </t> + <div t-field="user.next_rank_id.description_motivational"/> </div> </div> </template> <template id='slides_home_user_achievements_small' name="User Achievements"> - <div class="o_wslides_home_aside mt16"> + <div class="o_wslides_home_aside mb-2"> <t t-foreach="challenges" t-as="challenge"> <t t-set="challenge_done" t-value="challenge in challenges_done if challenges_done else False"/> - <div class="row no-gutters mt8 align-items-center"> - <div class="col-3"> - <img t-att-class="'rounded-circle float-left %s' % 'o_wslides_img_muted' if not challenge_done else ''" - style="max-height: 36px;" - t-att-src="'/web/image/gamification.badge/%s/image_medium' % challenge.reward_id.id" - t-att-alt="challenge.reward_id.name"/> - </div> - <div class="col-7"> - <span t-att-class="'font-weight-bold text_small_caps %s' % 'text-muted' if not challenge_done else ''" t-esc="challenge.reward_id.name"/><br/> + <div t-attf-class="d-flex mt-3 align-items-center #{'o_wslides_entry_muted' if not challenge_done else ''}"> + <img class="mr-2" + style="max-height: 36px;" + t-att-src="'/web/image/gamification.badge/%s/image_medium' % challenge.reward_id.id" + t-att-alt="challenge.reward_id.name"/> + <div class="flex-grow-1"> + <b class="text_small_caps" t-esc="challenge.reward_id.name"/><br/> <span class="text-muted" t-esc="challenge.reward_id.description"/> </div> - <div class="col-2" t-if="challenge_done"> - <i class="fa fa-check float-right" aria-label="Done" title="Done" role="img"></i> - </div> + <i t-if="challenge_done" class="fa fa-check" aria-label="Done" title="Done" role="img"></i> </div> </t> </div> @@ -399,13 +386,4 @@ t-att-alt="user.name"/> </template> -<template id='slides_misc_float_time' name="Float Time"> - <t t-set="hours" t-value="int(value)"/> - <t t-set="minuts" t-value="int(60.0 * (value - int(value)))"/> - <span t-esc="hours"/> hr - <t t-if="minuts"> - <span t-esc="minuts"/> mins - </t> -</template> - </data></odoo> |
