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
Fix the rank image display which has currently
disappear by making it appear again in the xp circle.
Also making sure the xp circle tooltip is correctly
showing on hover.
Task-3285548
closesodoo/odoo#120408
X-original-commit: e96bd5a7ee4397440503ab4605f2df29d3a2d6f2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, if an user receives an increase or decrease in the XP,
both are currently shown with success badge (green).
After this commit, if there is decrease in user XP, it will be shown with
warning badge (orange).
closesodoo/odoo#118068
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, in the website profile frontend, if we filter the users
using 'This week' or 'This month' filters we always get a '+' displayed before
the karma gain.
If user gained negative karma, lets say -500, currently it displays as follows
--> +-500 , instead of -500.
After this commit, if the gained karma during the period is it will show
-500 instead of +-500.
closesodoo/odoo#117548
X-original-commit: 53b406bcf92e50e62329f1b128742bd851d22cb0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/odoo#116167
Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Purpose
=======
Change the current alert banner closing icons
(a "x" in a gray box) by the new good-looking
bootstrap 5 closing button.
Task-3222588
closesodoo/odoo#115424
X-original-commit: 6f83f60f2f0d031c15df5c3b450fb583feaea3b9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit, the "rank by" parameter was deleted when a visitor
added a search criteria. This commit solves this problem.
Steps to reproduce the issue:
- Go to "/profile/users"
- Click on "Rank by" and select "This week"
- Search for a user (e.g. "admin")
=> The "rank by" parameter is lost and if you click on "This week"
again, the search (admin) will be lost.
task-3058239
closesodoo/odoo#114253
X-original-commit: eed9e3d8c1366f457d2f3170741c09ab2143d912
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
before this commit, when a verification email is
send to the user when validating the website user
profile, there is no spacing/overlapping between
the email(in italic) and !
after this commit as the italic is removed from
the email, there will be proper
spacing(no overlapping)
closesodoo/odoo#114073
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, opening a user profile in website does not show the
tabs like About, Questions, Answers, Activity, Votes.
After this commit, it will display all the tabs in user profile.
closesodoo/odoo#112695
X-original-commit: 44cd55b5df3a08ae24e86796c69ab361f4f53fe4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, there are severlar issues with the karma card, like:
1/ improve karma display
2/ images of the rank and badges are can be changed by user, but
after saving the changes are discarded
Apart from that, in the course navbar, the hard-coded white
text color is given, due to which in some themes the text
becomes invisible. And in the courses cards below navbar,
the course title is not editable.
This commit improves the following points:
1/ Makes the next rank card (on course home page) a bit bigger, adds a
tooltip on the progress bar that shows gained xp out of minimum xp
needed for next rank (ex: "2500/10000 xp") if there is next rank,
and improves the text below rank image that now shows xp to gain for
next rank or if there isn't next rank, simply displays the earned xp.
2/ Makes the images editable (in karma card as well as in the
user profile and in '/profile/ranks_badges' page)
3/ Makes the rank title editable
4/ Removes the hard-coded white text color from the course
navbar and make the course title editable
taskID-2853264
closesodoo/odoo#92871
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This new commit will add a new tab on the user profile that will list
the certifications attempts made a given user. With this new tab, the
administrators can get a quick overview of the user activity.
task-2679881
closesodoo/odoo#81057
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
- 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
Currently if a user is having huge number of karma/xp (for example
10000), when viewing the website profile, these numbers overlap the
design of a next rank layout card.
This commit formats the karma/xp into decimal number (allowing up
to two decimal points so that the information is meaningful) and
thus reducing the space being occupied by large numbers.
task-2792149
Part-of: odoo/odoo#87996
In the current layout that displays user rank in the website profile,
the image overlaps content so the information is not fully readable.
This happens due to wrong value being set as a variable with q-web
directive.
With a recent refactoring (see commit[1]), the `_compile_format`
method replaces % into %%. So in our case, we are trying to set the
width in % (for ex 50%) which is parsed by qweb and converted into
50%%, and thus the CSS property is not applied correctly.
This commit fixes the issue by using `t-value` instead of `t-valuef to
avoid the string formatting related parsing, and thus making sure
that the proper css property is applied.
commit[1] - https://github.com/odoo/odoo/commit/e830953570d5f28aee9bdcdf97af18d3e3246030
task-2792149
closesodoo/odoo#90150
X-original-commit: 97628ef8b5998de546bac44d138ebf5b8a3a43ec
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The origin parameter must be an absolute link (starting with a /)
To be consistent and always have a leading slash (and avoid relative
links if the developer forgot to add a leading slash)
Purpose
=======
This commit improves the front-end when we have no leaderboard yet
Specifications
==============
It hides the `Show All` button when we have no leaderboard.
It also modifies the leaderboard view if a user manages to get to it.
task-2597345
See odoo/enterprise#20480
See odoo/upgrade#2784
Part-of: odoo/odoo#75646
Before Odoo saas-14.4, one should call `_get_http_domain()` on website to get
its domain. Indeed, that method was in charge of cleaning that domain, as it
was done with commit [1].
Since Odoo saas-14.4, that cleaning is automatically performed on domain before
saving it into database, thanks to commit [2].
Thus, we can now remove the `_get_http_domain()` and use directly the domain as
it is considered clean.
Note that migrated databases coming from version older than Odoo saas-14.4
could still have an incorrect domain (trailing slash, no scheme..).
This will be handled during migration with [3].
[1]: https://github.com/odoo/odoo/commit/3ad775aab717b395a5d11527aeb3596af66afa99
[2]: https://github.com/odoo/odoo/commit/042c95b0219bb0aa13e73385e092fa76ff1a1b0a
[3]: https://github.com/odoo/upgrade/pull/2951closesodoo/odoo#78766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose
=======
Clean up messages related to email verification.
Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.
PR: https://github.com/odoo/odoo/pull/77617
Task-2647065
closesodoo/odoo#77617
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Same change in several areas where translations existed:
- website editor notification popup
- elearning share popup
- forum remediation filter popup
- event registration attendees popup
- portal rating popup
- stripe payment error popup
And many other locations where there were no translations yet
"×" has been replaced by its UTF8 character.
Also introduced aria-label where missing.
Before this commit the close icon was included in translated resources.
For example, in Spanish the "×" had been turned into "&veces;"
thus not rendering an icon anymore
After this commit the close icon is not a translated text anymore and
remains an icon across all languages
https://github.com/odoo/odoo/pull/60186
task-2312878
closesodoo/odoo#62250
X-original-commit: 9896af94ebc887d98ccf44e6568ef7eeb5a27172
Related: odoo/enterprise#14937
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Steps to reproduce the problem:
* Set up multi company with A and B companies
* Set up user UB connected to B company
* Wet up website to company A
* Install eLearning app
* on the /profile/ranks_badges page with user UB the text writes: "Keep
learning with B. Collect points on the forum ...".
This is wrong, as the website is connected to company A. The text should
closesodoo/odoo#58098
Be: "Keep learning with A. Collect points on the forum ..."
X-original-commit: 0d58423f6180fea908fc747e874798ce4aeadd92
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
PURPOSE
Overall improve profile related parts of eLearning user experience.
SPECIFICATIONS
Improve display and the text about the karma gain/rank
- remove the double quotes around the rank
- change the text after the xp gained in rank list
- rename Monthly / Weekly gains to this month / this week
Improve the margin between questions and questions categories
- set same margin between questions in different categories
LINKS
Task ID-2241513
PR #55698
This commit add a breadcrumb in the badge frontend view to redirect
to the last page the user was.
It highlights the user profile line in ranking view (profile/users).
It add this line at the top of every pages except for the one where
it already was.
Part of https://github.com/odoo/odoo/pull/46634
task-2201708
Before this commit, if no image was set on the badge, no image was shown when
displaying the badge.
After this commit, if a badge level is set on the badge and no image is set,
the badge level image will be used for the badge.
This fix / improvement is applied twice
* when displaying an user profile, its received badges;
* when displaying current user achievements in eLearning;
Task ID 1981399
PR #43577
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425
closesodoo/odoo#48665
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Before this commit when an administrator edit another user's profile it
was his own data that displayed for the changes.
This commit fixes this issue.
SPECIFICATION
Add a test in both controller route when displaying the edit view and
when submitting the changes that check if the edited user is the same
as the actual user.
LINKS
Task ID : 2222043
PR : #48262closesodoo/odoo#48575
X-original-commit: 4ab4de5b57a17002d8b14584c7d39a29e8bca357
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fix most `t-set` errors that either led to:
1. unwanted text to be considered as translatable.
eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
`ir.translation`.
2. text that should be translatable were not.
eg: `<t t-set="text" t-value="'Both'"/>` would not create an
`ir.translation` while it should.
If a text should be translatable, it should never be inside a `t-value`:
- `<t t-set="text">Both</t>`
If a text should not be translatable, it sould either be inside `t-value`,
`t-valuef` or the `<t>` tag should have `t-translation="off"`:
- `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
- `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
- `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`
https://github.com/odoo/odoo/pull/43660https://github.com/odoo/enterprise/pull/7839https://github.com/odoo/design-themes/pull/203closesodoo/odoo#43660
Related: odoo/enterprise#7839
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit adds a section to distinguish the certification badges from the
other badges users may obtain in eLearning. Certification badges are available
on the ranks page, linked to a running survey. Clicking on them directly
redirects into the linked course.
Task ID : 1961053
PR #32594
In this commit we rename stat_count into granted_count, and stat_count_distinct
into granted_users_count to reflect more what are those variables, aka count
of granted badges.
Task ID: 1961053
PR #32594
Purpose is to support both search term and karma gain group by in the
URL, using keep_query.
Clean some code and move karma computation to res.users model to avoid
having sql in controllers.
Also fix some display issues.
LINKS
Task ID 2003505
PR #34594
PURPOSE
Allow karma gain tracking enabling notably display of top users based on
weekly / monthly gain in website profile.
SPECIFCIATIONS
Each time a user gains karma a record is created in the gamification karma
tracking model. Scheduled activity runs to consolidate the records into
monthly gain records to avoid having crowdy table and unnecessary noise
in karma gain.
This model is made private and only accessible through some dedicated
compute methods / controllers used in website profile.
In website profile module buttons are added to see users ranking based
on their total karma (like before) but also by last week and last month
gains (using the newly introduced tracking model).
LINKS
Task ID 2003505
PR #34594
Before this task, when the user arrived on his profile,
some empty sections didn't had any call to actions
task-2080615
closesodoo/odoo#38029
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
SPECIFICATIONS
* Remove the /home from the breadcrumb in user profile
* Rename the Home (on a specific course) into "Courses"
Task 2062640
closesodoo/odoo#36900
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...
64px is close enough to 128px that it can be removed without a big impact on
download size.
It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.
The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.
If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.
Views
=====
- remove width and height attributes when existing CSS rules are overriding them
(eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules
task-2060865
closesodoo/odoo#36147
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When having not square images for user avatar several issues appear
* website_slides: heroes of the week banner is broken as circles are not
circles anymore. They look more like UFOs or funny snowmen;
* website_slides: my user status / leaderboard / achievements card display
is broken as image may take much more width than planned;
* website_slides: channel page view displays user avatar when having joined
it, and it is broken;
* website_profile: user avatars in top 3 of users karma ranking is broken.
In this commit we apply strict rules on width / height combined to an object
fit in order to always have a bioutifoul displayed circled image.
Task 2065425 (avatar ratio badly displayed)
PR #36756
* website_forum, website_profile
- Share some code between website_forum and website_profile by exposing
a function in web_editor to instantiate a wysiwyg instance on a
textarea
- Use no-lazy loaded JS to add a visual loading effect while the
wysiwyg is not yet available.
This is made in preparation of task-2024197
(see https://github.com/odoo/odoo/pull/35749)
Thanks to @stefanorigano
closesodoo/odoo#36581
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before, we were adding a card slot for each badge but displaying information on this
slot only if the badge was website_published. This led to empty slots.
Now, we add only the section if the badge is website_published.
Also, the badge count should only display the number of website_published
received badge of the user. As the profile page is only displayed the information
about 'frontend' achievements (elearning and forum) of the user.
Task ID:2045192
PR #35321
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides
The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.
Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.
task-2002435
closesodoo/odoo#34261
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
* = website_forum, website_profile, website_sale,
website_sale_comparison, website_slides, website_slides_survey
Some image links were hard coded in the xml views of website, now they
are replaced with website.image_url(model, field).
Part of https://github.com/odoo/odoo/pull/34149
task-2007400
closesodoo/odoo#34149
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>