diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-02 19:57:25 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-02 19:57:25 +0200 |
| commit | 149d782a0eb02fe036620fcd05d074886f1da4fe (patch) | |
| tree | bba9137d3480042c5fd671db416d24b74de11fb4 /addons | |
| parent | ed90ad0a01b25c25953b5d111e636317c00ca83c (diff) | |
| parent | 79ff916b5963b21bd96fac1a6e00ee206fa75fa8 (diff) | |
[MERGE] forward port branch saas-11.3 up to 79ff916b596
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail/static/src/scss/thread.scss | 1 | ||||
| -rw-r--r-- | addons/website_blog/controllers/main.py | 3 | ||||
| -rw-r--r-- | addons/website_blog/views/website_blog_templates.xml | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/addons/mail/static/src/scss/thread.scss b/addons/mail/static/src/scss/thread.scss index 81f6862ca9f..8a0b0b08858 100644 --- a/addons/mail/static/src/scss/thread.scss +++ b/addons/mail/static/src/scss/thread.scss @@ -171,6 +171,7 @@ } img { max-width: 100%; + height: auto; } .o_mail_body_long { diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 51a2deb3158..6f02268afc0 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -109,6 +109,9 @@ class WebsiteBlog(http.Controller): # retrocompatibility to accept tag as slug active_tag_ids = tag and [int(unslug(t)[1]) for t in tag.split(',')] or [] if active_tag_ids: + fixed_tag_slug = ",".join(slug(t) for t in request.env['blog.tag'].browse(active_tag_ids)) + if fixed_tag_slug != tag: + return request.redirect(request.httprequest.full_path.replace("/tag/%s/" % tag, "/tag/%s/" % fixed_tag_slug, 1), 301) domain += [('tag_ids', 'in', active_tag_ids)] if blog: domain += [('blog_id', '=', blog.id)] diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml index 6623de92ebc..0d012ce49b4 100644 --- a/addons/website_blog/views/website_blog_templates.xml +++ b/addons/website_blog/views/website_blog_templates.xml @@ -164,7 +164,7 @@ <!-- To display tags //no options --> <t t-foreach="blog_post.tag_ids" t-as="one_tag"> - <a class="mr8" t-attf-href="#{blog_url(tag=one_tag.id, date_begin=False, date_end=False)}" t-esc="one_tag.name"/> + <a class="mr8" t-attf-href="#{blog_url(tag=slug(one_tag), date_begin=False, date_end=False)}" t-esc="one_tag.name"/> </t> <div class="o_sharing_links"> <a class="fa fa-twitter-square o_twitter" aria-label="Twitter" title="Twitter"></a> @@ -249,7 +249,7 @@ <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)"> <span class="fa fa-tags" role="img" aria-label="Tags" title="Tags"/> <t t-foreach="blog_post.tag_ids" t-as="one_tag"> - <a class="badge badge-primary mr8" t-attf-href="#{blog_url(tag=one_tag.id)}" t-esc="one_tag.name"/> + <a class="badge badge-primary mr8" t-attf-href="#{blog_url(tag=slug(one_tag))}" t-esc="one_tag.name"/> </t> </p> <div t-if="'cover_full' in blog_post_cover_properties.get('resize_class', '')" id="blog_angle_down"> @@ -393,7 +393,7 @@ <t t-foreach="tags" t-as="tag"> <t t-if="tag.post_ids"> <li class="nav-item"> - <a t-attf-href="#{blog_url(tag=tags_list(active_tag_ids, tag.id))}" t-attf-class="nav-link#{tag.id in active_tag_ids and ' active' or ''}"> + <a t-att-rel="'nofollow' if active_tag_ids else None" t-attf-href="#{blog_url(tag=tags_list(active_tag_ids, tag.id))}" t-attf-class="nav-link#{tag.id in active_tag_ids and ' active' or ''}"> <span t-field="tag.name"/> </a> </li> @@ -443,10 +443,10 @@ <ul t-attf-class="blog_post_year collapse nav nav-pills flex-column #{not date and year_index == 0 and 'in'}" t-att-id="'b_' + year" role="menu"> <t t-foreach="nav_list[year]" t-as="months"> <li t-if="months['date_begin'] == date" class="nav-item"> - <a role="menuitem" t-ignore="True" t-attf-href="#{blog_url(date_begin=False, date_end=False)}" class="nav-link active"><t t-esc="months['month']"/><span class="float-right badge badge-pill" t-esc="months['post_date_count']"/></a> + <a role="menuitem" rel="nofollow" t-ignore="True" t-attf-href="#{blog_url(date_begin=False, date_end=False)}" class="nav-link active"><t t-esc="months['month']"/><span class="float-right badge badge-pill" t-esc="months['post_date_count']"/></a> </li> <li t-else="1" class="nav-item"> - <a role="menuitem" t-ignore="True" t-attf-href="#{blog_url(date_begin=months['date_begin'], date_end=months['date_end'])}" class="nav-link"><t t-esc="months['month']"/><span class="float-right badge badge-pill" t-esc="months['post_date_count']"/></a> + <a role="menuitem" rel="nofollow" t-ignore="True" t-attf-href="#{blog_url(date_begin=months['date_begin'], date_end=months['date_end'])}" class="nav-link"><t t-esc="months['month']"/><span class="float-right badge badge-pill" t-esc="months['post_date_count']"/></a> </li> </t> </ul> |
