Skip to content
Permalink
Browse files

[MERGE] website_slides: various fixes for frontend and first design t…

…weaks

Purpose of this merge is to provide several fixes related to new elearning
application. Those are mainly fixes for front-end templates and first
design improvements / fixes.

See sub commits for more details.

Merge linked to task ID 1941250 and PR #31279.

closes #31306
  • Loading branch information...
robodoo committed Feb 21, 2019
2 parents 3029109 + c2629d1 commit 5cec06b179f3dfe48c091f627d9e9c3255c30438
@@ -36,7 +36,6 @@ def _get_default_avatar(self, field, headers, width, height):
content = base64.b64encode(image)
dictheaders = dict(headers) if headers else {}
dictheaders['Content-Type'] = 'image/png'
headers = list(dictheaders.items())
if not (width or height):
suffix = field.split('_')[-1] if '_' in field else 'large'
if suffix in ('small', 'medium', 'large', 'big'):
@@ -45,6 +44,9 @@ def _get_default_avatar(self, field, headers, width, height):

def _check_user_profile_access(self, user_id):
user_sudo = request.env['res.users'].sudo().browse(user_id)
# User can access - no matter what - his own profile
if user_sudo.id == request.env.user.id:
return user_sudo
if user_sudo.karma == 0 or not user_sudo.website_published or \
(user_sudo.id != request.session.uid and request.env.user.karma < request.website.karma_profile_min):
return False
@@ -5,7 +5,7 @@
'summary': 'Sell your courses online',
'description': """Sell your courses using the e-commerce features of the website.""",
'category': 'Hidden',
'version': '0.1',
'version': '1.0',

'depends': ['website_slides', 'website_sale'],
'installable': True,
@@ -1,21 +1,23 @@
# -*- coding: utf-8 -*-
{
'name': 'Slides',
'version': '1.0',
'name': 'eLearning',
'version': '2.0',
'sequence': 145,
'summary': 'Publish videos, slides and documents',
'summary': 'Create online Courses',
'website': 'https://www.odoo.com/page/slides',
'category': 'Website',
'description': """
Share and Publish Videos, Presentations and Documents'
======================================================
Create Online Courses
=====================
* Website Application
* Channel Management
* Filters and Tagging
* Statistics of Presentation
* Channel Subscription
* Supported document types : PDF, images, YouTube videos and Google Drive documents)
Featuring
* Integrated course and lesson management
* Fullscreen navigation
* Support Youtube videos, Google documents, PDF, images, web pages
* Test knowledge with quizzes
* Filter and Tag
* Statistics
""",
'depends': [
'website',
@@ -102,7 +102,7 @@ will learn the basics of wood characteristics.</field>
<field name="promote_strategy">most_voted</field>
<field name="website_published" eval="True"/>
<field name="enroll">invite</field>
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture_2.jpg"/>
<field name="description">We're also Santa Claus! Belligerent and numerous. I am the man with no name, Zapp Brannigan!</field>
</record>
<record id="slide_category_demo_4_0" model="slide.category">
Binary file not shown.
Binary file not shown.
@@ -66,7 +66,7 @@
.o_wslides_fullscreen_container {
display: flex;
align-items: stretch;
height: 100%;
height: calc(100% - 50px);
position: relative;
background-color: #313A44;
}
Oops, something went wrong.

0 comments on commit 5cec06b

Please sign in to comment.
You can’t perform that action at this time.