[IMP] *: improve accessibility of website pages

*: base_import, gamification, hr_skills, mass_mailing, portal,
portal_rating, survey, web, web_editor, website, website_sale,
website_slides

The goal of this commit is to improve the accessibility of the website
pages. This has been made by implementing and correcting ARIA
(Accessible Rich Internet Applications) roles and attributes. More
precisely:
- An `aria-label` attribute has been added on progressbar elements to
avoid a warning of type `ARIA progressbar elements do not have
accessible names`. It has also been added on iframes to avoid a warning
of type `<frame> or <iframe> elements do not have a title`. Furthermore,
`aria-label` has been incorporated on some anchors to avoid a warning of
type `Links do not have a discernible name`. Finally, it has been added
on elements that have the `dialog` role to avoid a warning of type
`Elements with role="dialog" or role="alertdialog" do not have
accessible names` and on elements that have the `listbox` role to avoid
a warning of type `ARIA input fields do not have accessible names`.
- To avoid a warning of type `Some ARIA parent roles must contain
specific child roles to perform their intended accessibility functions`,
`role="menuitem"` has been added on children of menu elements. As
explained in [the menuitem role documentation], "The `menuitem` role
indicates the element is an option in a set of choices contained by a
`menu` or `menubar`". To avoid this warning, `role="presentation"` has
also been added on elements located between `tablist` and `tab` and
between `menu` and `menuitem`. Indeed, as explained in
[the presentation role documentation]; "The `presentation` role removes
an element's implicit ARIA semantics from being exposed to the
accessibility tree". The goal is to inform the assistive technologies
that the default semantics of the element should be ignored. Finally, to
avoid this same warning, the `option` role has been added on elements to
identify selections a user can make in a `listbox`.
- The `aria-label` of some elements has been adapted in order to avoid a
warning of type `Elements with visible text labels do not have matching
accessible names`.
- The value of `aria-disabled` has been corrected to `true` (instead of
`disabled`) (see [the aria-disabled documentation]).

Still to improve the accessibility of the website pages, an alternative
text (`alt`) attribute has been provided for images.

[the menuitem role documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitem_role
[the presentation role documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/presentation_role
[the aria-disabled documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled#values

closes odoo/odoo#140453

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Louis (loco)
2024-02-29 12:13:35 +00:00
committed by qsm-odoo
parent 8eb5d38b7e
commit fb2296adec
46 changed files with 291 additions and 87 deletions
+7
View File
@@ -568,6 +568,13 @@ msgstr ""
msgid "Preview"
msgstr ""
#. module: base_import
#. odoo-javascript
#: code:addons/base_import/static/src/import_data_progress/import_data_progress.xml:0
#, python-format
msgid "Progress bar"
msgstr ""
#. module: base_import
#. odoo-javascript
#: code:addons/base_import/static/src/import_data_sidepanel/import_data_sidepanel.xml:0
@@ -20,7 +20,7 @@
<div t-else="" class="d-flex align-items-center mt-2">
<div class="progress flex-grow-1 rounded-3">
<div class="progress-bar progress-bar-striped" role="progressbar"
aria-valuenow="props.importProgress" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="props.importProgress" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar"
t-att-style="'width: ' + props.importProgress.value + '%'">
<span class="fs-4"><t t-esc="props.importProgress.value" />%</span>
</div>
@@ -19,7 +19,7 @@
<field name="description_motivational" type="html">
<div class="d-flex align-items-center">
<div class="flex-grow-1">Earn your first points and join the adventure!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_newbie_badge.svg"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_newbie_badge.svg" alt=""/>
</div>
</field>
<field name="karma_min">1</field>
@@ -32,7 +32,7 @@
<field name="description_motivational" type="html">
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank to show the rest of the world you exist.</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg" alt=""/>
</div>
</field>
<field name="karma_min">100</field>
@@ -45,7 +45,7 @@
<field name="description_motivational" type="html">
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank to improve your status!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg" alt=""/>
</div>
</field>
<field name="karma_min">500</field>
@@ -58,7 +58,7 @@
<field name="description_motivational" type="html">
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and become a Master!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg" alt=""/>
</div>
</field>
<field name="karma_min">2000</field>
@@ -71,7 +71,7 @@
<field name="description_motivational" type="html">
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and become a powerful user!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg" alt=""/>
</div>
</field>
<field name="karma_min">10000</field>
@@ -7,7 +7,7 @@
<div hidden="true">Reach the next rank to show the rest of the world you exist.</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice mug!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png" alt=""/>
</div>
</field>
</record>
@@ -17,7 +17,7 @@
<div hidden="true">Reach the next rank to improve your status!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very magic wand!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png" alt=""/>
</div>
</field>
</record>
@@ -27,7 +27,7 @@
<div hidden="true">Reach the next rank and become a Master!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice hat!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png" alt=""/>
</div>
</field>
</record>
@@ -37,7 +37,7 @@
<div hidden="true">Reach the next rank and become a powerful user!</div>
<div class="d-flex align-items-center">
<div class="flex-grow-1">Reach the next rank and gain a very nice unicorn!</div>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png" alt=""/>
</div>
</field>
</record>
+5
View File
@@ -1017,6 +1017,11 @@ msgstr ""
msgid "Progress (%)"
msgstr ""
#. module: hr_skills
#: model_terms:ir.ui.view,arch_db:hr_skills.report_employee_cv_main_panel
msgid "Progress bar"
msgstr ""
#. module: hr_skills
#: model:ir.model.fields,help:hr_skills.field_hr_employee_skill__level_progress
#: model:ir.model.fields,help:hr_skills.field_hr_employee_skill_log__level_progress
@@ -136,6 +136,7 @@
t-attf-style="width: #{skill_line.level_progress}%; background: #{color_primary};"
t-att-aria-valuenow="skill_line.level_progress"
aria-valuemin="0"
aria-label="Progress bar"
aria-valuemax="100"/>
</div>
</div>
@@ -3716,6 +3716,11 @@ msgstr ""
msgid "Processing"
msgstr ""
#. module: mass_mailing
#: model_terms:ir.ui.view,arch_db:mass_mailing.view_mail_mass_mailing_kanban
msgid "Progress bar"
msgstr ""
#. module: mass_mailing
#: model_terms:ir.ui.view,arch_db:mass_mailing.email_designer_snippets
msgid "Promo Code"
@@ -525,6 +525,7 @@
aria-valuemin="0"
t-att-aria-valuenow="record.delivered.raw_value"
t-att-aria-valuemax="record.expected.raw_value"
aria-label="Progress bar"
t-attf-style="width: #{record.delivered.raw_value * 100 / record.expected.raw_value}%"/>
</div>
</div>
+2 -1
View File
@@ -89,7 +89,8 @@
<t t-foreach="languages" t-as="lg">
<a class="dropdown-item" t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang_code=lg[0])"
t-attf-class="dropdown-item js_change_lang #{active_lang == lg and 'active'}"
t-att-data-url_code="lg[1]" t-att-title="lg[2].split('/').pop()">
t-att-data-url_code="lg[1]" t-att-title="lg[2].split('/').pop()"
role="menuitem">
<span t-if="not no_text" t-esc="lg[2].split('/').pop()" t-attf-class="#{_txt_class}"/>
<span t-elif="codes" t-esc="lg[1].split('_').pop(0).upper()" t-attf-class="align-middle #{_txt_class}"/>
</a>
@@ -185,6 +185,13 @@ msgstr ""
msgid "Post comment"
msgstr ""
#. module: portal_rating
#. odoo-javascript
#: code:addons/portal_rating/static/src/xml/portal_tools.xml:0
#, python-format
msgid "Progress bar"
msgstr ""
#. module: portal_rating
#. odoo-javascript
#: code:addons/portal_rating/static/src/xml/portal_chatter.xml:0
@@ -47,7 +47,7 @@
</td>
<td class="o_website_rating_table_progress">
<div class="progress">
<div class="progress-bar o_rating_progressbar" role="progressbar" t-att-aria-valuenow="percent['percent']" aria-valuemin="0" aria-valuemax="100" t-att-style="'width:' + percent['percent'] + '%;'">
<div class="progress-bar o_rating_progressbar" role="progressbar" t-att-aria-valuenow="percent['percent']" aria-valuemin="0" aria-valuemax="100" t-att-style="'width:' + percent['percent'] + '%;'" aria-label="Progress bar">
</div>
</div>
</td>
+5
View File
@@ -3557,6 +3557,11 @@ msgstr ""
msgid "Products"
msgstr ""
#. module: survey
#: model_terms:ir.ui.view,arch_db:survey.user_input_session_manage_content
msgid "Progress bar"
msgstr ""
#. module: survey
#: model:ir.model.fields,field_description:survey.field_survey_question_answer__question_id
#: model:ir.model.fields,field_description:survey.field_survey_user_input_line__question_id
@@ -100,7 +100,7 @@
<div t-if="show_bar_chart or show_text_answers">
<div class="progress" title="Attendees are answering the question...">
<div class="progress-bar o_survey_session_progress_small fw-bold"
style="overflow: visible" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
style="overflow: visible" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar">
<span class="px-2">0 / <t t-esc="survey.session_answer_count" /></span>
</div>
</div>
@@ -143,7 +143,7 @@
</span>
</h2>
<div class="progress">
<div class="progress-bar fw-bold" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar fw-bold" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar"></div>
</div>
<fieldset disabled="disabled" class="mt-5" t-if="question.question_type == 'matrix'" t-call="survey.question_container">
<t t-set="hide_question_title" t-value="true" />
+7
View File
@@ -5684,6 +5684,13 @@ msgstr ""
msgid "Progress Bar"
msgstr ""
#. module: web
#. odoo-javascript
#: code:addons/web/static/src/views/view_components/column_progress.xml:0
#, python-format
msgid "Progress bar"
msgstr ""
#. module: web
#. odoo-javascript
#: code:addons/web/static/src/views/fields/properties/properties_field.js:0
@@ -15,6 +15,7 @@
aria-valuemin="0"
t-att-aria-valuemax="props.group.count"
t-att-aria-valuenow="bar.count"
aria-label="Progress bar"
t-attf-data-tooltip="{{ bar.count }} {{ bar.string }}"
data-tooltip-delay="0"
t-on-click="() => this.onBarClick(bar)"
+7
View File
@@ -2353,6 +2353,13 @@ msgstr ""
msgid "Primary"
msgstr ""
#. module: web_editor
#. odoo-javascript
#: code:addons/web_editor/static/src/components/upload_progress_toast/upload_progress_toast.xml:0
#, python-format
msgid "Progress bar"
msgstr ""
#. module: web_editor
#: model:ir.model.fields.selection,name:web_editor.selection__web_editor_converter_test__selection_str__c
msgid "Qu'est-ce qu'il fout ce maudit pancake, tabernacle ?"
@@ -11,7 +11,7 @@
<span t-else="" class="text-danger"><i class="fa fa-times float-start my-1 me-1"/> <span class="o_we_error_text" t-esc="props.errorMessage ? props.errorMessage : 'File could not be saved'"/></span>
</small>
<div t-else="" class="progress">
<div class="progress-bar bg-info progress-bar-striped progress-bar-animated" role="progressbar" t-attf-style="width: {{this.progress}}%;"><span t-esc="this.progress + '%'"/></div>
<div class="progress-bar bg-info progress-bar-striped progress-bar-animated" role="progressbar" t-attf-style="width: {{this.progress}}%;" aria-label="Progress bar"><span t-esc="this.progress + '%'"/></div>
</div>
<hr/>
</t>
+54
View File
@@ -1681,6 +1681,13 @@ msgstr ""
msgid "Add new %s"
msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/components/dialog/add_page_dialog.xml:0
#, python-format
msgid "Add page template"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.external_snippets
msgid "Add to Cart Button"
@@ -2244,6 +2251,13 @@ msgstr ""
msgid "Background Shape"
msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/xml/website.background.video.xml:0
#, python-format
msgid "Background video"
msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js:0
@@ -2720,7 +2734,10 @@ msgid "Careful"
msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/snippets/s_dynamic_snippet_carousel/000.xml:0
#: model_terms:ir.ui.view,arch_db:website.snippets
#, python-format
msgid "Carousel"
msgstr ""
@@ -4458,6 +4475,7 @@ msgstr ""
#. module: website
#: model:ir.model.fields,field_description:website.field_website_visitor__email
#: model_terms:ir.ui.view,arch_db:website.s_share
#: model_terms:ir.ui.view,arch_db:website.s_website_form_options
#: model_terms:ir.ui.view,arch_db:website.website_visitor_view_kanban
#: model_terms:ir.ui.view,arch_db:website.website_visitor_view_tree
@@ -4753,10 +4771,12 @@ msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/snippets/s_facebook_page/000.js:0
#: code:addons/website/static/src/snippets/s_social_media/options.js:0
#: model_terms:ir.ui.view,arch_db:website.footer_custom
#: model_terms:ir.ui.view,arch_db:website.header_social_links
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_odoo_menu
#: model_terms:ir.ui.view,arch_db:website.s_share
#: model_terms:ir.ui.view,arch_db:website.s_social_media
#: model_terms:ir.ui.view,arch_db:website.snippets
#: model_terms:ir.ui.view,arch_db:website.template_footer_centered
@@ -6243,6 +6263,7 @@ msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/snippets/s_instagram_page/000.js:0
#: code:addons/website/static/src/snippets/s_social_media/options.js:0
#: model_terms:ir.ui.view,arch_db:website.header_social_links
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_odoo_menu
@@ -6939,6 +6960,7 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:website.footer_custom
#: model_terms:ir.ui.view,arch_db:website.header_social_links
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_odoo_menu
#: model_terms:ir.ui.view,arch_db:website.s_share
#: model_terms:ir.ui.view,arch_db:website.s_social_media
#: model_terms:ir.ui.view,arch_db:website.template_footer_centered
#, python-format
@@ -7027,6 +7049,7 @@ msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/client_actions/configurator/configurator.xml:0
#: code:addons/website/static/src/js/editor/snippets.editor.js:0
#: model_terms:ir.ui.view,arch_db:website.snippet_options
#, python-format
@@ -7118,6 +7141,7 @@ msgid "Management"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_map
#: model_terms:ir.ui.view,arch_db:website.snippets
msgid "Map"
msgstr ""
@@ -7214,6 +7238,13 @@ msgstr ""
msgid "Media heading"
msgstr ""
#. module: website
#. odoo-javascript
#: code:addons/website/static/src/js/content/snippets.animation.js:0
#, python-format
msgid "Media video"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_three_columns_menu
msgid "Mediterranean buffet of starters, main dishes and desserts"
@@ -7252,6 +7283,11 @@ msgstr ""
msgid "Mega Menu Content"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_menu_image_menu
msgid "Mega menu default image"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_menus_logos
msgid "Men"
@@ -8651,6 +8687,11 @@ msgstr ""
msgid "Pills"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_share
msgid "Pinterest"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_website_form_options
msgid "Placeholder"
@@ -8725,6 +8766,7 @@ msgid "Points of sale"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_popup
#: model_terms:ir.ui.view,arch_db:website.snippet_options
#: model_terms:ir.ui.view,arch_db:website.snippets
msgid "Popup"
@@ -8932,6 +8974,11 @@ msgstr ""
msgid "Progress Tracking"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_progress_bar
msgid "Progress bar"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_odoo_menu
msgid "Projectors"
@@ -11428,6 +11475,7 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:website.footer_custom
#: model_terms:ir.ui.view,arch_db:website.header_social_links
#: model_terms:ir.ui.view,arch_db:website.s_mega_menu_odoo_menu
#: model_terms:ir.ui.view,arch_db:website.s_share
#: model_terms:ir.ui.view,arch_db:website.s_social_media
#: model_terms:ir.ui.view,arch_db:website.template_footer_centered
#: model_terms:ir.ui.view,arch_db:website.template_footer_headline
@@ -11832,6 +11880,7 @@ msgid "Vertical Alignment"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_video
#: model_terms:ir.ui.view,arch_db:website.snippet_options_background_options
#: model_terms:ir.ui.view,arch_db:website.snippets
msgid "Video"
@@ -12510,6 +12559,11 @@ msgstr ""
msgid "What you see is what you get"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_share
msgid "WhatsApp"
msgstr ""
#. module: website
#: model_terms:ir.ui.view,arch_db:website.s_hr_options
#: model_terms:ir.ui.view,arch_db:website.snippet_options
@@ -42,7 +42,7 @@
</div>
<div t-attf-class="dropdown-menu border-0 shadow-lg {{state.selectedType ? 'o_step_completed' : 'o_step_todo show'}}" role="menu">
<t t-foreach="state.getWebsiteTypes()" t-as="type" t-key="type.name">
<a t-att-title="type.name" t-on-click="() => this.selectWebsiteType(type.id)" class="dropdown-item o_change_website_type">
<a t-att-title="type.name" t-on-click="() => this.selectWebsiteType(type.id)" class="dropdown-item o_change_website_type" role="menuitem">
<t t-esc="type.label"/>
</a>
</t>
@@ -104,7 +104,7 @@
</div>
</div>
<div t-if="state.logo" class="o_configurator_logo_wrapper position-absolute d-flex justify-content-center align-items-center bg-white w-100 h-100">
<img style="height: 120px" t-attf-src="{{state.logo}}"/>
<img style="height: 120px" t-attf-src="{{state.logo}}" alt="Logo"/>
</div>
<i t-if="state.logo" class="fa fa-2x fa-times-circle text-danger position-absolute top-0 end-0 pe-2 pt-2" t-on-click="removeLogo"/>
</div>
@@ -36,7 +36,7 @@
<t t-name="website.AddPageTemplatePreview">
<t t-call="website.AddPageTemplatePreviewWrapper">
<iframe class="border-0 pe-none transition-base" t-ref="iframe" src="about:blank"/>
<iframe class="border-0 pe-none transition-base" t-ref="iframe" src="about:blank" aria-label="Add page template"/>
</t>
</t>
@@ -217,11 +217,12 @@ async function autoHideMenu(el, options) {
dropdownMenu.className = 'dropdown-menu';
extraItemsToggle.className = 'nav-item dropdown o_extra_menu_items';
extraItemsToggle.setAttribute("role", "presentation");
extraItemsToggleIcon.className = 'fa fa-plus';
const extraItemsToggleAriaLabel = el.closest("[data-extra-items-toggle-aria-label]")
?.dataset.extraItemsToggleAriaLabel;
Object.entries({
role: 'button',
role: 'menuitem',
href: '#',
class: 'nav-link dropdown-toggle o-no-caret',
'data-bs-toggle': 'dropdown',
@@ -4,6 +4,7 @@
* Provides a way to start JS code for snippets' initialization and animations.
*/
import { _t } from "@web/core/l10n/translation";
import { loadJS } from "@web/core/assets";
import { uniqueId } from "@web/core/utils/functions";
import { escape } from "@web/core/utils/strings";
@@ -792,6 +793,7 @@ registry.mediaVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin, {
src: src,
frameborder: '0',
allowfullscreen: 'allowfullscreen',
"aria-label": _t("Media video"),
})[0];
this.$el.append(iframeEl);
return iframeEl;
@@ -19,10 +19,10 @@
<t t-set="slideIndexGenerator" t-value="Array.from(Array(Math.ceil(data.length/slideSize)).keys())"/>
<t t-set="rowIndexGenerator" t-value="Array.from(Array(rowPerSlide).keys())"/>
<t t-set="colIndexGenerator" t-value="Array.from(Array(rowSize).keys())"/>
<div class="carousel-inner row w-100 mx-auto" role="listbox">
<div class="carousel-inner row w-100 mx-auto" role="listbox" aria-label="Carousel">
<t t-foreach="slideIndexGenerator" t-as="slideIndex" t-key="slideIndex_index">
<t t-set="slideOffset" t-value="slideIndex * slideSize"/>
<div t-attf-class="carousel-item #{extraClasses} #{slideIndex_first ? 'active' : ''}">
<div t-attf-class="carousel-item #{extraClasses} #{slideIndex_first ? 'active' : ''}" role="option">
<t t-foreach="rowIndexGenerator" t-as="rowIndex" t-key="rowIndex_index">
<t t-set="rowOffset" t-value="slideOffset + (rowIndex * rowSize)"/>
<t t-if="rowOffset &lt; data.length">
@@ -1,5 +1,6 @@
/** @odoo-module **/
import { _t } from "@web/core/l10n/translation";
import { pick } from "@web/core/utils/objects";
import { clamp } from "@web/core/utils/numbers";
import publicWidget from "@web/legacy/js/public/public_widget";
@@ -40,6 +41,7 @@ const FacebookPageWidget = publicWidget.Widget.extend({
scrolling: 'no',
frameborder: '0',
allowTransparency: 'true',
"aria-label": _t("Facebook"),
});
this.$el.append(this.$iframe);
@@ -1,5 +1,6 @@
/** @odoo-module **/
import { _t } from "@web/core/l10n/translation";
import publicWidget from "@web/legacy/js/public/public_widget";
// Note that Instagram can automatically detect the language of the user and
@@ -16,6 +17,7 @@ const InstagramPage = publicWidget.Widget.extend({
const iframeEl = document.createElement("iframe");
this.el.querySelector(".o_instagram_container").appendChild(iframeEl);
iframeEl.setAttribute("scrolling", "no");
iframeEl.setAttribute("aria-label", _t("Instagram"));
iframeEl.classList.add("w-100");
// We can already estimate the height of the iframe.
iframeEl.height = this._estimateIframeHeight();
@@ -10,7 +10,8 @@
<iframe t-att-id="iframeID"
class="o_bg_video_iframe fade"
frameBorder="0"
t-att-src="videoSrc"/>
t-att-src="videoSrc"
aria-label="Background video"/>
</div>
</t>
</templates>
@@ -6,7 +6,7 @@
<t t-set="uniq" t-value="datetime.datetime.now().microsecond"/>
<div class="container">
<div id="myCollapse" class="accordion" role="tablist">
<div class="card bg-white" data-name="Item">
<div class="card bg-white" data-name="Item" role="presentation">
<a href="#" t-attf-data-bs-target="#myCollapseTab{{uniq}}_1" role="tab" t-attf-aria-controls="myCollapseTab{{uniq}}_1" data-bs-toggle="collapse" aria-expanded="true" class="card-header">Terms of service</a>
<div t-attf-id="myCollapseTab{{uniq}}_1" class="collapse show" data-bs-parent="#myCollapse" role="tabpanel">
<div class="card-body">
@@ -14,7 +14,7 @@
</div>
</div>
</div>
<div class="card bg-white" data-name="Item">
<div class="card bg-white" data-name="Item" role="presentation">
<a href="#" t-attf-data-bs-target="#myCollapseTab{{uniq}}_2" role="tab" t-attf-aria-controls="myCollapseTab{{uniq}}_2" data-bs-toggle="collapse" aria-expanded="false" class="collapsed card-header">Links to other Websites</a>
<div t-attf-id="myCollapseTab{{uniq}}_2" class="collapse" data-bs-parent="#myCollapse" role="tabpanel">
<div class="card-body">
@@ -23,7 +23,7 @@
</div>
</div>
</div>
<div class="card bg-white" data-name="Item">
<div class="card bg-white" data-name="Item" role="presentation">
<a href="#" t-attf-data-bs-target="#myCollapseTab{{uniq}}_3" role="tab" t-attf-aria-controls="myCollapseTab{{uniq}}_3" data-bs-toggle="collapse" aria-expanded="false" class="collapsed card-header">Use of Cookies</a>
<div t-attf-id="myCollapseTab{{uniq}}_3" class="collapse" data-bs-parent="#myCollapse" role="tabpanel">
<div class="card-body">
@@ -7,13 +7,13 @@
<div id="slideshow_sample" class="carousel slide" data-bs-ride="carousel" data-bs-interval="0" style="margin: 0 12px;">
<div class="carousel-inner" style="padding: 0;">
<div class="carousel-item active">
<img class="img img-fluid d-block" src="/web/image/website.library_image_08" data-name="Image" data-index="0"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_08" data-name="Image" data-index="0" alt=" "/>
</div>
<div class="carousel-item">
<img class="img img-fluid d-block" src="/web/image/website.library_image_03" data-name="Image" data-index="1"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_03" data-name="Image" data-index="1" alt=" "/>
</div>
<div class="carousel-item">
<img class="img img-fluid d-block" src="/web/image/website.library_image_02" data-name="Image" data-index="2"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_02" data-name="Image" data-index="2" alt=" "/>
</div>
</div>
<ul class="carousel-indicators">
@@ -45,16 +45,16 @@
<div class="container">
<div class="row s_nb_column_fixed">
<div class="o_masonry_col o_snippet_not_selectable col-lg-4">
<img class="img img-fluid d-block" src="/web/image/website.library_image_03" data-index="0" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_10" data-index="3" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_03" data-index="0" data-name="Image" alt=" "/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_10" data-index="3" data-name="Image" alt=" "/>
</div>
<div class="o_masonry_col o_snippet_not_selectable col-lg-4">
<img class="img img-fluid d-block" src="/web/image/website.library_image_13" data-index="1" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_05" data-index="4" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_13" data-index="1" data-name="Image" alt=" "/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_05" data-index="4" data-name="Image" alt=" "/>
</div>
<div class="o_masonry_col o_snippet_not_selectable col-lg-4">
<img class="img img-fluid d-block" src="/web/image/website.library_image_14" data-index="2" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_16" data-index="5" data-name="Image"/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_14" data-index="2" data-name="Image" alt=" "/>
<img class="img img-fluid d-block" src="/web/image/website.library_image_16" data-index="5" data-name="Image" alt=" "/>
</div>
</div>
</div>
+1 -1
View File
@@ -9,7 +9,7 @@
An address must be specified for a map to be embedded
</div>
</div>
<iframe t-if="not test_mode_enabled" class="s_map_embedded o_not_editable" src="https://maps.google.com/maps?q=250%20Executive%20Park%20Blvd%2C%20Suite%203400%20San%20Francisco%20California%20(US)%20United%20States&amp;t=m&amp;z=12&amp;ie=UTF8&amp;iwloc=&amp;output=embed" width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"/>
<iframe t-if="not test_mode_enabled" class="s_map_embedded o_not_editable" src="https://maps.google.com/maps?q=250%20Executive%20Park%20Blvd%2C%20Suite%203400%20San%20Francisco%20California%20(US)%20United%20States&amp;t=m&amp;z=12&amp;ie=UTF8&amp;iwloc=&amp;output=embed" width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" aria-label="Map"/>
<div class="s_map_color_filter"/>
</div>
</section>
@@ -17,7 +17,7 @@
</nav>
</div>
<div class="col-12 col-sm py-2 text-center">
<img class="img-fluid" src="/web/image/website.s_mega_menu_menu_image_menu_default_image"/>
<img class="img-fluid" src="/web/image/website.s_mega_menu_menu_image_menu_default_image" alt="Mega menu default image"/>
</div>
<div class="col-12 col-sm py-2 text-center">
<h4 class="o_default_snippet_text">Right Menu</h4>
+1 -1
View File
@@ -7,7 +7,7 @@
their XML definition here as that would hurt the drag and drop feature.
-->
<div class="s_popup o_snippet_invisible" data-vcss="001">
<div class="modal fade s_popup_middle" style="background-color: var(--black-50) !important;" data-show-after="5000" data-display="afterDelay" data-consents-duration="7" data-bs-focus="false" data-bs-backdrop="false" tabindex="-1" role="dialog">
<div class="modal fade s_popup_middle" style="background-color: var(--black-50) !important;" data-show-after="5000" data-display="afterDelay" data-consents-duration="7" data-bs-focus="false" data-bs-backdrop="false" tabindex="-1" role="dialog" aria-label="Popup">
<div class="modal-dialog d-flex">
<div class="modal-content oe_structure">
<div class="s_popup_close js_close_popup o_we_no_overlay o_not_editable" aria-label="Close">&#215;</div>
@@ -5,7 +5,7 @@
<div class="s_progress_bar" data-display="inline">
<h4 class="mb-0">We are almost done!</h4>
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%; min-width: 3%">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%; min-width: 3%" aria-label="Progress bar">
<span class="s_progress_bar_text">80% Development</span>
</div>
</div>
+6 -6
View File
@@ -4,22 +4,22 @@
<template id="s_share" name="Share">
<div t-attf-class="s_share text-start o_no_link_popover #{_classes}">
<h4 t-if="not _no_title" class="s_share_title d-none">Share</h4>
<a t-if="not _exclude_share_links or not 'facebook' in _exclude_share_links" href="https://www.facebook.com/sharer/sharer.php?u={url}" t-attf-class="s_share_facebook #{_link_classes}" target="_blank">
<a t-if="not _exclude_share_links or not 'facebook' in _exclude_share_links" href="https://www.facebook.com/sharer/sharer.php?u={url}" t-attf-class="s_share_facebook #{_link_classes}" target="_blank" aria-label="Facebook">
<i t-attf-class="fa fa-facebook #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
<a t-if="not _exclude_share_links or not 'twitter' in _exclude_share_links" href="https://twitter.com/intent/tweet?text={title}&amp;url={url}" t-attf-class="s_share_twitter #{_link_classes}" target="_blank">
<a t-if="not _exclude_share_links or not 'twitter' in _exclude_share_links" href="https://twitter.com/intent/tweet?text={title}&amp;url={url}" t-attf-class="s_share_twitter #{_link_classes}" target="_blank" aria-label="Twitter">
<i t-attf-class="fa fa-twitter #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
<a t-if="not _exclude_share_links or not 'linkedin' in _exclude_share_links" href="https://www.linkedin.com/sharing/share-offsite/?url={url}" t-attf-class="s_share_linkedin #{_link_classes}" target="_blank">
<a t-if="not _exclude_share_links or not 'linkedin' in _exclude_share_links" href="https://www.linkedin.com/sharing/share-offsite/?url={url}" t-attf-class="s_share_linkedin #{_link_classes}" target="_blank" aria-label="LinkedIn">
<i t-attf-class="fa fa-linkedin #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
<a t-if="not _exclude_share_links or not 'whatsapp' in _exclude_share_links" href="https://wa.me/?text={title}" t-attf-class="s_share_whatsapp #{_link_classes}" target="_blank">
<a t-if="not _exclude_share_links or not 'whatsapp' in _exclude_share_links" href="https://wa.me/?text={title}" t-attf-class="s_share_whatsapp #{_link_classes}" target="_blank" aria-label="WhatsApp">
<i t-attf-class="fa fa-whatsapp #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
<a t-if="not _exclude_share_links or not 'pinterest' in _exclude_share_links" href="https://pinterest.com/pin/create/button/?url={url}&amp;media={media}&amp;description={title}" t-attf-class="s_share_pinterest #{_link_classes}" target="_blank">
<a t-if="not _exclude_share_links or not 'pinterest' in _exclude_share_links" href="https://pinterest.com/pin/create/button/?url={url}&amp;media={media}&amp;description={title}" t-attf-class="s_share_pinterest #{_link_classes}" target="_blank" aria-label="Pinterest">
<i t-attf-class="fa fa-pinterest #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
<a t-if="not _exclude_share_links or not 'email' in _exclude_share_links" href="mailto:?body={url}&amp;subject={title}" t-attf-class="s_share_email #{_link_classes}">
<a t-if="not _exclude_share_links or not 'email' in _exclude_share_links" href="mailto:?body={url}&amp;subject={title}" t-attf-class="s_share_email #{_link_classes}" aria-label="Email">
<i t-attf-class="fa fa-envelope #{not _link_classes and 'rounded shadow-sm'}"/>
</a>
</div>
+3 -3
View File
@@ -7,13 +7,13 @@
<div class="s_tabs_main">
<div class="s_tabs_nav mb-3">
<ul class="nav nav-pills" role="tablist">
<li class="nav-item">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="nav_tabs_link_1" data-bs-toggle="tab" href="#nav_tabs_content_1" role="tab" aria-controls="nav_tabs_content_1" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<li class="nav-item" role="presentation">
<a class="nav-link" id="nav_tabs_link_2" data-bs-toggle="tab" href="#nav_tabs_content_2" role="tab" aria-controls="nav_tabs_content_2" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<li class="nav-item" role="presentation">
<a class="nav-link" id="nav_tabs_link_3" data-bs-toggle="tab" href="#nav_tabs_content_3" role="tab" aria-controls="nav_tabs_content_3" aria-selected="false">Contact</a>
</li>
</ul>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="css_editable_mode_display"></div>
<div class="media_iframe_video_size"></div>
<iframe src="//www.youtube.com/embed/G8b4UZIcTfg?rel=0&amp;autoplay=0"
frameborder="0" allowfullscreen="allowfullscreen"></iframe>
frameborder="0" allowfullscreen="allowfullscreen" aria-label="Video"></iframe>
</div>
</template>
+12 -5
View File
@@ -12,9 +12,10 @@
<span t-field="submenu.name"/>
</a>
</li>
<li t-elif="show_dropdown" t-attf-class="#{item_class or ''} dropdown #{submenu.is_mega_menu and 'position-static'}">
<li t-elif="show_dropdown" t-attf-class="#{item_class or ''} dropdown #{submenu.is_mega_menu and 'position-static'}" role="presentation">
<a t-attf-class="#{link_class or ''} dropdown-toggle #{submenu.is_mega_menu and 'o_mega_menu_toggle'} #{submenu._is_active() and 'active'} #{dropdown_toggler_classes}"
data-bs-toggle="dropdown" href="#" t-att-data-bs-display="'static' if submenu.is_mega_menu else None">
data-bs-toggle="dropdown" href="#" t-att-data-bs-display="'static' if submenu.is_mega_menu else None"
role="menuitem">
<span t-field="submenu.name"/>
</a>
<div t-if="submenu.is_mega_menu and not is_mobile"
@@ -32,7 +33,8 @@
<div t-if="submenu.is_mega_menu" t-elif="False"
t-attf-class="dropdown-menu o_mega_menu #{submenu.mega_menu_classes}"
data-name="Mega Menu"
t-field="submenu.mega_menu_content"/>
t-field="submenu.mega_menu_content"
role="menuitem"/>
<ul t-else="" t-attf-class="dropdown-menu #{dropdown_menu_classes}" role="menu">
<t t-foreach="submenu.child_id" t-as="submenu">
<t t-call="website.submenu">
@@ -235,7 +237,7 @@
t-attf-href="/web#menu_id=#{menu['id']}&amp;action=#{menu['action'] and menu['action'].split(',')[1] or ''}"/>
</div>
<a groups="website.group_website_restricted_editor" href="#" title="Edit this content" class="o_frontend_to_backend_edit_btn px-3 d-flex align-items-center justify-content-center text-decoration-none">
<img src="/website/static/description/icon.png"/>Editor
<img src="/website/static/description/icon.png" alt=""/>Editor
</a>
</div>
</div>
@@ -2086,8 +2088,13 @@
</template>
<!-- Language selector templates -->
<!-- TODO adapt in master so this template receives lang as parameter -->
<template id="lang_flag" name="Language Flag">
<img t-attf-class="o_lang_flag #{_flag_class}" t-attf-src="#{flag_image_src}?height=25"/>
<t t-set="lang" t-value="lg or active_lang"/>
<t t-set="lang_name" t-value="lang and lang[2].split('/').pop()"/>
<img t-attf-class="o_lang_flag #{_flag_class}"
t-attf-src="#{flag_image_src}?height=25"
t-att-alt="lang_name"/>
</template>
<template id="language_selector" inherit_id="portal.language_selector">
@@ -4449,6 +4449,11 @@ msgstr ""
msgid "eCommerce Shop"
msgstr ""
#. module: website_sale
#: model_terms:ir.ui.view,arch_db:website_sale.header_cart_link
msgid "eCommerce cart"
msgstr ""
#. module: website_sale
#: model:ir.actions.server,name:website_sale.ir_cron_send_availability_email_ir_actions_server
msgid "eCommerce: send email to customers about their abandoned cart"
+1 -1
View File
@@ -14,7 +14,7 @@
<t t-set="show_cart" t-value="true"/>
<li t-attf-class="#{_item_class} divider d-none"/> <!-- Make sure the cart and related menus are not folded (see autohideMenu) -->
<li t-attf-class="o_wsale_my_cart #{not show_cart and 'd-none'} #{_item_class}">
<a href="/shop/cart" t-attf-class="#{_link_class}">
<a href="/shop/cart" t-attf-class="#{_link_class}" aria-label="eCommerce cart">
<div t-attf-class="#{_icon_wrap_class}">
<i t-if="_icon" class="fa fa-shopping-cart fa-stack"/>
<sup t-attf-class="my_cart_quantity badge text-bg-primary #{_badge_class} #{'d-none' if (website_sale_cart_quantity == 0) else ''}" t-esc="website_sale_cart_quantity" t-att-data-order-id="request.session.get('sale_order_id', '')"/>
@@ -1079,6 +1079,7 @@ msgstr ""
#: code:addons/website_slides/static/src/js/slides_upload.js:0
#: code:addons/website_slides/static/src/js/slides_upload.js:0
#: model_terms:ir.actions.act_window,help:website_slides.slide_slide_action
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_list
#: model_terms:ir.ui.view,arch_db:website_slides.view_slide_channel_form
#, python-format
msgid "Add Content"
@@ -1135,6 +1136,11 @@ msgstr ""
msgid "Add contacts..."
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_list_slide
msgid "Add quiz"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_content_detailed
msgid "Add your content here..."
@@ -1448,6 +1454,11 @@ msgstr ""
msgid "Back"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_fullscreen
msgid "Back to course"
msgstr ""
#. module: website_slides
#: model:ir.model.fields,field_description:website_slides.field_slide_channel__website_default_background_image_url
msgid "Background image URL"
@@ -2395,6 +2406,7 @@ msgstr ""
#. module: website_slides
#. odoo-javascript
#: code:addons/website_slides/static/src/js/slides_category_delete.js:0
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_list_slide
#: model_terms:ir.ui.view,arch_db:website_slides.slide_channel_view_kanban
#, python-format
msgid "Delete"
@@ -2634,6 +2646,7 @@ msgid "Earn more Karma to leave a comment."
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_list_slide
#: model_terms:ir.ui.view,arch_db:website_slides.slide_channel_view_kanban
msgid "Edit"
msgstr ""
@@ -2702,6 +2715,13 @@ msgstr ""
msgid "Embed Views"
msgstr ""
#. module: website_slides
#. odoo-python
#: code:addons/website_slides/models/slide_slide.py:0
#, python-format
msgid "Embed code"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_social_embed
msgid "Embed in another Website"
@@ -2803,6 +2823,11 @@ msgstr ""
msgid "Exercises"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_fullscreen
msgid "Exit Fullscreen"
msgstr ""
#. module: website_slides
#: model:ir.model.fields,field_description:website_slides.field_slide_slide__embed_code_external
msgid "External Embed Code"
@@ -2979,6 +3004,11 @@ msgid ""
"From here you'll be able to monitor attendees and to track their progress."
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_content_detailed
msgid "Fullscreen"
msgstr ""
#. module: website_slides
#: model:slide.channel.tag,name:website_slides.slide_channel_tag_role_furniture
msgid "Furniture Designer"
@@ -3047,7 +3077,10 @@ msgid "Google Doc Key"
msgstr ""
#. module: website_slides
#. odoo-python
#: code:addons/website_slides/models/slide_slide.py:0
#: model:ir.model.fields.selection,name:website_slides.selection__slide_slide__video_source_type__google_drive
#, python-format
msgid "Google Drive"
msgstr ""
@@ -4077,6 +4110,7 @@ msgstr ""
#. module: website_slides
#. odoo-javascript
#: code:addons/website_slides/static/src/xml/slide_quiz.xml:0
#: model_terms:ir.ui.view,arch_db:website_slides.slide_content_detailed
#, python-format
msgid "Next"
msgstr ""
@@ -4537,11 +4571,17 @@ msgid "Presentation Published"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_list_slide
#: model_terms:ir.ui.view,arch_db:website_slides.lesson_card
#: model_terms:ir.ui.view,arch_db:website_slides.view_slide_channel_form
msgid "Preview"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_content_detailed
msgid "Previous"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.course_join
msgid "Private Course"
@@ -4552,6 +4592,17 @@ msgstr ""
msgid "Progress"
msgstr ""
#. module: website_slides
#. odoo-javascript
#: code:addons/website_slides/static/src/xml/slide_quiz.xml:0
#: model_terms:ir.ui.view,arch_db:website_slides.course_card
#: model_terms:ir.ui.view,arch_db:website_slides.course_join
#: model_terms:ir.ui.view,arch_db:website_slides.slide_fullscreen
#: model_terms:ir.ui.view,arch_db:website_slides.slide_main
#, python-format
msgid "Progress bar"
msgstr ""
#. module: website_slides
#: model:ir.model.fields,field_description:website_slides.field_slide_channel__promoted_slide_id
msgid "Promoted Slide"
@@ -4978,6 +5029,7 @@ msgid "Score"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.course_nav
#: model_terms:ir.ui.view,arch_db:website_slides.course_slides_cards
msgid "Search"
msgstr ""
@@ -5129,6 +5181,7 @@ msgid "Settings"
msgstr ""
#. module: website_slides
#: model_terms:ir.ui.view,arch_db:website_slides.slide_content_detailed
#: model_terms:ir.ui.view,arch_db:website_slides.slide_fullscreen
msgid "Share"
msgstr ""
@@ -5343,7 +5396,10 @@ msgid ""
msgstr ""
#. module: website_slides
#. odoo-javascript
#: code:addons/website_slides/static/src/xml/website_slides_fullscreen.xml:0
#: model:ir.model,name:website_slides.model_slide_slide
#, python-format
msgid "Slides"
msgstr ""
@@ -6160,7 +6216,10 @@ msgid "Views •"
msgstr ""
#. module: website_slides
#. odoo-python
#: code:addons/website_slides/models/slide_slide.py:0
#: model:ir.model.fields.selection,name:website_slides.selection__slide_slide__video_source_type__vimeo
#, python-format
msgid "Vimeo"
msgstr ""
@@ -6612,7 +6671,10 @@ msgid "You're enrolled"
msgstr ""
#. module: website_slides
#. odoo-python
#: code:addons/website_slides/models/slide_slide.py:0
#: model:ir.model.fields.selection,name:website_slides.selection__slide_slide__video_source_type__youtube
#, python-format
msgid "YouTube"
msgstr ""
+10 -9
View File
@@ -478,9 +478,9 @@ class Slide(models.Model):
if slide.video_source_type == 'youtube':
query_params = urls.url_parse(slide.video_url).query
query_params = query_params + '&theme=light' if query_params else 'theme=light'
embed_code = Markup('<iframe src="//www.youtube-nocookie.com/embed/%s?%s" allowFullScreen="true" frameborder="0"></iframe>') % (slide.youtube_id, query_params)
embed_code = Markup('<iframe src="//www.youtube-nocookie.com/embed/%s?%s" allowFullScreen="true" frameborder="0" aria-label="%s"></iframe>') % (slide.youtube_id, query_params, _('YouTube'))
elif slide.video_source_type == 'google_drive':
embed_code = Markup('<iframe src="//drive.google.com/file/d/%s/preview" allowFullScreen="true" frameborder="0"></iframe>') % (slide.google_drive_id)
embed_code = Markup('<iframe src="//drive.google.com/file/d/%s/preview" allowFullScreen="true" frameborder="0" aria-label="%s"></iframe>') % (slide.google_drive_id, _('Google Drive'))
elif slide.video_source_type == 'vimeo':
if '/' in slide.vimeo_id:
# in case of privacy 'with URL only', vimeo adds a token after the video ID
@@ -488,20 +488,21 @@ class Slide(models.Model):
[vimeo_id, vimeo_token] = slide.vimeo_id.split('/')
embed_code = Markup("""
<iframe src="https://player.vimeo.com/video/%s?h=%s&badge=0&amp;autopause=0&amp;player_id=0"
frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>""") % (
vimeo_id, vimeo_token)
frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen aria-label="%s"></iframe>""") % (
vimeo_id, vimeo_token, _('Vimeo'))
else:
embed_code = Markup("""
<iframe src="https://player.vimeo.com/video/%s?badge=0&amp;autopause=0&amp;player_id=0"
frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>""") % (slide.vimeo_id)
frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen aria-label="%s"></iframe>""") % (slide.vimeo_id, _('Vimeo'))
elif slide.slide_category in ['infographic', 'document'] and slide.source_type == 'external' and slide.google_drive_id:
embed_code = Markup('<iframe src="//drive.google.com/file/d/%s/preview" allowFullScreen="true" frameborder="0"></iframe>') % (slide.google_drive_id)
embed_code = Markup('<iframe src="//drive.google.com/file/d/%s/preview" allowFullScreen="true" frameborder="0" aria-label="%s"></iframe>') % (slide.google_drive_id, _('Google Drive'))
elif slide.slide_category == 'document' and slide.source_type == 'local_file':
slide_url = base_url + url_for('/slides/embed/%s?page=1' % slide.id)
slide_url_external = base_url + url_for('/slides/embed_external/%s?page=1' % slide.id)
base_embed_code = Markup('<iframe src="%s" class="o_wslides_iframe_viewer" allowFullScreen="true" height="%s" width="%s" frameborder="0"></iframe>')
embed_code = base_embed_code % (slide_url, 315, 420)
embed_code_external = base_embed_code % (slide_url_external, 315, 420)
base_embed_code = Markup('<iframe src="%s" class="o_wslides_iframe_viewer" allowFullScreen="true" height="%s" width="%s" frameborder="0" aria-label="%s"></iframe>')
iframe_aria_label = _('Embed code')
embed_code = base_embed_code % (slide_url, 315, 420, iframe_aria_label)
embed_code_external = base_embed_code % (slide_url_external, 315, 420, iframe_aria_label)
slide.embed_code = embed_code
slide.embed_code_external = embed_code_external or embed_code
@@ -97,10 +97,19 @@
</div>
<div t-else="" class="d-md-flex align-items-center justify-content-between">
<div t-att-class="'d-flex align-items-center' + (widget.slide.completed ? ' alert alert-success my-0 py-1 px-3' : '')">
<!-- TODO: In master, remove the aria-label of the button
element, as it already has a title, to avoid an
accessibility error of type `Elements with visible text
labels do not have matching accessible names`. -->
<button t-if="! widget.slide.completed" role="button" title="Check answers" aria-label="Check answers"
class="btn btn-primary text-uppercase fw-bold o_wslides_js_lesson_quiz_submit">Check your answers</button>
<b t-else="" class="my-0 h5">Done!</b>
<span class="my-0 h5" style="line-height: 1">
<!-- TODO: In master, remove the aria-label of the span
element, as it already has a title, to avoid an
accessibility error of type `Elements with visible
text labels do not have matching accessible names`.
-->
<span role="button" title="Succeed and gain karma" aria-label="Succeed and gain karma" class="badge rounded-pill bg-warning text-white fw-bold ms-3 px-2">
+ <t t-if="!widget.slide.completed" t-esc="widget.quiz.quizKarmaGain"/><t t-else="" t-esc="widget.quiz.quizKarmaWon"/> XP
</span>
@@ -150,7 +159,7 @@
</h4>
<div class="mt-5 mb-4">
<div class="progress">
<div class="progress-bar" role="progressbar" t-att-aria-valuenow="widget.quiz.rankProgress.previous_rank.progress" aria-valuemin="0" aria-valuemax="100"
<div class="progress-bar" role="progressbar" t-att-aria-valuenow="widget.quiz.rankProgress.previous_rank.progress" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar"
t-attf-style="width: #{widget.quiz.rankProgress.previous_rank.progress}%"/>
<div class="progress-bar-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" t-att-title="widget.quiz.rankProgress.new_rank.karma" />
</div>
@@ -3,7 +3,7 @@
<t t-name="website.slides.fullscreen.content">
<t t-if="widget.get('slide').category === 'document'">
<div class="ratio h-100">
<iframe t-att-src="widget.get('slide').embedUrl" class="o_wslides_iframe_viewer" allowFullScreen="true" frameborder="0"/>
<iframe t-att-src="widget.get('slide').embedUrl" class="o_wslides_iframe_viewer" allowFullScreen="true" frameborder="0" aria-label="Slides"/>
</div>
</t>
<t t-if="widget.get('slide').category === 'infographic'">
@@ -86,7 +86,7 @@
</div>
<div class="btn-group ms-1 position-static">
<a class="btn bg-black-25 text-white dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-search"></i></a>
<a class="btn bg-black-25 text-white dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Search"><i class="fa fa-search"></i></a>
<div class="dropdown-menu dropdown-menu-end w-100" style="right: 10px;">
<t t-call="website.website_search_box_input">
<t t-set="_classes" t-valuef="px-3"/>
@@ -173,14 +173,14 @@
</div>
<div class="col-12 col-md-8 col-lg-9 position-relative">
<ul class="nav nav-tabs o_wslides_nav_tabs flex-nowrap" role="tablist" id="profile_extra_info_tablist">
<li class="nav-item">
<li class="nav-item" role="presentation">
<a t-att-class="'nav-link %s' % ('active' if active_tab == 'home' else '')"
id="home-tab" data-bs-toggle="pill" href="#home" role="tab" aria-controls="home"
t-att-aria-selected="'true' if active_tab == 'home' else 'false'">
<i class="fa fa-home"/> Course
</a>
</li>
<li t-if="channel.allow_comment" class="nav-item o_wslides_course_header_nav_review">
<li t-if="channel.allow_comment" class="nav-item o_wslides_course_header_nav_review" role="presentation">
<a t-att-class="'nav-link %s' % ('active' if active_tab == 'review' else '')"
id="review-tab" data-bs-toggle="pill" href="#review" role="tab" aria-controls="review"
t-att-aria-selected="'true' if active_tab == 'review' else 'false'">
@@ -416,7 +416,7 @@
</span>
<div t-attf-class="o_wslides_channel_completion_progressbar #{'d-none' if channel.completed else 'd-flex'} w-100 align-items-center">
<div class="progress flex-grow-1 bg-black-50" style="height: 6px;">
<div class="progress-bar" role="progressbar" t-attf-style="width: #{channel.completion}%" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar" role="progressbar" t-attf-style="width: #{channel.completion}%" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar"></div>
</div>
<div class="ms-3 small">
<span class="o_wslides_progress_percentage" t-esc="channel.completion"/> %
@@ -462,6 +462,10 @@
<span class="ms-1" t-field="category['category'].completion_time" t-options="{'widget': 'duration', 'format' : 'short', 'unit': 'hour', 'round': 'minute'}"/>
</div>
<div class="d-flex border-start ms-2 o_not_editable">
<!-- TODO: review the aria-label which does not
match the actual text thus triggering the
warning "Elements with visible text labels do
not have matching accessible names" -->
<a t-if="channel.can_upload"
class="o_text_link o_wslides_js_slide_upload px-3 py-2"
role="button"
@@ -490,6 +494,9 @@
</t>
</ul>
<div t-if="channel.can_upload" class="o_wslides_content_actions o_not_editable btn-group">
<!-- TODO: review the aria-label which does not match the actual
text thus triggering the warning "Elements with visible text labels
do not have matching accessible names" -->
<a class="o_wslides_js_slide_upload me-1 border btn btn-primary"
role="button"
aria-label="Upload Document"
@@ -606,10 +613,10 @@
</div>
<div class="d-flex flex-row o_not_editable">
<a name="o_wslides_list_slide_add_quizz" t-if="channel.can_upload and not slide.question_ids" t-attf-href="/slides/slide/#{slug(slide)}?quiz_quick_create">
<a name="o_wslides_list_slide_add_quizz" t-if="channel.can_upload and not slide.question_ids" t-attf-href="/slides/slide/#{slug(slide)}?quiz_quick_create" aria-label="Add quiz">
<span class="badge text-bg-light badge-hide border fw-normal px-2 py-1 m-1">Add Quiz</span>
</a>
<a t-if="channel.can_upload" href="#" name="o_wslides_slide_toggle_is_preview">
<a t-if="channel.can_upload" href="#" name="o_wslides_slide_toggle_is_preview" aria-label="Preview">
<span t-att-data-slide-id="slide.id" t-attf-class="o_wslides_js_slide_toggle_is_preview badge #{'text-bg-success' if slide.is_preview else 'text-bg-light badge-hide border'} fw-normal px-2 py-1 m-1"><span>Preview</span></span>
</a>
<t t-elif="slide.is_preview and not channel.is_member">
@@ -632,9 +639,9 @@
<t t-set="use_slide_icon" t-value="False"/>
</t>
<span t-if="channel.can_publish" class="d-none d-md-flex">
<a t-if="slide.slide_category == 'article'" class="mx-2 o_text_link text-primary o_not_editable" target="_blank" t-attf-href="/slides/slide/#{slug(slide)}?enable_editor=1"><span class="fa fa-pencil"/></a>
<a t-if="slide.slide_category == 'article'" class="mx-2 o_text_link text-primary o_not_editable" target="_blank" t-attf-href="/slides/slide/#{slug(slide)}?enable_editor=1" title="Edit"><span class="fa fa-pencil"/></a>
<a t-else="" class="mx-2 o_text_link text-primary o_not_editable" target="_blank" t-attf-href="/web#id=#{slide.id}&amp;action=#{slide_action}&amp;model=slide.slide&amp;view_type=form" title="Edit in backend"><span class="fa fa-pencil"/></a>
<a href="#" t-att-data-slide-id="slide.id" class="o_text_link text-danger mx-2 o_wslides_js_slide_archive o_not_editable"><span class="fa fa-trash"/></a>
<a href="#" t-att-data-slide-id="slide.id" class="o_text_link text-danger mx-2 o_wslides_js_slide_archive o_not_editable" title="Delete"><span class="fa fa-trash"/></a>
</span>
</div>
</li>
@@ -780,6 +787,10 @@
</div>
<div t-if="channel.can_upload" class="text-end pb-2 col-auto">
<!-- TODO: In master, remove the aria-label of the next two
anchors, as they already have a title, to avoid an
accessibility error of type `Elements with visible text
labels do not have matching accessible names`. -->
<a class="btn btn-primary py-1 o_wslides_js_slide_upload"
title="Upload Document" role="button"
aria-label="Upload Document" href="#"
@@ -362,7 +362,7 @@
<span class="badge rounded-pill text-bg-success pull-right py-1 px-2"><i class="fa fa-check"/> Completed</span>
</t>
<div t-elif="channel.is_member and channel.channel_type != 'documentation'" class="progress w-50" style="height: 6px">
<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 class="progress-bar" role="progressbar" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100" t-attf-style="width:#{channel.completion}%;" aria-label="Progress bar"/>
</div>
<small t-else=""><b t-esc="channel.total_slides"/> steps</small>
</div>
@@ -28,7 +28,7 @@
</div>
<div t-else="" t-attf-class="o_wslides_channel_completion_progressbar #{'d-none' if slide.channel_id.completed else 'd-flex'} align-items-center pb-3">
<div class="progress w-50 bg-black-25" style="height: 10px;">
<div class="progress-bar rounded-start bg-info" role="progressbar"
<div class="progress-bar rounded-start bg-info" role="progressbar" aria-label="Progress bar"
t-att-aria-valuenow="slide.channel_id.completion" aria-valuemin="0" aria-valuemax="100"
t-attf-style="width: #{slide.channel_id.completion}%;">
</div>
@@ -66,8 +66,8 @@
<template id="slide_aside_documentation" name="Slide: Sidebar in Documentation">
<div class="o_wslides_lesson_aside_doc position-relative bg-white pb-1 my-3 border-bottom">
<ul class="nav nav-tabs nav-fill" role="tablist">
<li class="nav-item"><a aria-controls="related" href="#related" class="nav-link rounded-0 border-top-0 border-start-0 py-2 active" data-bs-toggle="tab">Related</a></li>
<li class="nav-item"><a aria-controls="most_viewed" href="#most_viewed" class="nav-link rounded-0 border-top-0 border-end-0 py-2" data-bs-toggle="tab">Most Viewed</a></li>
<li class="nav-item" role="presentation"><a aria-controls="related" href="#related" class="nav-link rounded-0 border-top-0 border-start-0 py-2 active" data-bs-toggle="tab" role="tab">Related</a></li>
<li class="nav-item" role="presentation"><a aria-controls="most_viewed" href="#most_viewed" class="nav-link rounded-0 border-top-0 border-end-0 py-2" data-bs-toggle="tab" role="tab">Most Viewed</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" id="related" class="tab-pane active bg-100">
@@ -247,7 +247,7 @@
</span>
<div class="btn-group flex-grow-1 flex-sm-0 my-1" role="group" aria-label="Lesson Nav">
<a t-attf-class="o_wslides_nav_button btn btn-light border my-auto #{'disabled' if not previous_slide else ''} me-2"
role="button" t-att-aria-disabled="'disabled' if not previous_slide else None"
role="button" t-att-aria-disabled="'true' if not previous_slide else None" aria-label="Previous"
t-att-href="'/slides/slide/%s' % (slug(previous_slide)) if previous_slide else '#'">
<i class="oi oi-chevron-left me-2"></i> <span class="d-none d-sm-inline-block">Prev</span>
</a>
@@ -275,17 +275,17 @@
</t>
</div>
<a t-attf-class="o_wslides_nav_button btn btn-light border my-auto #{'disabled' if not next_slide else ''}"
role="button" t-att-aria-disabled="'disabled' if not next_slide else None"
role="button" t-att-aria-disabled="'true' if not next_slide else None" aria-label="Next"
t-att-href="'/slides/slide/%s' % (slug(next_slide)) if next_slide else '#'">
<span class="d-none d-sm-inline-block">Next</span> <i class="oi oi-chevron-right ms-2"></i>
</a>
</div>
<a class="btn btn-light border ms-2 my-1" role="button" t-att-href="'/slides/slide/%s?fullscreen=1' % (slug(slide))">
<a class="btn btn-light border ms-2 my-1" role="button" t-att-href="'/slides/slide/%s?fullscreen=1' % (slug(slide))" aria-label="Fullscreen">
<i class="fa fa-desktop me-xl-2 my-1"/>
<span class="d-none d-xl-inline-block">Fullscreen</span>
</a>
<a class="btn btn-light border ms-2 my-1" role="button" data-bs-toggle="modal"
t-att-data-bs-target="'#slideShareModal_%s' % slide.id">
t-att-data-bs-target="'#slideShareModal_%s' % slide.id" aria-label="Share">
<i class="fa fa-share-alt me-xl-2 my-1"/>
<span class="d-none d-xl-inline-block">Share</span>
</a>
@@ -318,17 +318,17 @@
<div class="mb-5 position-relative">
<ul class="nav nav-tabs o_wslides_lesson_nav" role="tablist">
<li class="nav-item">
<li class="nav-item" role="presentation">
<a href="#about" aria-controls="about" t-att-class="'nav-link active' if not comments else 'nav-link'" role="tab" data-bs-toggle="tab">
<i class="fa fa-home"></i> About
</a>
</li>
<li class="nav-item">
<li class="nav-item" role="presentation">
<a href="#discuss" aria-controls="discuss" t-att-class="'nav-link active' if comments else 'nav-link'" role="tab" data-bs-toggle="tab">
<i class="fa fa-comments"></i> Comments (<span t-esc="slide.comments_count"/>)
</a>
</li>
<li class="nav-item" groups="base.group_user">
<li class="nav-item" role="presentation" groups="base.group_user">
<a href="#statistic" aria-controls="statistic" class="nav-link" role="tab" data-bs-toggle="tab">
<i class="fa fa-bar-chart"></i> Statistics
</a>
@@ -45,10 +45,10 @@
<i class="fa fa-share-alt"/>
<span class="d-none d-md-inline-block ms-2">Share</span>
</a>
<a class="d-flex align-items-center px-3 o_wslides_fs_exit_fullscreen" t-attf-href="/slides/slide/#{slug(slide)}">
<a class="d-flex align-items-center px-3 o_wslides_fs_exit_fullscreen" t-attf-href="/slides/slide/#{slug(slide)}" title="Exit Fullscreen">
<i class="fa fa-sign-out"/><span class="d-none d-md-inline-block ms-1">Exit Fullscreen</span>
</a>
<a class="d-flex align-items-center px-3" t-attf-href="/slides/#{slug(slide.channel_id)}">
<a class="d-flex align-items-center px-3" t-attf-href="/slides/#{slug(slide.channel_id)}" title="Back to course">
<i class="fa fa-home"/><span class="d-none d-md-inline-block ms-1">Back to course</span>
</a>
</div>
@@ -69,7 +69,7 @@
</span>
<div t-attf-class="o_wslides_channel_completion_progressbar #{'d-none' if slide.channel_id.completed else 'd-flex'} w-100 align-items-center">
<div class="progress flex-grow-1 bg-black-50" style="height: 6px;">
<div class="progress-bar" role="progressbar" t-attf-style="width: #{slide.channel_id.completion}%" t-att-aria-valuenow="slide.channel_id.completion" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar" role="progressbar" t-attf-style="width: #{slide.channel_id.completion}%" t-att-aria-valuenow="slide.channel_id.completion" aria-valuemin="0" aria-valuemax="100" aria-label="Progress bar"></div>
</div>
<div class="ms-3 small">
<span class="o_wslides_progress_percentage" t-esc="slide.channel_id.completion"/> %