Commit Graph
623 Commits
Author SHA1 Message Date
niyasraphy 6ff6b23a89 [FIX] website_forum: not redirecting correctly
before this commit, on clicking button in the forum main
page the url is not updated correctly with the dynamic
variable, as href is used instead of t-attf-href

* open form
* click meet our community members link
* see the url

after this commit, on redirection url will be properly
updated.

closes odoo/odoo#132536

X-original-commit: 944b47346d3d5452a57bbe1ed6a666b17dfcbdc1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 17:01:12 +02:00
Elisabeth Dickinson c9af4abfd3 [FIX] website_forum: fix redesign layout glitches
- Improve last activity column
Allow the columns to resize to fit the date line without wrapping
and set the actual date to the title to appear on hover.

- Header fixes
To avoid the searchbar shrinking too much when there are multiple
elements in the header (long title, tag or search filter, ...), we've
set a `min-width` to it , and the `max-width` has been moved
from the second section of the header to the searchbar instead.

The alignment of the title and the rest of the bar is now aligned on the
breadcrumb's baseline instead of vertically centered.

- Fix dropdown title disappearing on selecting a tag
The dropdown's title disappeared when a tag was selected as a filter.

- Height of container and aside
We've removed the `h-100` on the aside to place it on the parent under
the condition that the `forum_welcome_message` has been dismissed.

Because `<main>` has a `flex-grow` is applied to it,
the `#wrap` has a gap under the content where it doesn't meet the full
height of the main.
This blank space is made visible by the grey background of the aside.
This could be solved by a simple `h-100` on the wrap, but it overflows
onto the footer when the `forum_welcome_message` displayed.

- Add missing pages names
Some titles weren't appearing in the breadcrumb due to misplacement of
the `_page_name` t-set or absence of it.

- Switch static image for animation
The empty moderation pages now have an animated svg instead of a static
one. Fun.

- Hide filter tool on empty mod pages
The moderation pages don't need the filter tool to appear when there
are no results.

- Switch conditionals `and/or` to `if`

Although it works, in python we don't use `X and A or B`
but `A if X else B`

- Other visual fixes

In JS : put back removed classes on voteCount element
Tags: fix the overflowing text when tag is long and switch position with
icon for more readability
Remove useless `not inDropdown` condition on form
Fix inverted plural/singular of `Views`

Other minor alignment fixes

task-3083657
part of task-3316555

closes odoo/odoo#132226

X-original-commit: c2ed6257f8a2fe74a7f4fa2977b44aac1c0bb0c5
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-08-18 17:13:59 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
niyasraphy 1e71660329 [IMP] website_forum: show fields only when needed
before this commit, in the forum post form view, the
closing related fields, is visible even if the post
is not closed and question field should not be shown
in the parent post.

after this commit, closing fields will be shown only
once post is closed and parent_id and is_correct
field will be shown only in child post(answer)

closes odoo/odoo#129299

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-09 17:04:11 +02:00
niyasraphy 8a72dfc0ba [IMP] website_forum: show icon in validation queue filter
before this commit, in the forum validation queue filter,
along with the text filter instead of icon some hard coded
value(圾) is shown as text.

* create a user with very minimum XP
* create a post from new user login
* from admin login, click validation queue in the
forum
* click on filter in the validation queue

after this commit, the text will be replaced with fa-font
icon, so that all filters will look similar.

closes odoo/odoo#123636

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-09 17:04:03 +02:00
niyasraphy b62f5081aa [IMP] website_forum: show popover info only for public profile
before this commit, even it the user profile is not public,
or if the user karma is less than karma_profile_min set
in the website, on hovering the move on the user image
in the post, the user details is shown in the pop over

after this commit, the pop over information is shown only
if the user's profile is public profile and user karma is
greater than karma_profile_min in website

closes odoo/odoo#126628

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-04 10:58:55 +02:00
Florian Charlier f11e84b10c [FIX] website_forum: fix delete button
A typo in forum templates leads to a 404 page instead of redirecting to
the page allowing to delete a closed post.

Follow-up of #123709
task-3316555

closes odoo/odoo#129161

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 15:45:11 +02:00
Lopes Marc (loma) c91346f889 [FIX] website_forum: fix posts sorting by last activity date
Fixed a typo in forum templates that prevents users from atlerning
between ascending and descending order when sorting forum posts.

follow-up of #123709
task-3316555

closes odoo/odoo#129116

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 14:23:18 +02:00
Lopes Marc (loma)andFlorian Charlier 280537b9fe [IMP] website_forum: replace bump with last activity
Purpose
=======
1. The post "activity" date shown on a forum's list of posts is not a
great user experience as it is seems to be updated for writes on the
 original post and not, e.g., when a reply is added.

2. Remove bumping on social sharing.
As we are not in 2015 anymore, sharing is not a relevant "activity"
for the post. This is illustrated by the fact that `allow_bump`
could not be updated with the client, and the "default" "target_type"
is not found in the codebase anymore. We clean that here.

Specifications
==============
- Drop bump_date and use last_activity_date instead of write date
to log activity
- Update post last_activity_date whenever a reply or a comment is
added to the original post or one of its replies
- Sort posts lists by `last_activity_date desc` by default
- Use luxon.js library to render the bump_date field as a
`relative datetime`(e.g.: 2 days ago, 1 hour ago...)

Task-3349374
Task-3316555

Part-of: odoo/odoo#123709
Co-authored-by: Florian Charlier <flch@odoo.com>
2023-07-18 16:58:44 +02:00
Florian Charlier 3d1d5bfb09 [IMP] website_forum: search and filter tags
This commit enables user to

* Track, show, and use the forum's
  * Most commonly used tags
  * Unused tags (for the moderators)
* Search tags
* Get an improved "no results" experience with tags

Task-3349375

Part-of: odoo/odoo#123709
2023-07-18 16:58:43 +02:00
Elisabeth DickinsonandFlorian Charlier 21531bd9b9 [IMP] website_forum, *: redesign forum's frontend
* = website_slides_forum, website_mail, website_profile

In `website_(slides)_forum`:
All forums page:
Course forums are displayed on the same level as regular forums (with
a tag "Course" to differentiate them).
We don't see this page if there is only one forum.

This new design resembles that of Discourse with a table for the list
of questions and a sidebar on the left.

Other pages such as the Tags, FAQ, and Moderation pages have also been
revamped. Some of the functionality comes in the following commits.

Notes: The table rows have been made fully clickable, but by doing so
other clickable or hoverable elements lose their function.
In order to counteract this, a `position-relative` and
`z-index-1` classes are added to them.

The image_url definition wasn't working properly: When a user didn't have
and avatar, a placeholder with their initial is generated. But it did
not take the size option defined in the widget. This has been
corrected by changing it to `request.website.image_url(...)`

In the posts' page, the answer box now comes up from the bottom of the
screen.

In the FAQ pages, the accordion has been replaced by BS accordion
component using `accordion-item` instead of cards. The web editor
however is still using the old system.

In `website_mail`:
A new template for the follow button has been created in order to
redesign it for the forum without disrupting this element in other
modules (ie: website_mail, blog).

Task-3083657
Part of Task-3316555

Part-of: odoo/odoo#123709
Co-authored-by: Florian Charlier <flch@odoo.com>
2023-07-18 16:58:43 +02:00
niyasraphy 9bacc4e25d [FIX] website_forum: traceback on clicking publish/unpublish
before this commit, on clicking the publish/unpublish
buttons from the tree view of the forum post, is showing
traceback due to missing is_published field in the
forum.post model.

publish/unpublish buttons in the action menu is added
by the js class website_pages_list.

after this commit, the js class is removed from the
tree and thus no publish/unpublish button is shown
in the action menu.

closes odoo/odoo#128540

X-original-commit: ada177c9a840347330942a8e1db2204bf0c280e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-15 12:00:47 +02:00
dane@odoo.com fc66f54ed4 [IMP] website_forum: multi forum pending
This change introduces ability for users (who don't have enough karma)
to create one pending post per forum.
Previously users could only do it in all of forums.

ticket-3354435

closes odoo/odoo#124112

Related: odoo/upgrade#4841
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-06-28 17:41:35 +02:00
Jeremy Kersten 5746f4eccc [FIX] website_forum: don't use trailing / in url_for
Since PR https://github.com/odoo/odoo/pull/106109, url_for remove the
trailing / so we need to handle this case from another way

closes odoo/odoo#125598

X-original-commit: 1d04e56013e53320da4eda5335e06a69f2c479e9
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-06-19 16:40:15 +02:00
niyasraphy 08f196cf8c [IMP] website_forum: add karma_user_bio field to view
before this commit, karma_user_bio was not added in the
forum forum view and the default value set for the field
was 750, this field decide whether the pop over has to
show or not when user places the mouse hover the author
box in the frontend forum post.

after this commit, as the field is added to the view
end user will be able to adjust the value as per the
need.

closes odoo/odoo#123638

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-16 09:34:46 +02:00
niyasraphy 527766a0af [CLN] website_forum: clean moderation_queue temporary fix
Follow-up of [1] fixing an undesired override of the env user
 when rendering other users' details.

This cleans up the temporary patch in stable in favor of simply
renaming the variable defined in the template.

[1] https://github.com/odoo/odoo/commit/5f2a0bea54a4daca565d3ba3be32ce5582253cca

closes odoo/odoo#115006

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-05 13:31:10 +02:00
niyasraphy 1b03544678 [IMP] website_forum: improve window title
before this commit, on editing a forum post
window title is shown as edit_post(id) as the
name is not set on the template.

after this commit, window title will be shown
as Edit Post.

closes odoo/odoo#114624

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-15 09:37:42 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
niyasraphy 40be0ebf9b [IMP] website_forum: remove milli seconds from vote datetime
before this commit, in the votes tab in the website
user profile, the date time is shown including the
milli seconds in it.

* open forum
* open own user profile
* click votes tab and see the date time

after this commit, the milli seconds info will be
removed from the date time.

closes odoo/odoo#118152

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:23 +02:00
Thibault Delavallée e33f28de85 [FIX] website_forum: fix website/forum count synchronization, rename field
Currently 'forums_count' field on website is not correctly updated. Test
introduced recently show that

  * at website create, counter is not computed;
  * at forum create, counter is not computed;

Only updating a forum active flag, website value, or unlinking it recomputes
the counters.

Note that manually updating counters is required as forum with False website
are global forum, valid for all websites.

Finally rename 'forums_count' into 'forum_count'. Fields in Odoo are rarely
plural (more like 'forum_ids' / 'forum_count' for example, even if in our
case the 2many does not exist due to shared behavior).

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:29 +01:00
Thibault Delavallée 0e089316cb [REF] website_forum: rename views according to guidelines
PURPOSE

Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.

SPECIFICATIONS

Rename main views and actions according to guidelines. Having standardized
names eases process of finding and updating views.

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:28 +01:00
Thibault Delavallée 20565afc46 [REM] website_forum: remove dead view
'post_reply' template seems not used anywhere.

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:23 +01:00
Thibault Delavallée 232f1dba23 [MOV] website_forum: split templates per main usage
PURPOSE

Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.

SPECIFICATIONS

Split templates by main usage. Files have been duplicated previously, they
are now cleaned to keep only content relevant to their usage. Split is done
according to

  * base file: layouts for main actions not specifically managed in other
    sub-files: display a forum, manage tags, post a new question or edit
    a question;
  * '_forum_all': 'all' page in multi-forum display, displaying the list of
    available forum;
  * '_layout': layouting templates. Modifications to global layout and forum
    specific page header used through all main templates;
  * '_moderation': moderation tools;
  * '_post': display a forum post;
  * '_tools': tooling and utility blocks, used as black boxes in various
    main templates;

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:23 +01:00
Thibault Delavallée a66f6aae7a [MOV] website_forum: duplicate 'forum_forum_templates.xml', prepare split
Purpose is to try to keep history before splitting frontend templates into
separate files. We first copy the file, then remove extra content in each
of them. Let us see if this works.

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:23 +01:00
Thibault Delavallée 2ad0ed3add [MOV] website_forum: move, split and rename (backend) views
PURPOSE

Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.

SPECIFICATIONS

Rename and split backend views / model. It allows an easier manipulation and
management.

Templates (frontend) files are renamed but not split. It requires a more
in-depth check of their content before splitting into sub-files (to have
tool templates separated from main templates notably). This will be done
in the next few commits.

Task-3240082 (Forum: Reorganize and lint module)

Part-of: odoo/odoo#114841
2023-03-22 17:03:22 +01:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
niyasraphy f765bd1c2b [FIX] website_forum: restore answers field width on post form view
Before this commit, in the forum post form view, the answers one2many
field is not aligned properly.

* open a forum post from website
* click forum post in the top bar (near edit button)
* forum post form will be opened

After this commit, the field will be displayed properly.

closes odoo/odoo#114433

X-original-commit: 5d8db1e1715cef36468681f59da55c780ae67a55
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-03-07 02:56:21 +01:00
Thomas Josseandstd-odoo 0ffa2d64ba [IMP] gamification, website_forum, website_slides: karma tracking improvement
Purpose
=======
Some users found a way to farm karma points, so we want to be able to
track the source of the karma gain / loss.

Specifications
==============
Now, we added a reference field `origin_ref` which store the record
responsible for the karma gain / loss (e.g. a slide we just completed).

In addition to this origin, we also have a new field to store the
reason (e.g. "Slide completed") so we know exactly what happened and
how the user gains his karma.

Before, the `old_value` of the karma tracking has to be set manually,
but now it's done automatically based on the value of the previous
tracking of the same user. That way, it will simplify other part of
the code.

Add the karma reason in the website modules. Adapt those modules due
to the changes in gamification.

Task-2234179

closes odoo/odoo#76430

Related: odoo/enterprise#23702
Related: odoo/upgrade#3299
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Co-authored-by: std-odoo <std@odoo.com>
2023-03-06 17:47:09 +01:00
niyasraphy 2507c8e819 [FIX] website_forum: display correct user image in forum sidebar
Before this commit, on accessing the validation queue in the website forum,
the user image shown in the sidebar is different from the logged in user image.

The cause of issue was the variable passed from the controller and the
variable used for iterating the for loop who are the same, aka user. Thus
the value for 'user' is getting changed. resolved by storing the user value
to a temporary variable and restoring it after the loop.

After this commit, in the validation queue it will show the same logged in
user image in sidebar.

closes odoo/odoo#111474

X-original-commit: 31ad927c825f0aea02b3031fa228002ca33f65fd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 15:18:01 +01:00
niyasraphy dad4ef4325 [FIX] website_forum: properly make the description field full width
In the forum form view, the description field is not aligned well and
is too compact. This is because of [1] (and related commits of that big
rework), which changed the way form view groups are rendered (using grid
display).

- eLearning -> Forum -> Forums
- Open any record
- In the "Options" tab, there is a description field at the bottom of
  the view

=> The description field is too compact (hard to view and edit the value
   from the field).

In master, this should in fact be changed to not use any group.

[1]: https://github.com/odoo/odoo/commit/a2b894989ea33364dd29a7d412e4bd4260c1f5ef

closes odoo/odoo#103994

X-original-commit: 3dc42aafffc3c41db732a6e52af7956ea1d0da0e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-25 13:03:44 +02:00
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00
xO-Tx b0484d64c4 [FIX] website, *: fix website content kanban views
*: website_blog, website_forum, website_hr_recruitment, website_sale,
   website_slides

The goal of this commit is to set the missing 'view_ids' on some
actions linked to website 'pages' tree/kanban views.

Linking a form view to actions will make the 'Edit' & 'Configuration'
buttons work correctly (on kanban record dropdown for 'hr.job' &
'slide.channel').

The website url on "product pages" kanban should start on a new line
after this commit too.

Related to task-2889981

closes odoo/odoo#101814

X-original-commit: a61e730cd9f92b2c343646f33f3e59cef518c3bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-03 20:19:53 +02:00
xO-Tx f23399db1d [IMP] website, *: add website content kanban views
*: website_event, website_forum, website_hr_recruitment,
   website_sale, website_slides

The website content list views should act as a page manager (click on
a record redirects to iframe, "CREATE" and "Publish / Unpublish"
buttons, ...).

The goal of this commit is to add a kanban version of these views for
key app models ('website.page', 'blog.post',...) since the same code
can now be used for list and kanban controllers / renderers since [1].
It is especially important in mobile where the kanban views are nicer
than list views by default.

[1]: https://github.com/odoo/odoo/commit/ed09db19c372da8d8be541f365117d1ce8e965ba

task-2889981

closes odoo/odoo#101174

Related: odoo/enterprise#31821
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-27 14:54:40 +02:00
Huy Le 58162aa290 [FIX] website_forum: fix wrong attribute
After commit [1], attribute `t-value` was replaced to `value` by mistake

Steps to reproduce:
- Go to a forum post
- Click on the author image, logged in as admin
- On the profile page, unpublish the user
- As public visitor go to the previous forum post
- See the avatar image url -> `href` is now `href="#"` with this PR.

[1]: https://github.com/odoo/odoo/commit/c8c8eb3d5652e9834d0ecd5aad907ee359edb657#diff-2a4205ad15bf7b1ef0d1361b1baec87ef8a6429de19f9e0e8afce4ca16be839d

closes odoo/odoo#100600

X-original-commit: 556ff721fb7f052bee004434029659d55ea00f21
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-21 18:58:56 +02:00
qsm-odoo da3f4c2aff [IMP] website, *: fill the "Content" area of the main website menu
*: website_blog, website_event, website_forum, website_hr_recruitment,
   website_sale, website_slides

As indicated by previous commits, new custom list views are created to
fill the "Content" area of the main website menu with key app models:
blog posts, events, forum posts, jobs, products and courses (+ some in
the enterprise version, see related commit).

Those list views will act as the page manager one: a click on an item
redirect to the website iframe, the create button acts as creating a
record via the "+ New" systray button while being on the iframe, the
delete button will in the future allow to know the page that mentions
the related object before deleting it, etc etc.

task-2889981

closes odoo/odoo#98937

Related: odoo/enterprise#30782
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-05 05:21:06 +02:00
qsm-odoo 2bd1ba0e06 [MOV] *: move future page manager related views and action
*: website_blog, website_forum

A "page manager" list view will be created for key models in other
apps. This commit moves blog and forum views to a dedicated file to
save some history for the future introduction of that "page manager"
list view.

task-2889981

Part-of: odoo/odoo#98937
2022-09-05 05:21:05 +02:00
Achraf (abz) 31f389b983 [FIX] *: Adapt old custom-control class of Bootstrap
* = hr_holidays, mail, sale, web, web_editor, website, website_forum,
website_payment, website_sale

https://getbootstrap.com/docs/5.1/migration/

replacing `custom-control` by `form-check` because in bs4 this class had
a use which is not the case in bs5.

closes odoo/odoo#98965

Related: odoo/enterprise#30768
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-08-31 16:05:20 +02:00
Achraf (abz) cb05925d99 [FIX] mail, website_*,base: Update data-toggle to data-bs-toggle
in bootstrap 5.x the toggle attribute changed from `data-toggle` to
`data-bs-toggle`, so we have to change `data("toggle")` by
`data("bs-toggle")`

https://getbootstrap.com/docs/4.6/components/collapse/
https://getbootstrap.com/docs/5.1/components/collapse/
https://getbootstrap.com/docs/5.1/migration/#javascript

Also using `$el[0].dataset.bsToggle` instead of `$el.data("toggle")` is
better since `data()` can be confusing

```js
const a = document.createElement("a");
> <a></a>
a.setAttribute("data-bs-toggle", "dropdown")
> <a data-bs-toggle="dropdown"></a>
a.dataset
> DOMStringMap {bsToggle: 'dropdown'}
$(a).data()
> {}
```

*/

https://pad.odoo.com/p/wowl_views
[aju] https://watch.screencastify.com/v/XuuQTkKRFX3lJh1vnvt9 project.task
kanban view > schedule an activity > mark it as done > traceback
https://pastebin.com/i96Krxrb

closes odoo/odoo#98339

Enterprise: https://github.com/odoo/enterprise/pull/30558
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-19 09:12:42 +02:00
Romain Estievenart 36628c9b1c [FIX] *: removes .form-inline
this commit removes the usage of .form-inline class which is deprecated
since BS5.

here is the css rules that was used:
https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2303

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

We also took the opportunity to remove some .input-group-append and
.form-group. We are currently working to remove all of them.

Part-of: odoo/odoo#97967
2022-08-16 09:19:08 +02:00
qsm-odoo 29613c6ec4 [FIX] web_editor: fix the look of the indent symbol in the editor panel
As a stable fix, to not touch XML templates and break existing
translations, the ⌙ character was automatically replaced by └ which
makes more sense for the usecase and should work properly in all
browsers. The ⌙ character is actually rendered mirrored on Windows 11
Chrome (and others) as the font used for those unicode characters is
left to the browser. We could force a font of our own but it's probably
not worth it.

A better solution with a SVG or CSS solution has to be done in master.
That would unify the look of the symbol across all browsers and
also prevent special characters to be placed in translations.

With this forward-port commit, we'll start first by using └ via a CSS
rule. Three new classes have been created: o_we_sublevel_1,
o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget
automatically adds the └ character. Then choosing 1, 2 or 3 controls
the indentation, which was previously controlled by placing the &emsp;
HTML entity directly inside strings.

This commit also takes the opportunity to fix some of those level
indentations (sometimes 2 was used instead of 1 or 1 was used instead of
2, etc) and also review some related labels.

closes odoo/odoo#97361

X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-04 11:45:31 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli 3e7c13c97d [REF] *: BS5: Migrate data attributes
> Data attributes for all JavaScript plugins are now namespaced to help
> distinguish Bootstrap functionality from third parties and your own code.
> For example, we use data-bs-toggle instead of data-toggle.

https://getbootstrap.com/docs/5.1/migration/#javascript

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:21 +02:00
Romeo Fragomeli 23c3a31a0d [REF] *: BS5: removal of .media class
https://getbootstrap.com/docs/5.1/migration/#grid-updates
https://getbootstrap.com/docs/5.1/utilities/flex/#media-object
https://github.com/twbs/bootstrap/pull/28265

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:19 +02:00
Romeo Fragomeli 9ea1351334 [REF] *: BS5: Migrate forms and inputs
- BS5 uses native inputs instead of pseudo-element for some
  input like checkbox, radio, ...
  in BS5 input checkbox don't have "virtual visual" checkbox anymore
  (::before), so we remove the relative's rules

- removed `.custom-control` class

- `form-switch` use a new layout system in BS5 we adapt the code to
  match the Bootstrap approach (inline SVG).

- In tests, we don't check the exact value of the background as it
  change in community/enterprise, and it's difficult to check the value
  of an SVG.

- Overflow in progressbar is now hidden.
  -> we had to restore it.

- In BS5 margins in forms/inputs has been changed
  -> we had to restore it (e.g. 'mb-3')

- .form-group, .form-row, .form-inline
> Dropped form-specific layout classes for our grid system.
> Use our grid and utilities instead of .form-group, .form-row,
> or .form-inline.

- .input-group-append and .input-group-prepend
> Dropped .input-group-append and .input-group-prepend.
> You can now just add buttons and .input-group-text as direct
> children of the input groups.

Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#forms

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
Romeo Fragomeli b82ba2a8fd [REF] *: BS5: Migrate modals and .btn-close for modals and alerts
- modal 'show' option doesn't exist anymore
  -> We need to call .show()

- by default, show is not the default
  -> we need to call .show() explicitly.

- generic close button for dismissing content like modals and alerts.

- BS5 modals needs `modal-dialog` class to work

- normally we need also to add `modal-content` class but as the original
XML don't have this nested level of div we don't use it, but instead
we add `pointer-events: auto` for all children `DIV` of `modal-dialog`
-> See DocumentViewer

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
Romeo Fragomeli ac584e171d [REF] *: BS5: Migrate Badge
From [1]:
> Dropped all .badge-* color classes for background utilities
> (e.g., use .bg-primary instead of .badge-primary).

We now have to manage constrast for some badge. It's why we
add 'text-dark' at some point.

Note:
Due to the backport of 'text-bg-#{theme}', we can use this to
avoid to use 'text-dark'.

Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#badges

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
Arthur Detroux (ard) e5b094b683 [IMP] website, *: remove unused assets
*: website_blog, website_event, website_forum, website_links,
   website_livechat, website_slides, survey, web_editor

This commit removes the website navbar root widget, as the edition is
now handled in the backend through the client action and custom menus.

It removes associated widgets and their css.

See merge commit for more information.

task-2687506
2022-06-24 10:28:06 +02:00
Benjamin Vray 823d46fc6f [IMP] website, *: adapt customize show options in website pages
*: website_crm, website_crm_partner_assign, website_customer,
   website_forum, website_hr_recruitment, website_membership,
   website_slides, website_slides_forum

This commit adapts "customize show" options from several website modules
by creating new options available in edit mode.

See merge commit for more information.

task-2710582
2022-06-24 10:28:05 +02:00
xO-Tx 8925df7e75 [IMP] website, *: add new content dialogs
*: website_blog, website_event, website_forum, website_livechat,
   website_sale, website_sale_slides, website_slides,
   website_slides_forum

The goal of this commit is to add dialogs to create new website content
using a 'target:new' action on the form view and an overridable
"website" form controller.

See merge commit for more information.

task-2687506
2022-06-24 10:28:05 +02:00