[MERGE][IMP] website_slides: introduce a new home page for slides
This merge proposes a new homepage for slides module evolving towards
an eLearning platform. This merge closes task 1936153 and PR #30770.
More generally this merge is linked to currently under heavy work slides
module update to eLearning [1][2].
It includes
* a new main page displaying top courses / channels. It displays 3 most
popular and newest channels as well as its ongoing courses (if logged).
Achievements and karma update done by eLearning community allow to
give a gamification look and feel;
* an 'All' page displaying all courses / channels. Tag groups and tags
allow to search / filter displayed courses;
* a new pimped and revamped display for main course / channel page;
* new demo data for slides and small addition of demo data in bridge module
with website_sale and website_forum;
Some features may not be completely working as other tasks will continue to
improve the display, notably new slide display [1], some forum / slide
link improvements [3] and certification integration [4]. Some code cleaning
will come in future update as this merge allows to unblock those other tasks.
For more details see sub commits. And thanks to the RD Fun SM Team. Much
fun, much SM.
[1] main eLearning task: task ID 1902304 - PR #29876
[2] new user profile /gamification: task ID 1922159 - PR #30514
[3] forum and comments upgrade: task ID 1940516 - PR #30514 and #31097
[4] certification inside eLearning: task ID 1940360 - PR #31060
@@ -15,7 +15,7 @@
|
||||
<field name="description" type="html"><p>You just began the adventure! Welcome!</p></field>
|
||||
<field name="description_reach_next" type="html"><p>Keep going !</p></field>
|
||||
<field name="karma_min">1</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_newbie.png"/>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_newbie_badge.svg"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<field name="description" type="html"><p>You begin to understand things ! Keep going!</p></field>
|
||||
<field name="description_reach_next" type="html"><p>Keep going !</p></field>
|
||||
<field name="karma_min">100</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_student.png"/>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_student_badge.svg"/>
|
||||
</record>
|
||||
|
||||
<record id="rank_bachelor" model="gamification.karma.rank">
|
||||
@@ -22,7 +22,7 @@
|
||||
<field name="description" type="html"><p>Hey ! You're not so dumb after all !</p></field>
|
||||
<field name="description_reach_next" type="html"><p>Keep going !</p></field>
|
||||
<field name="karma_min">500</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_bachelor.png"/>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/>
|
||||
</record>
|
||||
|
||||
<record id="rank_master" model="gamification.karma.rank">
|
||||
@@ -30,7 +30,7 @@
|
||||
<field name="description" type="html"><p>You're good ! Really Good !</p></field>
|
||||
<field name="description_reach_next" type="html"><p>Keep going !</p></field>
|
||||
<field name="karma_min">2000</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_master.png"/>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_master_badge.svg"/>
|
||||
</record>
|
||||
|
||||
<record id="rank_doctor" model="gamification.karma.rank">
|
||||
@@ -38,7 +38,7 @@
|
||||
<field name="description" type="html"><p>Ok, RESPECT !</p></field>
|
||||
<field name="description_reach_next" type="html"><p>Keep going !</p></field>
|
||||
<field name="karma_min">10000</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_doctor.png"/>
|
||||
<field name="image" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#965E3F" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563z"/><path fill="#FFF" d="M169.435 140.543c12 1.957 21.195 6.424 27.587 13.403 6.391 6.978 9.587 15.62 9.587 25.924 0 7.956-2.087 15.293-6.261 22.01-4.174 6.718-10.533 12.098-19.076 16.142-8.544 4.043-19.011 6.065-31.402 6.065-9.653 0-19.142-1.272-28.468-3.815-9.326-2.544-17.25-6.163-23.772-10.859l12.327-24.26c5.217 3.912 11.25 6.945 18.097 9.097a69.746 69.746 0 0 0 21.033 3.228c7.957 0 14.217-1.532 18.783-4.598 4.565-3.065 6.847-7.402 6.847-13.01 0-11.218-8.543-16.827-25.63-16.827h-14.478V142.11l28.174-31.892h-58.305V84.783h95.87v20.543l-30.913 35.217z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#CB9600" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563z"/><path fill="#FFF" d="M171.326 84.783L171.326 221.739 139.63 221.739 139.63 110.217 112.239 110.217 112.239 84.783z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 661 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#AD7624" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563z"/><path fill="#FFF" d="M207.783 189.391v25.826h-103.5v-20.543l52.826-49.891c5.608-5.348 9.391-9.946 11.348-13.794 1.956-3.848 2.934-7.663 2.934-11.446 0-5.478-1.858-9.684-5.576-12.62-3.717-2.934-9.163-4.401-16.337-4.401-6 0-11.413 1.141-16.239 3.424-4.826 2.282-8.87 5.706-12.13 10.271l-23.087-14.87c5.348-7.956 12.717-14.184 22.108-18.684 9.392-4.5 20.153-6.75 32.283-6.75 10.174 0 19.076 1.663 26.707 4.99 7.63 3.325 13.565 8.02 17.804 14.086 4.24 6.065 6.359 13.207 6.359 21.424 0 7.435-1.566 14.413-4.696 20.935-3.13 6.522-9.196 13.956-18.196 22.304l-31.5 29.74h58.892z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#6B3275" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563z"/><path fill="#FFF" d="M145.891 129.717c19.305 0 33.555 3.848 42.75 11.544 9.196 7.696 13.794 18 13.794 30.913 0 8.348-2.087 15.946-6.261 22.793-4.174 6.848-10.533 12.326-19.076 16.435-8.544 4.109-19.076 6.163-31.598 6.163-9.652 0-19.141-1.272-28.467-3.815-9.327-2.543-17.25-6.163-23.772-10.859l12.522-24.26c5.217 3.912 11.217 6.945 18 9.097a68.807 68.807 0 0 0 20.934 3.229c7.957 0 14.218-1.566 18.783-4.696 4.565-3.13 6.848-7.5 6.848-13.109 0-5.87-2.38-10.304-7.141-13.304s-13.011-4.5-24.75-4.5h-35.022l7.043-77.087h83.544v25.435h-57.13l-2.153 26.021h11.152z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#7F465B" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563z"/><path fill="#FFF" d="M204.783 186.457L182.478 186.457 182.478 215.217 151.565 215.217 151.565 186.457 77.804 186.457 77.804 165.13 142.37 78.261 175.63 78.261 115.761 160.63 152.543 160.63 152.543 135 182.478 135 182.478 160.63 204.783 160.63z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 790 B |
@@ -7,6 +7,9 @@
|
||||
<record id="base.partner_demo" model="res.partner">
|
||||
<field name="website_published">True</field>
|
||||
</record>
|
||||
<record id="base.partner_demo_portal" model="res.partner">
|
||||
<field name="website_published">True</field>
|
||||
</record>
|
||||
|
||||
<record id="base.res_partner_12" model="res.partner">
|
||||
<field name="website_published">True</field>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import controllers
|
||||
|
||||
@@ -2,18 +2,34 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import base64
|
||||
import werkzeug
|
||||
import werkzeug.exceptions
|
||||
import werkzeug.urls
|
||||
import werkzeug.wrappers
|
||||
|
||||
from odoo import http
|
||||
from odoo import http, modules, tools
|
||||
from odoo.http import request
|
||||
from odoo.osv import expression
|
||||
from odoo.tools import limited_image_resize
|
||||
|
||||
|
||||
class WebsiteProfile(http.Controller):
|
||||
|
||||
# Profile
|
||||
# ---------------------------------------------------
|
||||
|
||||
def _check_avatar_access(self, user_id, **post):
|
||||
""" Base condition to see user avatar independently form access rights
|
||||
is to see published users having karma, meaning they participated to
|
||||
frontend applications like forum or elearning. """
|
||||
try:
|
||||
user = request.env['res.users'].sudo().browse(user_id).exists()
|
||||
except:
|
||||
return False
|
||||
if user:
|
||||
return user.website_published and user.karma > 0
|
||||
return False
|
||||
|
||||
def _check_user_profile_access(self, user_id):
|
||||
user_sudo = request.env['res.users'].sudo().browse(user_id)
|
||||
if user_sudo.karma == 0 or not user_sudo.website_published or \
|
||||
@@ -41,6 +57,47 @@ class WebsiteProfile(http.Controller):
|
||||
'edit_button_url_param': '',
|
||||
}
|
||||
|
||||
@http.route([
|
||||
'/profile/avatar/<int:user_id>',
|
||||
], type='http', auth="public", website=True, sitemap=False)
|
||||
def get_user_profile_avatar(self, user_id=0, width=0, height=0, crop=False, avoid_if_small=False, upper_limit=False, **post):
|
||||
can_sudo = self._check_avatar_access(user_id, **post)
|
||||
fname = post.get('field', 'image_medium')
|
||||
if can_sudo:
|
||||
status, headers, content = request.env['ir.http'].sudo().binary_content(
|
||||
model='res.users', id=user_id, field=fname,
|
||||
default_mimetype='image/png')
|
||||
else:
|
||||
status, headers, content = request.env['ir.http'].binary_content(
|
||||
model='res.users', id=user_id, field=fname,
|
||||
default_mimetype='image/png')
|
||||
if status == 301:
|
||||
return request.env['ir.http']._response_by_status(status, headers, content)
|
||||
if status == 304:
|
||||
return werkzeug.wrappers.Response(status=304)
|
||||
|
||||
if not content:
|
||||
img_path = modules.get_module_resource('web', 'static/src/img', 'placeholder.png')
|
||||
with open(img_path, 'rb') as f:
|
||||
image = f.read()
|
||||
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 = fname.split('_')[-1]
|
||||
if suffix in ('small', 'medium', 'big'):
|
||||
content = getattr(tools, 'image_resize_image_%s' % suffix)(content)
|
||||
|
||||
content = limited_image_resize(
|
||||
content, width=width, height=height, crop=crop, upper_limit=upper_limit, avoid_if_small=avoid_if_small)
|
||||
|
||||
image_base64 = base64.b64decode(content)
|
||||
headers.append(('Content-Length', len(image_base64)))
|
||||
response = request.make_response(image_base64, headers)
|
||||
response.status_code = status
|
||||
return response
|
||||
|
||||
@http.route(['/profile/user/<int:user_id>'], type='http', auth="public", website=True)
|
||||
def view_user_profile(self, user_id, **post):
|
||||
user = self._check_user_profile_access(user_id)
|
||||
|
||||
@@ -44,8 +44,17 @@
|
||||
It can alse be used to modify a message
|
||||
-->
|
||||
<t t-name="website_rating.PopupComposer">
|
||||
<div>
|
||||
<button t-if="widget.options['display_composer']" type="button" class="btn btn-primary" data-toggle="modal" data-target="#ratingpopupcomposer">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<t t-call="website_rating.rating_stars_static">
|
||||
<t t-set="val" t-value="widget.rating_avg || 0"/>
|
||||
<t t-set="inline_mode" t-value="true"/>
|
||||
</t>
|
||||
<t t-if="widget.rating_total">
|
||||
<small class="font-weight-bold">(<t t-esc="widget.rating_total"/> ratings)</small>
|
||||
</t>
|
||||
</div>
|
||||
<button t-if="widget.options['display_composer']" type="button" class="btn btn-primary col" data-toggle="modal" data-target="#ratingpopupcomposer">
|
||||
<t t-if="widget.options['display_composer']">
|
||||
<t t-if="widget.options['default_message_id']">
|
||||
Modify your review
|
||||
@@ -55,15 +64,6 @@
|
||||
</t>
|
||||
</t>
|
||||
</button>
|
||||
<div>
|
||||
<t t-call="website_rating.rating_stars_static">
|
||||
<t t-set="val" t-value="widget.rating_avg || 0"/>
|
||||
<t t-set="inline_mode" t-value="true"/>
|
||||
</t>
|
||||
<t t-if="widget.rating_total">
|
||||
<t t-esc="widget.rating_avg"/> (<t t-esc="widget.rating_total"/>)
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.options['display_composer']" class="modal fade" id="ratingpopupcomposer" tabindex="-1" role="dialog" aria-labelledby="ratingpopupcomposerlabel" aria-hidden="true">
|
||||
|
||||
@@ -49,7 +49,19 @@
|
||||
the message will be posted with the identity of the partner_id of the object
|
||||
-->
|
||||
<template id="rating_stars_static_popup_composer" name="Rating: rating composer in popup">
|
||||
<div class="row d-print-none o_rating_popup_composer o_not_editable p-0" t-att-data-rating-avg="rating_avg or 0.0" t-att-data-rating-total="rating_total or 0.0" t-att-data-token="token" t-att-data-hash="hash" t-att-data-pid="pid" t-att-data-res_model="object._name" t-att-data-res_id="object.id" t-att-data-partner_id="request.env.user.partner_id.id" t-att-data-default_message="default_message" t-att-data-default_message_id="default_message_id" t-att-data-default_rating_value="default_rating_value" t-att-data-force_submit_url="force_submit_url">
|
||||
<div class="d-print-none o_rating_popup_composer o_not_editable p-0"
|
||||
t-att-data-rating-avg="rating_avg or 0.0"
|
||||
t-att-data-rating-total="rating_total or 0.0"
|
||||
t-att-data-token="token"
|
||||
t-att-data-hash="hash"
|
||||
t-att-data-pid="pid"
|
||||
t-att-data-res_model="object._name"
|
||||
t-att-data-res_id="object.id"
|
||||
t-att-data-partner_id="request.env.user.partner_id.id"
|
||||
t-att-data-default_message="default_message"
|
||||
t-att-data-default_message_id="default_message_id"
|
||||
t-att-data-default_rating_value="default_rating_value"
|
||||
t-att-data-force_submit_url="force_submit_url">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
'data': [
|
||||
'data/website_sale_slides_demo.xml',
|
||||
'views/slide_channel_views.xml',
|
||||
'views/website_slides_templates.xml',
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import slides
|
||||
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import http, _
|
||||
from odoo.exceptions import AccessError, UserError
|
||||
from odoo.http import request
|
||||
from odoo.osv import expression
|
||||
|
||||
from odoo.addons.website_slides.controllers.main import WebsiteSlides
|
||||
|
||||
|
||||
class WebsiteSaleSlides(WebsiteSlides):
|
||||
|
||||
def _prepare_additional_channel_values(self, values, **kwargs):
|
||||
values = super(WebsiteSaleSlides, self)._prepare_additional_channel_values(values, **kwargs)
|
||||
channel = values['channel']
|
||||
if channel.visibility == 'payment' and channel.product_id:
|
||||
pricelist = request.website.get_current_pricelist()
|
||||
values['product_info'] = channel.product_id.product_tmpl_id._get_combination_info(product_id=channel.product_id.id, pricelist=pricelist)
|
||||
values['product_info']['currency_id'] = request.website.currency_id
|
||||
return values
|
||||
@@ -2,45 +2,77 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="product_course" model="product.product">
|
||||
<field name="name">Furniture creation course</field>
|
||||
<field name="name">High-Level DIY Furniture</field>
|
||||
<field name="standard_price">100.0</field>
|
||||
<field name="list_price">100.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="image" type="base64" file="website_sale_slides/data/demo-thumbnails/product_course.png"/>
|
||||
<field name="image" type="base64" file="website_sale_slides/static/img/product_course.png"/>
|
||||
</record>
|
||||
|
||||
<record id="channel_on_payment" model="slide.channel">
|
||||
<field name="name">Furniture creation</field>
|
||||
<record id="slide_channel_demo_6_furn3_payment" model="slide.channel">
|
||||
<field name="name">High-Level DIY Furniture</field>
|
||||
<field name="promote_strategy">most_viewed</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="description">All you need to know about furniture creation.</field>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="visibility">payment</field>
|
||||
<field name="product_id" ref="product_course"/>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_advanced')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_carpenter')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_furniture')),
|
||||
(4, ref('website_slides.slide_channel_tag_other_2'))]"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="image" type="base64" file="website_sale_slides/static/img/channel_demo_diy.jpg"/>
|
||||
<field name="description" type="html"><div>All you need to know about furniture creation.</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_6_0" model="slide.category">
|
||||
<field name="name">Tools and Methods</field>
|
||||
<field name="channel_id" ref="website_sale_slides.slide_channel_demo_6_furn3_payment"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
<record id="slide_category_demo_6_1" model="slide.category">
|
||||
<field name="name">Hand on !</field>
|
||||
<field name="channel_id" ref="website_sale_slides.slide_channel_demo_6_furn3_payment"/>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_find_wood" model="slide.slide">
|
||||
<field name="name">How to find quality wood.</field>
|
||||
<record id="slide_slide_demo_6_0" model="slide.slide">
|
||||
<field name="name">Unforgettable Tools</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel-training-default.jpg"/>
|
||||
<field name="slide_type">presentation</field>
|
||||
<field name="channel_id" ref="slide_channel_demo_6_furn3_payment"/>
|
||||
<field name="category_id" ref="website_sale_slides.slide_category_demo_6_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">10</field>
|
||||
<field name="description" type="html"><div>Tools you will need to complete this course.</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_6_1" model="slide.slide">
|
||||
<field name="name">How to find quality wood</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=5WMqwTnZ-qs</field>
|
||||
<field name="document_id">5WMqwTnZ-qs</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_on_payment"/>
|
||||
<field name="channel_id" ref="slide_channel_demo_6_furn3_payment"/>
|
||||
<field name="category_id" ref="website_sale_slides.slide_category_demo_6_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="image" type="base64" file="website_sale_slides/data/demo-thumbnails/5WMqwTnZ-qs.png"/>
|
||||
<field name="description">Learn of to identify quality wood in order to create solid furnitures.</field>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">5</field>
|
||||
<field name="image" type="base64" file="website_sale_slides/static/img/5WMqwTnZ-qs.png"/>
|
||||
<field name="description" type="html"><div>Learn of to identify quality wood in order to create solid furnitures.</div></field>
|
||||
</record>
|
||||
|
||||
<record id="slide_create_furniture" model="slide.slide">
|
||||
<field name="name">How to create your own piece of furniture.</field>
|
||||
<record id="slide_slide_demo_6_2" model="slide.slide">
|
||||
<field name="name">How to create your own piece of furniture</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=ptjeDDoURL8</field>
|
||||
<field name="document_id">ptjeDDoURL8</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_on_payment"/>
|
||||
<field name="channel_id" ref="slide_channel_demo_6_furn3_payment"/>
|
||||
<field name="category_id" ref="website_sale_slides.slide_category_demo_6_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="image" type="base64" file="website_sale_slides/data/demo-thumbnails/ptjeDDoURL8.png"/>
|
||||
<field name="description">From a piece of wood to a fully functional furniture, step by step.</field>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">0</field>
|
||||
<field name="image" type="base64" file="website_sale_slides/static/img/ptjeDDoURL8.png"/>
|
||||
<field name="description" type="html"><div>From a piece of wood to a fully functional furniture, step by step.</div></field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo><data>
|
||||
|
||||
<template id='course_main' inherit_id="website_slides.course_main">
|
||||
<!-- Channel main template: override button to join channel -->
|
||||
<xpath expr="//div[hasclass('o_wslides_join_channel')]" position="inside">
|
||||
<t t-if="not channel.is_member and channel.visibility == 'payment'">
|
||||
<t t-if="channel.product_id.website_published">
|
||||
<h4>
|
||||
<!-- original discounted price, if any -->
|
||||
<span t-att-class="'text-danger oe_default_price %s' % ('' if product_info['has_discounted_price'] else 'd-none')"
|
||||
style="text-decoration: line-through; white-space: nowrap;"
|
||||
t-esc="product_info['list_price']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': product_info['currency_id']}"/>
|
||||
<!-- real price -->
|
||||
<b class="oe_price" style="white-space: nowrap;"
|
||||
t-esc="product_info['price']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': product_info['currency_id']}"/>
|
||||
<span itemprop="price" style="display:none;" t-esc="product_info['price']"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="product_info['currency_id'].name"/>
|
||||
</h4>
|
||||
<a role="button" class="col-10 btn btn-primary" t-att-href="channel.product_id.website_url">
|
||||
<span class="cta-title text_small_caps">Buy Course</span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<a role="button" class="col-10 btn btn-light" href="#">
|
||||
<span class="cta-title text_small_caps">Course Not Buyable</span>
|
||||
</a>
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data></odoo>
|
||||
@@ -25,6 +25,7 @@ Share and Publish Videos, Presentations and Documents'
|
||||
'data': [
|
||||
'views/assets.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/website_slides_templates_homepage.xml',
|
||||
'views/website_slides_templates.xml',
|
||||
'views/website_slides_embed_templates.xml',
|
||||
'views/slide_slide_views.xml',
|
||||
@@ -34,7 +35,8 @@ Share and Publish Videos, Presentations and Documents'
|
||||
'views/slide_channel_invite_views.xml',
|
||||
'views/website_slides_menu_views.xml',
|
||||
'views/website_slides_templates_profile.xml',
|
||||
'data/website_slides_ir_data.xml',
|
||||
'data/ir_data.xml',
|
||||
'data/gamification_data.xml',
|
||||
'data/mail_data.xml',
|
||||
'data/slide_data.xml',
|
||||
'data/website_data.xml',
|
||||
@@ -42,7 +44,10 @@ Share and Publish Videos, Presentations and Documents'
|
||||
'security/website_slides_security.xml'
|
||||
],
|
||||
'demo': [
|
||||
'data/website_slides_demo.xml'
|
||||
'data/slide_channel_tag_demo.xml',
|
||||
'data/slide_channel_demo.xml',
|
||||
'data/slide_slide_demo.xml',
|
||||
'data/slide_user_demo.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import base64
|
||||
import itertools
|
||||
import logging
|
||||
import werkzeug
|
||||
|
||||
@@ -21,10 +22,10 @@ _logger = logging.getLogger(__name__)
|
||||
class WebsiteSlides(WebsiteProfile):
|
||||
_slides_per_page = 12
|
||||
_slides_per_list = 20
|
||||
_order_by_criterion = {
|
||||
'date': 'date_published desc',
|
||||
_channel_order_by_criterion = {
|
||||
'vote': 'total_votes desc',
|
||||
'view': 'total_views desc',
|
||||
'vote': 'likes desc',
|
||||
'date': 'create_date desc',
|
||||
}
|
||||
|
||||
def sitemap_slide(env, rule, qs):
|
||||
@@ -47,13 +48,6 @@ class WebsiteSlides(WebsiteProfile):
|
||||
slide.action_set_viewed()
|
||||
return True
|
||||
|
||||
def _prepare_user_values(self, **kwargs):
|
||||
values = super(WebsiteSlides, self)._prepare_user_values(**kwargs)
|
||||
channel = self._get_channels(**kwargs)
|
||||
if channel:
|
||||
values['channel'] = channel
|
||||
return values
|
||||
|
||||
def _get_slide_detail(self, slide):
|
||||
most_viewed_slides = slide.get_most_viewed_slides(self._slides_per_list)
|
||||
related_slides = slide.get_related_slides(self._slides_per_list)
|
||||
@@ -66,57 +60,144 @@ class WebsiteSlides(WebsiteProfile):
|
||||
'comments': slide.website_message_ids or [],
|
||||
}
|
||||
|
||||
def _extract_channel_tag_search(self, **post):
|
||||
tags = request.env['slide.channel.tag']
|
||||
for key in (_key for _key in post if _key.startswith('channel_tag_group_id_')):
|
||||
group_id, tag_id = False, False
|
||||
try:
|
||||
group_id = int(key.lstrip('channel_tag_group_id_'))
|
||||
tag_id = int(post[key])
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
search_tag = request.env['slide.channel.tag'].search([('id', '=', tag_id), ('group_id', '=', group_id)]).exists()
|
||||
if search_tag:
|
||||
tags |= search_tag
|
||||
return tags
|
||||
|
||||
def _build_channel_domain(self, base_domain, **post):
|
||||
search_term = post.get('search')
|
||||
category_id = post.get('category_id')
|
||||
channel_tag_id = post.get('channel_tag_id')
|
||||
tags = self._extract_channel_tag_search(**post)
|
||||
|
||||
domain = base_domain
|
||||
if search_term:
|
||||
domain = expression.AND([
|
||||
domain,
|
||||
['|', ('name', 'ilike', search_term), ('description', 'ilike', search_term)]])
|
||||
if category_id:
|
||||
domain = expression.AND([domain, [('category_ids', 'in', [category_id])]])
|
||||
elif channel_tag_id:
|
||||
domain = expression.AND([domain, [('tag_ids', 'in', [channel_tag_id])]])
|
||||
elif tags:
|
||||
domain = expression.AND([domain, [('tag_ids', 'in', tags.ids)]])
|
||||
return domain
|
||||
|
||||
# --------------------------------------------------
|
||||
# MAIN / SEARCH
|
||||
# --------------------------------------------------
|
||||
|
||||
@http.route('/slides', type='http', auth="public", website=True)
|
||||
def slides_index(self, *args, **post):
|
||||
""" Returns a list of available channels: if only one is available,
|
||||
redirects directly to its slides
|
||||
"""
|
||||
def slides_channel_home(self, **post):
|
||||
""" Home page for eLearning platform. Is mainly a container page, does not allow search / filter. """
|
||||
domain = request.website.website_domain()
|
||||
# search bar
|
||||
search_term = post.get('search')
|
||||
if search_term:
|
||||
domain = expression.AND([domain, ['|', ('name', 'ilike', search_term), ('description', 'ilike', search_term)]])
|
||||
channels_all = request.env['slide.channel'].search(domain)
|
||||
if not request.env.user._is_public():
|
||||
channels_my = channels_all.filtered(lambda channel: channel.completion > 0).sorted('completion', reverse=True)[:3]
|
||||
else:
|
||||
channels_my = request.env['slide.channel']
|
||||
channels_popular = channels_all.sorted('total_votes', reverse=True)[:3]
|
||||
channels_newest = channels_all.sorted('create_date', reverse=True)[:3]
|
||||
|
||||
channels = request.env['slide.channel'].search(domain, order='sequence, id')
|
||||
if not channels:
|
||||
return request.render("website_slides.channel_not_found", {'search_term': search_term})
|
||||
elif len(channels) == 1 and not search_term: # don't auto redirect to only result when searching
|
||||
return request.redirect("/slides/%s" % channels.id)
|
||||
return request.render('website_slides.channels', {
|
||||
'channels': channels,
|
||||
# fetch 'latests achievements' for non logged people
|
||||
if request.env.user._is_public():
|
||||
achievements = request.env['gamification.badge.user'].sudo().search([], limit=5)
|
||||
challenges = None
|
||||
challenges_done = None
|
||||
else:
|
||||
achievements = None
|
||||
challenges = request.env['gamification.challenge'].sudo().search([('category', '=', 'slides')], order='id asc', limit=5)
|
||||
challenges_done = request.env['gamification.badge.user'].sudo().search([
|
||||
('challenge_id', 'in', challenges.ids),
|
||||
('user_id', '=', request.env.user.id)
|
||||
]).mapped('challenge_id')
|
||||
|
||||
# fetch 'heroes of the week' for non logged people
|
||||
if request.env.user._is_public():
|
||||
users = request.env['res.users'].sudo().search([
|
||||
('karma', '>', 0),
|
||||
('website_published', '=', True)], limit=5, order='create_date desc')
|
||||
else:
|
||||
users = None
|
||||
|
||||
return request.render('website_slides.courses_home', {
|
||||
'user': request.env.user,
|
||||
'is_public_user': request.website.is_public_user(),
|
||||
'search_term': search_term,
|
||||
'channels_my': channels_my,
|
||||
'channels_popular': channels_popular,
|
||||
'channels_newest': channels_newest,
|
||||
'achievements': achievements,
|
||||
'users': users,
|
||||
'challenges': challenges,
|
||||
'challenges_done': challenges_done,
|
||||
})
|
||||
|
||||
@http.route('/slides/all', type='http', auth="public", website=True)
|
||||
def slides_channel_all(self, **post):
|
||||
""" Home page displaying a list of courses displayed according to some
|
||||
criterion and search terms.
|
||||
|
||||
: param dict post: post parameters, including
|
||||
* search_term: keywords entered in the search box, used to filter on slide content;
|
||||
* category_id: id of a slide.category;
|
||||
* channel_tag_id: id of a channel.tag;
|
||||
"""
|
||||
domain = request.website.website_domain()
|
||||
domain = self._build_channel_domain(domain, **post)
|
||||
|
||||
order = self._channel_order_by_criterion.get(post.get('sorting', 'date'), 'create_date desc')
|
||||
|
||||
channels = request.env['slide.channel'].search(domain, order=order)
|
||||
channels_layouted = list(itertools.zip_longest(*[iter(channels)] * 4, fillvalue=None))
|
||||
|
||||
tag_groups = request.env['slide.channel.tag.group'].search(['&', ('tag_ids', '!=', False), ('website_published', '=', True)])
|
||||
search_tags = self._extract_channel_tag_search(**post)
|
||||
|
||||
return request.render('website_slides.courses_all', {
|
||||
'user': request.env.user,
|
||||
'is_public_user': request.website.is_public_user(),
|
||||
'channels_layouted': channels_layouted,
|
||||
'tag_groups': tag_groups,
|
||||
'search_term': post.get('search'),
|
||||
'search_tags': search_tags,
|
||||
})
|
||||
|
||||
def _prepare_additional_channel_values(self, values, **kwargs):
|
||||
return values
|
||||
|
||||
@http.route([
|
||||
'''/slides/<model("slide.channel"):channel>''',
|
||||
'''/slides/<model("slide.channel"):channel>/page/<int:page>''',
|
||||
|
||||
'''/slides/<model("slide.channel"):channel>/<string:slide_type>''',
|
||||
'''/slides/<model("slide.channel"):channel>/<string:slide_type>/page/<int:page>''',
|
||||
|
||||
'''/slides/<model("slide.channel"):channel>/tag/<model("slide.tag"):tag>''',
|
||||
'''/slides/<model("slide.channel"):channel>/tag/<model("slide.tag"):tag>/page/<int:page>''',
|
||||
'''/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>''',
|
||||
'''/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>/page/<int:page>''',
|
||||
|
||||
'''/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>/<string:slide_type>''',
|
||||
'''/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>/<string:slide_type>/page/<int:page>'''],
|
||||
type='http', auth="public", website=True, sitemap=sitemap_slide)
|
||||
def channel(self, channel, category=None, tag=None, page=1, slide_type=None, sorting='creation', search=None, **kw):
|
||||
'/slides/<model("slide.channel"):channel>',
|
||||
'/slides/<model("slide.channel"):channel>/page/<int:page>',
|
||||
'/slides/<model("slide.channel"):channel>/tag/<model("slide.tag"):tag>',
|
||||
'/slides/<model("slide.channel"):channel>/tag/<model("slide.tag"):tag>/page/<int:page>',
|
||||
'/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>',
|
||||
'/slides/<model("slide.channel"):channel>/category/<model("slide.category"):category>/page/<int:page>'
|
||||
], type='http', auth="public", website=True, sitemap=sitemap_slide)
|
||||
def channel(self, channel, category=None, tag=None, page=1, slide_type=None, sorting=None, search=None, **kw):
|
||||
if not channel.can_access_from_current_website():
|
||||
raise werkzeug.exceptions.NotFound()
|
||||
|
||||
user = request.env.user
|
||||
Slide = request.env['slide.slide']
|
||||
domain = [('channel_id', '=', channel.id)]
|
||||
if not request.env.user.has_group('website.group_website_publisher'):
|
||||
domain = expression.AND([
|
||||
domain,
|
||||
['&', ('website_published', '=', True), ('channel_id.website_published', '=', True)]
|
||||
])
|
||||
|
||||
pager_url = "/slides/%s" % (channel.id)
|
||||
pager_args = {}
|
||||
slide_types = dict(request.env['slide.slide']._fields['slide_type']._description_selection(request.env))
|
||||
|
||||
if search:
|
||||
domain += [
|
||||
@@ -135,35 +216,42 @@ class WebsiteSlides(WebsiteProfile):
|
||||
pager_url += "/tag/%s" % tag.id
|
||||
if slide_type:
|
||||
domain += [('slide_type', '=', slide_type)]
|
||||
pager_url += "/%s" % slide_type
|
||||
pager_url += "?slide_type=%s" % slide_type
|
||||
|
||||
if not sorting or sorting not in self._order_by_criterion:
|
||||
sorting = 'date'
|
||||
order = self._order_by_criterion[sorting]
|
||||
pager_args['sorting'] = sorting
|
||||
# sorting criterion
|
||||
actual_sorting = sorting if sorting and sorting in request.env['slide.slide']._order_by_strategy else channel.promote_strategy
|
||||
order = request.env['slide.slide']._order_by_strategy[actual_sorting]
|
||||
pager_args['sorting'] = actual_sorting
|
||||
|
||||
pager_count = Slide.search_count(domain)
|
||||
pager_count = request.env['slide.slide'].sudo().search_count(domain)
|
||||
pager = request.website.pager(url=pager_url, total=pager_count, page=page,
|
||||
step=self._slides_per_page, scope=self._slides_per_page,
|
||||
url_args=pager_args)
|
||||
|
||||
slides = Slide.search(domain, limit=self._slides_per_page, offset=pager['offset'], order=order)
|
||||
values = {
|
||||
'channel': channel,
|
||||
'category': category,
|
||||
'slides': slides,
|
||||
'tag': tag,
|
||||
'slide_type': slide_type,
|
||||
'sorting': sorting,
|
||||
# search
|
||||
'search_category': category,
|
||||
'search_tag': tag,
|
||||
'search_slide_type': slide_type,
|
||||
'slide_types': slide_types,
|
||||
'sorting': actual_sorting,
|
||||
'search': search,
|
||||
'user': user,
|
||||
'pager': pager,
|
||||
'is_public_user': request.website.is_public_user(),
|
||||
# chatter
|
||||
'rating_avg': channel.rating_avg,
|
||||
'rating_count': channel.rating_count,
|
||||
# display data
|
||||
'user': request.env.user,
|
||||
'pager': pager,
|
||||
'is_public_user': request.website.is_public_user(),
|
||||
}
|
||||
if not request.env.user._is_public():
|
||||
last_message_values = request.env['mail.message'].search([('model', '=', channel._name), ('res_id', '=', channel.id), ('author_id', '=', user.partner_id.id), ('website_published', '=', True)], order='write_date DESC', limit=1).read(['body', 'rating_value'])
|
||||
last_message_values = request.env['mail.message'].search([
|
||||
('model', '=', channel._name),
|
||||
('res_id', '=', channel.id),
|
||||
('author_id', '=', request.env.user.partner_id.id),
|
||||
('website_published', '=', True)
|
||||
], order='write_date DESC', limit=1).read(['body', 'rating_value'])
|
||||
last_message_data = last_message_values[0] if last_message_values else {}
|
||||
values.update({
|
||||
'message_post_hash': channel._sign_token(request.env.user.partner_id.id),
|
||||
@@ -174,21 +262,32 @@ class WebsiteSlides(WebsiteProfile):
|
||||
})
|
||||
|
||||
# Display uncategorized slides
|
||||
if not slide_type and not category:
|
||||
category_datas = []
|
||||
for category in Slide.read_group(domain, ['category_id'], ['category_id']):
|
||||
# fetch slides; done as sudo because we want to display all of them but
|
||||
# unreachable ones won't be clickable (+ slide controller will crash anyway)
|
||||
if not category:
|
||||
category_data = []
|
||||
for category in request.env['slide.slide'].sudo().read_group(domain, ['category_id'], ['category_id']):
|
||||
category_id, name = category.get('category_id') or (False, _('Uncategorized'))
|
||||
category_datas.append({
|
||||
category_data.append({
|
||||
'id': category_id,
|
||||
'name': name,
|
||||
'total_slides': category['category_id_count'],
|
||||
'slides': Slide.search(category['__domain'], limit=4, offset=0, order=order)
|
||||
'slides': request.env['slide.slide'].sudo().search(category['__domain'], limit=4, offset=0, order=order)
|
||||
})
|
||||
values.update({
|
||||
'category_datas': category_datas,
|
||||
})
|
||||
else:
|
||||
slides_sudo = request.env['slide.slide'].sudo().search(domain, limit=self._slides_per_page, offset=pager['offset'], order=order)
|
||||
category_data = [{
|
||||
'id': category.id,
|
||||
'name': category.name,
|
||||
'total_slides': len(slides_sudo),
|
||||
'slides': slides_sudo,
|
||||
}]
|
||||
values['slide_promoted'] = request.env['slide.slide'].sudo().search(domain, limit=1, order=order)
|
||||
values['category_data'] = category_data
|
||||
|
||||
return request.render('website_slides.home', values)
|
||||
values = self._prepare_additional_channel_values(values, **kw)
|
||||
|
||||
return request.render('website_slides.course_main', values)
|
||||
|
||||
@http.route(['/slides/channel/add'], type='http', auth='user', methods=['POST'], website=True)
|
||||
def slide_channel_create(self, *args, **kw):
|
||||
@@ -411,8 +510,17 @@ class WebsiteSlides(WebsiteProfile):
|
||||
# if the slide can be embedded, and properly display the error message.
|
||||
return request.render('website_slides.embed_slide_forbidden', {})
|
||||
|
||||
# Profile
|
||||
# ---------------------------------------------------
|
||||
# --------------------------------------------------
|
||||
# PROFILE
|
||||
# --------------------------------------------------
|
||||
|
||||
def _prepare_user_values(self, **kwargs):
|
||||
values = super(WebsiteSlides, self)._prepare_user_values(**kwargs)
|
||||
channel = self._get_channels(**kwargs)
|
||||
if channel:
|
||||
values['channel'] = channel
|
||||
return values
|
||||
|
||||
def _get_channels(self, **kwargs):
|
||||
channels = []
|
||||
if kwargs.get('channel'):
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="0">
|
||||
|
||||
<!-- Get started: register to the platform -->
|
||||
<record id="badge_data_register" model="gamification.badge">
|
||||
<field name="name">Get started</field>
|
||||
<field name="description">Register to the platform</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="level">bronze</field>
|
||||
<field name="rule_auth">nobody</field>
|
||||
</record>
|
||||
<record id="badge_data_register_goal" model="gamification.goal.definition">
|
||||
<field name="name">Get started</field>
|
||||
<field name="description">Register to the platform</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="display_mode">boolean</field>
|
||||
<field name="model_id" eval="ref('base.model_res_users')"/>
|
||||
<field name="condition">higher</field>
|
||||
<field name="domain">[
|
||||
('active', '!=', False),
|
||||
('karma', '>', 0),
|
||||
]</field>
|
||||
<field name="batch_mode">True</field>
|
||||
<field name="batch_distinctive_field" eval="ref('base.field_res_users__id')"/>
|
||||
<field name="batch_user_expression">user.id</field>
|
||||
</record>
|
||||
<record id="badge_data_register_challenge" model="gamification.challenge">
|
||||
<field name="name">Register to the platform</field>
|
||||
<field name="category">slides</field>
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="reward_id" eval="ref('badge_data_register')"/>
|
||||
<field name="reward_realtime">True</field>
|
||||
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
<record id="badge_data_register_challenge_line_0" model="gamification.challenge.line">
|
||||
<field name="definition_id" eval="ref('badge_data_register_goal')"/>
|
||||
<field name="challenge_id" eval="ref('badge_data_register_challenge')"/>
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
|
||||
<!-- Know yourself: complete your profile -->
|
||||
<record id="badge_data_profile" model="gamification.badge">
|
||||
<field name="name">Know yourself</field>
|
||||
<field name="description">Complete your profile</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="level">bronze</field>
|
||||
<field name="rule_auth">nobody</field>
|
||||
</record>
|
||||
<record id="badge_data_profile_goal" model="gamification.goal.definition">
|
||||
<field name="name">Know yourself</field>
|
||||
<field name="description">Complete your profile</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="display_mode">boolean</field>
|
||||
<field name="model_id" eval="ref('base.model_res_users')"/>
|
||||
<field name="condition">higher</field>
|
||||
<field name="domain">[
|
||||
('partner_id.country_id', '!=', False),
|
||||
('partner_id.city', '!=', False),
|
||||
('partner_id.email', '!=', False)
|
||||
]</field>
|
||||
<field name="batch_mode">True</field>
|
||||
<field name="batch_distinctive_field" eval="ref('base.field_res_users__id')"/>
|
||||
<field name="batch_user_expression">user.id</field>
|
||||
</record>
|
||||
<record id="badge_data_profile_challenge" model="gamification.challenge">
|
||||
<field name="name">Complete your profile</field>
|
||||
<field name="category">slides</field>
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="reward_id" eval="ref('badge_data_profile')"/>
|
||||
<field name="reward_realtime">True</field>
|
||||
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
<record id="badge_data_profile_challenge_line_0" model="gamification.challenge.line">
|
||||
<field name="definition_id" eval="ref('badge_data_profile_goal')"/>
|
||||
<field name="challenge_id" eval="ref('badge_data_profile_challenge')"/>
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
|
||||
<!-- Power User: complete a course -->
|
||||
<record id="badge_data_course" model="gamification.badge">
|
||||
<field name="name">Power User</field>
|
||||
<field name="description">Complete a course</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/standard_badge_silver.svg"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="level">silver</field>
|
||||
<field name="rule_auth">nobody</field>
|
||||
</record>
|
||||
<record id="badge_data_course_goal" model="gamification.goal.definition">
|
||||
<field name="name">Power User</field>
|
||||
<field name="description">Complete a course</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="display_mode">boolean</field>
|
||||
<field name="model_id" eval="ref('website_slides.model_slide_channel_partner')"/>
|
||||
<field name="condition">higher</field>
|
||||
<field name="domain">[
|
||||
('completed', '=', True)
|
||||
]</field>
|
||||
<field name="batch_mode">True</field>
|
||||
<field name="batch_distinctive_field" eval="ref('website_slides.field_slide_channel_partner__partner_id')"/>
|
||||
<field name="batch_user_expression">user.partner_id.id</field>
|
||||
</record>
|
||||
<record id="badge_data_course_challenge" model="gamification.challenge">
|
||||
<field name="name">Complete a course</field>
|
||||
<field name="category">slides</field>
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="reward_id" eval="ref('badge_data_course')"/>
|
||||
<field name="reward_realtime">True</field>
|
||||
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
<record id="badge_data_course_challenge_line_0" model="gamification.challenge.line">
|
||||
<field name="definition_id" eval="ref('badge_data_course_goal')"/>
|
||||
<field name="challenge_id" eval="ref('badge_data_course_challenge')"/>
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
|
||||
<!-- Certified Knowledge: get a certification -->
|
||||
<record id="badge_data_certification" model="gamification.badge">
|
||||
<field name="name">Certified Knowledge</field>
|
||||
<field name="description">Get a certification</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/>
|
||||
<field name="website_published" eval="False"/>
|
||||
<field name="level">gold</field>
|
||||
<field name="rule_auth">nobody</field>
|
||||
</record>
|
||||
<record id="badge_data_certification_goal" model="gamification.goal.definition">
|
||||
<field name="name">Certified Knowledge</field>
|
||||
<field name="description">Get a certification</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="display_mode">boolean</field>
|
||||
<field name="model_id" eval="ref('website_slides.model_slide_channel_partner')"/>
|
||||
<field name="condition">higher</field>
|
||||
<field name="domain">[
|
||||
('completed', '=', True),
|
||||
(0, '=', 1)
|
||||
]</field>
|
||||
<field name="batch_mode">True</field>
|
||||
<field name="batch_distinctive_field" eval="ref('website_slides.field_slide_channel_partner__partner_id')"/>
|
||||
<field name="batch_user_expression">user.partner_id.id</field>
|
||||
</record>
|
||||
<record id="badge_data_certification_challenge" model="gamification.challenge">
|
||||
<field name="name">Get a certification</field>
|
||||
<field name="category">slides</field>
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="reward_id" eval="ref('badge_data_certification')"/>
|
||||
<field name="reward_realtime">True</field>
|
||||
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
<record id="badge_data_certification_challenge_line_0" model="gamification.challenge.line">
|
||||
<field name="definition_id" eval="ref('badge_data_certification_goal')"/>
|
||||
<field name="challenge_id" eval="ref('badge_data_certification_challenge')"/>
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
|
||||
<!-- Community hero: read 2000 XP -->
|
||||
<record id="badge_data_karma" model="gamification.badge">
|
||||
<field name="name">Community hero</field>
|
||||
<field name="description">Reach 2000 XP</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="level">gold</field>
|
||||
<field name="rule_auth">nobody</field>
|
||||
</record>
|
||||
<record id="badge_data_karma_goal" model="gamification.goal.definition">
|
||||
<field name="name">Community hero</field>
|
||||
<field name="description">Reach 2000 XP</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="display_mode">boolean</field>
|
||||
<field name="model_id" eval="ref('base.model_res_users')"/>
|
||||
<field name="condition">higher</field>
|
||||
<field name="domain">[
|
||||
('karma', '>=', 2000)
|
||||
]</field>
|
||||
<field name="batch_mode">True</field>
|
||||
<field name="batch_distinctive_field" eval="ref('base.field_res_users__id')"/>
|
||||
<field name="batch_user_expression">user.id</field>
|
||||
</record>
|
||||
<record id="badge_data_karma_challenge" model="gamification.challenge">
|
||||
<field name="name">Read 2000 XP</field>
|
||||
<field name="category">slides</field>
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="reward_id" eval="ref('badge_data_karma')"/>
|
||||
<field name="reward_realtime">True</field>
|
||||
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
<record id="badge_data_karma_challenge_line_0" model="gamification.challenge.line">
|
||||
<field name="definition_id" eval="ref('badge_data_karma_goal')"/>
|
||||
<field name="challenge_id" eval="ref('badge_data_karma_challenge')"/>
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="0">
|
||||
|
||||
<record id="website_slides.channel_public" model="slide.channel">
|
||||
<field name="name">Basics of Gardening</field>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="promote_strategy">latest</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_basic')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_gardener')),
|
||||
(4, ref('website_slides.slide_channel_tag_other_0'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_gardening.jpg"/>
|
||||
<field name="description" type="html">
|
||||
<div>Learn the basics of gardening !</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_0_0" model="slide.category">
|
||||
<field name="name">Requirements</field>
|
||||
<field name="channel_id" ref="website_slides.channel_public"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
<record id="slide_category_demo_0_1" model="slide.category">
|
||||
<field name="name">Tools</field>
|
||||
<field name="channel_id" ref="website_slides.channel_public"/>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_demo_1_gard1" model="slide.channel">
|
||||
<field name="name">Taking care of Trees</field>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_gardener'))]"/>
|
||||
<field name="promote_strategy">latest</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">public</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_gardening_2.jpg"/>
|
||||
<field name="description" type="html">
|
||||
<div>In this training you will learn how to take care of trees: when to plant, potted trees, ...</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_1_0" model="slide.category">
|
||||
<field name="name">Interesting Facts</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
<record id="slide_category_demo_1_1" model="slide.category">
|
||||
<field name="name">Methods</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_demo_2_gard2" model="slide.channel">
|
||||
<field name="name">Trees, Wood and Gardens</field>
|
||||
<field name="channel_type">documentation</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_gardener')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_carpenter')),
|
||||
(4, ref('website_slides.slide_channel_tag_other_2'))]"/>
|
||||
<field name="promote_strategy">most_viewed</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">public</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_flowers.jpg"/>
|
||||
<field name="description" type="html">
|
||||
<div>A lot of nice documentation: trees, wood, gardens. After that you will know everything.</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_2_0" model="slide.category">
|
||||
<field name="name">Trees</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
<record id="slide_category_demo_2_1" model="slide.category">
|
||||
<field name="name">Wood</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_demo_3_furn0" model="slide.channel">
|
||||
<field name="name">Choose your wood !</field>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_gardener')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_carpenter')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_furniture')),
|
||||
(4, ref('website_slides.slide_channel_tag_other_1'))]"/>
|
||||
<field name="promote_strategy">latest</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">public</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_flowers.jpg"/>
|
||||
<field name="description" type="html">
|
||||
<div>Knowing which kind of wood to use depending on your application is important. In this course you
|
||||
will learn the basics of wood characteristics.</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_3_0" model="slide.category">
|
||||
<field name="name">Introduction</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_3_furn0"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_demo_4_furn1" model="slide.channel">
|
||||
<field name="name">Furniture Technical Specifications</field>
|
||||
<field name="channel_type">documentation</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_furniture'))]"/>
|
||||
<field name="promote_strategy">most_voted</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">invite</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
|
||||
<field name="description" type="html">
|
||||
<div>We're also Santa Claus! Belligerent and numerous. I am the man with no name,
|
||||
Zapp Brannigan! </div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_4_0" model="slide.category">
|
||||
<field name="name">Introduction</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_demo_5_furn2" model="slide.channel">
|
||||
<field name="name">Basics of Furniture Creation</field>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="tag_ids" eval="[(5, 0),
|
||||
(4, ref('website_slides.slide_channel_tag_level_basic')),
|
||||
(4, ref('website_slides.slide_channel_tag_role_furniture')),
|
||||
(4, ref('website_slides.slide_channel_tag_other_1'))]"/>
|
||||
<field name="channel_type">training</field>
|
||||
<field name="promote_strategy">latest</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">invite</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
|
||||
<field name="description" type="html"><div>All you need to know about furniture creation.</div></field>
|
||||
</record>
|
||||
<record id="slide_category_demo_5_0" model="slide.category">
|
||||
<field name="name">Introduction</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_tag_demo_0" model="slide.tag">
|
||||
<field name="name">Tag0</field>
|
||||
</record>
|
||||
<record id="slide_tag_demo_1" model="slide.tag">
|
||||
<field name="name">Tag1</field>
|
||||
</record>
|
||||
<record id="slide_tag_demo_2" model="slide.tag">
|
||||
<field name="name">Tag2</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_tag_demo_tools" model="slide.tag">
|
||||
<field name="name">Tools</field>
|
||||
</record>
|
||||
<record id="slide_tag_demo_colorfull" model="slide.tag">
|
||||
<field name="name">Colorfull</field>
|
||||
</record>
|
||||
<record id="slide_tag_demo_howto" model="slide.tag">
|
||||
<field name="name">HowTo</field>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
<record id="slide_channel_tag_group_level" model="slide.channel.tag.group">
|
||||
<field name="name">Your Level</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_level_basic" model="slide.channel.tag">
|
||||
<field name="name">Basic</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_level_intermediate" model="slide.channel.tag">
|
||||
<field name="name">Intermediate</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_level_advanced" model="slide.channel.tag">
|
||||
<field name="name">Advanced</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_tag_group_role" model="slide.channel.tag.group">
|
||||
<field name="name">Your Role</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_role_gardener" model="slide.channel.tag">
|
||||
<field name="name">Gardener</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_role_carpenter" model="slide.channel.tag">
|
||||
<field name="name">Carpenter</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_role_furniture" model="slide.channel.tag">
|
||||
<field name="name">Furniture Designer</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_tag_other_0" model="slide.channel.tag">
|
||||
<field name="name">Quiz</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_other_1" model="slide.channel.tag">
|
||||
<field name="name">Certification</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||
</record>
|
||||
<record id="slide_channel_tag_other_2" model="slide.channel.tag">
|
||||
<field name="name">Dog Friendly</field>
|
||||
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||
</record>
|
||||
</data></odoo>
|
||||
@@ -2,18 +2,11 @@
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record model="slide.channel" id="channel_public">
|
||||
<field name="name">Public Channel</field>
|
||||
<field name="name">Our documentation</field>
|
||||
<field name="promote_strategy">most_viewed</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="visibility">public</field>
|
||||
<field name="description">Default channel for slides, all public users can access content of this channel.</field>
|
||||
</record>
|
||||
<record model="slide.channel" id="channel_invite">
|
||||
<field name="name">Private Channel</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="upload_group_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="visibility">invite</field>
|
||||
<field name="description">Used to publish slides in partner network privately.</field>
|
||||
<field name="description">Public access to presentations and documentation.</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_channel_tag_group_data_other" model="slide.channel.tag.group">
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="0">
|
||||
|
||||
<record id="slide_slide_demo_0_0" model="slide.slide">
|
||||
<field name="name">Know-How Summary</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel-training-default.jpg"/>
|
||||
<field name="slide_type">presentation</field>
|
||||
<field name="channel_id" ref="website_slides.channel_public"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_0_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="public_views">40</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_tools')), (4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||
<field name="description" type="html"><div>A summary of know-how: how and what.</div></field>
|
||||
</record>
|
||||
|
||||
<record id="slide_slide_demo_1_0" model="slide.slide">
|
||||
<field name="name">Tree Infographic</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_1.jpg"/>
|
||||
<field name="slide_type">infographic</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="public_views">5</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorfull'))]"/>
|
||||
<field name="description" type="html"><div>Just some basics Tree Infographic.</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_1_1" model="slide.slide">
|
||||
<field name="name">Interesting Tree Facts</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_2.jpg"/>
|
||||
<field name="slide_type">infographic</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="public_views">10</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorfull'))]"/>
|
||||
<field name="description" type="html"><div>Just some basics Interesting Tree Facts.</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_1_2" model="slide.slide">
|
||||
<field name="name">Energy Efficiency Facts</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_3.jpg"/>
|
||||
<field name="slide_type">infographic</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">15</field>
|
||||
<field name="tag_ids" eval="[(5, 0)]"/>
|
||||
<field name="description" type="html"><div>Just some basics Energy Efficiency Facts.</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_1_3" model="slide.slide">
|
||||
<field name="name">How to plant a potted tree</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=QYmgrw0PgLU</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_thumb_QYmgrw0PgLU.jpg"/>
|
||||
<field name="document_id">QYmgrw0PgLU</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">0</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||
<field name="description" type="html"><div>Jim and Todd plant a potted tree for a customer of Knecht's Nurseries and Landscaping. Narrated by Leif Knecht, owner.</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_1_4" model="slide.slide">
|
||||
<field name="name">A little chat with Harry Potted</field>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_1.jpg"/>
|
||||
<field name="slide_type">webpage</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_1"/>
|
||||
<field name="html_content" type="html">
|
||||
<section class="s_cover parallax bg-black-50 pt16 pb16" data-scroll-background-ratio="0" style="background-image: none;">
|
||||
<span class="s_parallax_bg oe_img_bg oe_custom_bg" style="background-image: url('/website_slides/static/src/img/slide_demo_tree_img_1.jpg'); background-position: 50% 0;"></span>
|
||||
<div class="container">
|
||||
<div class="row s_nb_column_fixed">
|
||||
<div class="col-lg-12 s_title">
|
||||
<h1 class="s_title_thin o_default_snippet_text" style="font-size: 62px; text-align: center;">Catchy Headline</h1>
|
||||
</div>
|
||||
<div class="col-lg-12 s_text pt16 pb16">
|
||||
<p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p>
|
||||
</div>
|
||||
<div class="col-lg-12 s_btn text-center pt16 pb16">
|
||||
<a href="/aboutus" class="btn btn-delta rounded-circle o_default_snippet_text">About us</a>
|
||||
<a href="/contactus" class="btn btn-primary rounded-circle o_default_snippet_text">Contact us</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="s_text_image pt32 pb32">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6 pt16 pb16">
|
||||
<img src="/website_slides/static/src/img/slide_demo_tree_img_2.jpg" class="img img-fluid mx-auto" alt="Odoo • Image and Text"/>
|
||||
</div>
|
||||
<div class="col-lg-6 pt16 pb16">
|
||||
<h2 class="o_default_snippet_text">Section Subtitle</h2>
|
||||
<p class="o_default_snippet_text">Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p>
|
||||
<p class="o_default_snippet_text">Start with the customer – find out what they want and give it to them.</p>
|
||||
<div class="s_btn text-left pt16 pb16">
|
||||
<a href="#" class="btn btn-outline-primary o_default_snippet_text">Discover more</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section></field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">5</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||
<field name="description" type="html"><div>We had a little chat with Harry Potted, sure he had interesting things to say !</div></field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_1_5" model="slide.slide">
|
||||
<field name="name">3 Main Methodologies</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/channel-training-default.jpg"/>
|
||||
<field name="slide_type">presentation</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_1_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="public_views">20</field>
|
||||
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||
<field name="description" type="html"><div>A summary of know-how: how and what.</div></field>
|
||||
</record>
|
||||
|
||||
<record id="slide_slide_demo_5_0" model="slide.slide">
|
||||
<field name="name">How to find quality wood</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=5WMqwTnZ-qs</field>
|
||||
<field name="document_id">5WMqwTnZ-qs</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_5_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="False"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_thumb_5WMqwTnZ-qs.jpg"/>
|
||||
<field name="description">Learn of to identify quality wood in order to create solid furnitures.</field>
|
||||
</record>
|
||||
<record id="slide_slide_demo_5_1" model="slide.slide">
|
||||
<field name="name">How to create your own piece of furniture</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=ptjeDDoURL8</field>
|
||||
<field name="document_id">ptjeDDoURL8</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||
<field name="category_id" ref="website_slides.slide_category_demo_5_0"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/slide_demo_thumb_ptjeDDoURL8.jpg"/>
|
||||
<field name="description">From a piece of wood to a fully functional furniture, step by step.</field>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="0">
|
||||
|
||||
<record id="slide_channel_1_partner_admin" model="slide.channel.partner">
|
||||
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="partner_id" ref="base.partner_admin"/>
|
||||
</record>
|
||||
<record id="slide_slide_1_0_partner_admin" model="slide.slide.partner">
|
||||
<field name="slide_id" ref="website_slides.slide_slide_demo_1_0"/>
|
||||
<field name="partner_id" ref="base.partner_admin"/>
|
||||
<field name="completed" eval="True"/>
|
||||
</record>
|
||||
<record id="slide_slide_1_1_partner_admin" model="slide.slide.partner">
|
||||
<field name="slide_id" ref="website_slides.slide_slide_demo_1_1"/>
|
||||
<field name="partner_id" ref="base.partner_admin"/>
|
||||
<field name="completed" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record id="message_channel_1_root" model="mail.message">
|
||||
<field name="model">slide.channel</field>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
<field name="body" type="html"><div>Very good course.</div></field>
|
||||
</record>
|
||||
<record id="rating_channel_1_root" model="rating.rating">
|
||||
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="partner_id" ref="base.partner_root"/>
|
||||
<field name="consumed" eval="True"/>
|
||||
<field name="rating">4</field>
|
||||
<field name="message_id" ref="website_slides.message_channel_1_root"/>
|
||||
</record>
|
||||
<record id="message_channel_1_demo" model="mail.message">
|
||||
<field name="model">slide.channel</field>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="author_id" ref="base.partner_demo"/>
|
||||
<field name="body" type="html"><div>Interesting !</div></field>
|
||||
</record>
|
||||
<record id="rating_channel_1_demo" model="rating.rating">
|
||||
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="partner_id" ref="base.partner_demo"/>
|
||||
<field name="consumed" eval="True"/>
|
||||
<field name="rating">4</field>
|
||||
<field name="message_id" ref="website_slides.message_channel_1_demo"/>
|
||||
</record>
|
||||
<record id="message_channel_1_portal" model="mail.message">
|
||||
<field name="model">slide.channel</field>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="author_id" ref="base.partner_demo_portal"/>
|
||||
<field name="body" type="html"><div>Missing examples.</div></field>
|
||||
</record>
|
||||
<record id="rating_channel_1_portal" model="rating.rating">
|
||||
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||
<field name="consumed" eval="True"/>
|
||||
<field name="rating">3</field>
|
||||
<field name="message_id" ref="website_slides.message_channel_1_demo"/>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
@@ -1,263 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="category_1" model="slide.category">
|
||||
<field name="name">Featured Presentations</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
<record id="category_2" model="slide.category">
|
||||
<field name="name">Odoo Days</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="tag1" model="slide.tag">
|
||||
<field name="name">CMS</field>
|
||||
</record>
|
||||
|
||||
<record id="tag2" model="slide.tag">
|
||||
<field name="name">Marketing</field>
|
||||
</record>
|
||||
|
||||
<record id="tag5" model="slide.tag">
|
||||
<field name="name">Odoo Days</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_0" model="slide.slide">
|
||||
<field name="name">Odoo MRP</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=QtIU0p8daAo</field>
|
||||
<field name="document_id">QtIU0p8daAo</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/QtIU0p8daAo.jpg"/>
|
||||
<field name="description">Discover how you can integrate MRP, PLM, Quality and Maintenance in a single application to maximize the efficiency of your manufacturing operations.
|
||||
|
||||
Read more about the features at: https://www.odoo.com/page/manufacturing-features
|
||||
|
||||
Discover Odoo MRP: https://www.odoo.com/page/manufacturing</field>
|
||||
</record>
|
||||
<record id="slide_1" model="slide.slide">
|
||||
<field name="name">Odoo CRM</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=fgdz8MH2YHY</field>
|
||||
<field name="document_id">fgdz8MH2YHY</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag1'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/fgdz8MH2YHY.jpg"/>
|
||||
<field name="description">Discover the CRM sales people love https://www.odoo.com/page/crm</field>
|
||||
</record>
|
||||
<record id="slide_2" model="slide.slide">
|
||||
<field name="name">Odoo All-in-One Software Demonstration</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=tUx39vAENy0</field>
|
||||
<field name="document_id">tUx39vAENy0</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_2"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/tUx39vAENy0.jpg"/>
|
||||
<field name="description">Discover the all-in-one business management software solution that fits any business size and use case.
|
||||
|
||||
Learn more at https://odoo.com</field>
|
||||
</record>
|
||||
<record id="slide_3" model="slide.slide">
|
||||
<field name="name">Odoo Sign Demonstration</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=8DBabYQ1nUE</field>
|
||||
<field name="document_id">8DBabYQ1nUE</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_2"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/8DBabYQ1nUE.jpg"/>
|
||||
<field name="description">Stop doing manual printing and scanning. Move to electronic signature with Odoo Sign!
|
||||
|
||||
Discover more at https://www.odoo.com/page/sign</field>
|
||||
</record>
|
||||
<record id="slide_5" model="slide.slide">
|
||||
<field name="name">Awesome Timesheet by Odoo</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=v2O0YZU19ms</field>
|
||||
<field name="document_id">v2O0YZU19ms</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/v2O0YZU19ms.jpg"/>
|
||||
<field name="description">Download Awesome Timesheet by Odoo and discover how easy time tracking and employee management can be!
|
||||
|
||||
Chrome: http://bit.ly/2613LcY
|
||||
iOS: http://bit.ly/1ZUZsZD</field>
|
||||
</record>
|
||||
<record id="slide_6" model="slide.slide">
|
||||
<field name="name">Odoo Marketing</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=sDxfUTd-gs0</field>
|
||||
<field name="document_id">sDxfUTd-gs0</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/sDxfUTd-gs0.jpg"/>
|
||||
<field name="description">Discover how easy marketing your business can be with Odoo</field>
|
||||
</record>
|
||||
<record id="slide_7" model="slide.slide">
|
||||
<field name="name">Odoo Inventory</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=Vp5xqQOWLzE</field>
|
||||
<field name="document_id">Vp5xqQOWLzE</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/Vp5xqQOWLzE.jpg"/>
|
||||
<field name="description">Warehouse management software for the 21st century.
|
||||
|
||||
Discover Odoo Inventory: https://www.odoo.com/page/warehouse</field>
|
||||
</record>
|
||||
<record id="slide_8" model="slide.slide">
|
||||
<field name="name">Odoo Sales</field>
|
||||
<field name="url">https://www.youtube.com/watch?v=VMuCr5_arsY</field>
|
||||
<field name="document_id">VMuCr5_arsY</field>
|
||||
<field name="slide_type">video</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_1"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="tag_ids" eval="[(4, ref('tag1')), (4, ref('tag2'))]"/>
|
||||
<field name="image" type="base64" file="website_slides/data/demo-thumbnails/VMuCr5_arsY.jpg"/>
|
||||
<field name="description">Learn more at https://www.odoo.com/page/sales</field>
|
||||
</record>
|
||||
|
||||
<record id="slide_9" model="slide.slide">
|
||||
<field name="name">Open Days 2014 Infographic</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/Open_Days_2014_Infographic.png"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/Open_Days_2014_Infographic.png"/>
|
||||
<field name="slide_type">infographic</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_2"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="likes">13</field>
|
||||
<field name="slide_views">7399</field>
|
||||
<field name="tag_ids" eval="[(4, ref('tag5'))]"/>
|
||||
</record>
|
||||
<record id="slide_10" model="slide.slide">
|
||||
<field name="name">Company Culture</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/keynote.pdf"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/keynote.png"/>
|
||||
<field name="slide_type">presentation</field>
|
||||
<field name="channel_id" ref="channel_invite"/>
|
||||
<field name="category_id" ref="category_2"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="likes">13</field>
|
||||
<field name="slide_views">6399</field>
|
||||
<field name="index_content">Indexed content, automatically generated.</field>
|
||||
<field name="tag_ids" eval="[(4, ref('tag5'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="slide_11" model="slide.slide">
|
||||
<field name="name">OpenSource CMS, A performance comparison - Mantavya Gajjar</field>
|
||||
<field name="datas" type="base64" file="website_slides/static/src/img/odoo-cms-comparision.pdf"/>
|
||||
<field name="image" type="base64" file="website_slides/static/src/img/odoo-cms-comparision.png"/>
|
||||
<field name="slide_type">presentation</field>
|
||||
<field name="channel_id" ref="channel_public"/>
|
||||
<field name="category_id" ref="category_2"/>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="is_preview" eval="True"/>
|
||||
<field name="likes">10</field>
|
||||
<field name="slide_views">4718</field>
|
||||
<field name="index_content">1. Open Source CMS A performance comparision Mantavya Gajjar – Managining Director, Odoo India
|
||||
2. Topics 1 2 3 4 5 o Introduction – Products to Compare – Test Environment o Test Cases (home, catalogue, product pages) – Performance ● Google PageSpeed Inside ● Speed Test using Pingdom – Scalability ● Load Test using Blitz – Maintainability ● Source Code – cloc ● Community to maintain the source code – W3C Markup Validations o Conclusion
|
||||
3. Introduction
|
||||
4. Introduction Open Source Products, compared with Odoo
|
||||
5. Odoo o Version Saas4 o Standard Data / Modules – Demo data with Odoo Website, Commerce, Forum, News, etc
|
||||
6. Magento o Version 1.8.1.0 o Custom Data / Module – Home page and widgets – Added some products and their description
|
||||
7. Drupal o Version 7.27 o Custom Data / Modules – CK-Editor & CK-Finder – Ubercart for e-commerce, Rules, ctools, views, entity
|
||||
8. Prestashop o Version 1.6 o No Custom Data / Modules – Use default demo shop
|
||||
9. Performance Google PageSpeed Insight & Pingdom
|
||||
10. Google PageSpeed Insights Home page on desktop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
11. Home Page
|
||||
12. Odoo vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
13. Odoo vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
14. Odoo vs Prestashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
15. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
16. Google Page Speed Insights Home page on mobile Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
17. Odoo Vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
18. Odoo Vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
19. Odoo Vs Prestashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
20. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
21. Google PageSpeed Insights Product Catalogue on Desktop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
22. Odoo Vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
23. Odoo Vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
24. Odoo Vs Prestashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
25. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
26. Google PageSpeed Insights Product Catalogue on Mobile Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
27. Odoo Vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
28. Odoo Vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
29. Odoo Vs Prestashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
30. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
31. Google PageSpeed Insights Product Page on Desktop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
32. Odoo Vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
33. Odoo Vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
34. Odoo Vs Prestashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
35. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
36. Google PageSpeed Insights Product Page on Mobile Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/
|
||||
37. Odoo Vs Drupal Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
38. Odoo Vs Magento Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
39. Odoo Vs Preshashop Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
40. Summary : Google Page Speed Computed by Google Page Speed Insight : https://developers.google.com/speed/pagespeed/insights/ Rating is out of 100
|
||||
41. Speed Test using Pingdom Resources Loads to render page
|
||||
42. Resources Load to render page As browser can load only 4 fles in parallal on midsie traffc website, then latency time and number of resources to donwload impact time to load more resources Odoo load faster because concatenate several fles, minify and gzip the content, even all the modules installed
|
||||
43. Resources Load to render page
|
||||
44. Resources Load to render page
|
||||
45. Scaleablity Using Blitz, simulate the 250 users
|
||||
46. Load Test using Blitz Region – Virginia | Duration – 60 Seconds | Load – 1 To 250 Users Computed using Blitz: https://www.blitz.io
|
||||
47. Software Confgurations Magento, Prestashop, Drupa o Ubuntu 14.04 latest LTS o Apache 2.2 Server o PHP 5 Framework o MySQL Server 5.0 Odoo o Ubuntu 14.04 latest LTS o Nginx 1.4 o Odoo Framework o PostgreSQL 9.1
|
||||
48. Hardware Confguration o IBM Server Series X3500 M4, 15 MB L3 Cache o 300 GB GSAS Drive 10K RPMs o Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz, 12 cores o 8 GB Physical RAM o 15 MBPS Dedicated Internet connection line Network : o 15 MBPS dedicated Internet connection
|
||||
49. Odoo Region – Virginia | Duration – 60 Seconds | Load – 1 To 250 Users The max hit rate was: 88 hits per second Website and Ecommerce apps installed Confguration :
|
||||
50. Odoo ● Fastest: 530 ms | Slowest: 1655 ms | Average: 829 ms ● First time out happened at 47.4 second at 198 users ● 3646 successful hits in 60 sec, avg 52,45,920 hits/day capacity. Response Time :
|
||||
51. Drupal Region – Virginia | Duration – 60 Seconds | Load – 1 To 250 Users The max hit rate was : 37 hits per second Confguration :
|
||||
52. Drupal ● Fastest: 1172 ms | Slowest: 4943 ms | Average: 2141 ms ● First time out happened at 30 second at 125 users ● 1,083 successful hits in 60 sec, avg 15,59,520 hits/day capacity. Response Time :
|
||||
53. Magento Region – Virginia | Duration – 60 Seconds | Load – 1 To 250 Users The max hit rate was : 21 hits per second Confguration :
|
||||
54. Magento ● Fastest: 1639 ms | Slowest: 16315 ms | Average: 7813 ms ● First time out happened at 35 second at 146 users ● 528 successful hits in 60 sec, avg 0.7 M hits/day capacity. Response Time :
|
||||
55. Prestashop Region – Virginia | Duration – 60 Seconds | Load – 1 To 250 Users The max hit rate was : 16 hits per second Confguration :
|
||||
56. Prestashop ● Fastest: 1678 ms | Slowest: 9228 ms | Average: 5598 ms ● First time out happened at 25 second at 104 users ● 663 successful hits in 60 sec, avg 0.95 M hits/day capacity. Response Time :
|
||||
57. Load Test Summary
|
||||
58. Summary Speed : o Odoo is 3x times faster than the Drupal o Odoo is 6x times faster than the Magento o Odoo is 2x times faster than the Prestashop Scalability : o Odoo timeout at 198 users o Drupal timeout at 125 users o Magento timeout at 148 users o Prestashop timeout at 104 users
|
||||
59. W3C Markup Validation HTML Validation
|
||||
60. W3C Check Odoo's main problem o Element meta is missing one or more of the following attributes: content, property. o An img element must have an alt attribute, except under certain conditions o The width attribute on the table element is obsolete. Use CSS instead. Team is working on those issues , will be fxed soon
|
||||
61. Maintainability lines of code and contributors
|
||||
62. Test 1 : Source Code Comparision between : o Odoo : includes all modules. I.e accounting, wms, mrp, websites, etc... o Drupal, Magento and Prestashop : only core modules Odoo is : o 1.3x times smaller then the drupal o 5.5x times smaller then the magento o 1.9x times smaller then the prestashop
|
||||
63. Odoo Statistic provided by ohloh.net available at https://www.ohloh.net/p/odoo
|
||||
64. Drupal Statistic provided by ohloh.net available at https://www.ohloh.net/p/drupal
|
||||
65. Magento Statistic provided by ohloh.net available at https://www.ohloh.net/p/magento
|
||||
66. Prestashop Statistic provided by ohloh.net available at https://www.ohloh.net/p/PrestaShop
|
||||
67. Conclusion
|
||||
68. Conclusion Performance : o Odoo is 3x times faster than the Drupal o Odoo is 6x times faster than the Magento o Odoo is 2x times faster than the Prestashop Scalability : o Odoo timeout at 198 users o Drupal timeout at 125 users o Magento timeout at 148 users o Prestashop timeout at 104 users Maintainability : o 1.3x times smaller then the drupal o 5.5x times smaller then the magento o 1.9x times smaller then the prestashop
|
||||
69. Questions ?
|
||||
70. Odoo sales@odoo.com +32 (0) 2 290 34 90 www.odoo.com R&D and services offce Chaussée de Namur 40 B-1367 Grand Rosière Sales offce Avenue Van Nieuwenhuyse 6 B-1160 Brussels Thank You</field>
|
||||
</record>
|
||||
|
||||
<record model="slide.channel" id="channel_public">
|
||||
<field name="promote_strategy">custom</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -73,19 +73,18 @@ class Channel(models.Model):
|
||||
string='Tags', help='Used to categorize and filter displayed channels/courses')
|
||||
category_ids = fields.One2many('slide.category', 'channel_id', string="Categories")
|
||||
image = fields.Binary("Image", attachment=True)
|
||||
image_large = fields.Binary("Large image", attachment=True)
|
||||
image_medium = fields.Binary("Medium image", attachment=True)
|
||||
image_small = fields.Binary("Small image", attachment=True)
|
||||
# slides: promote, statistics
|
||||
slide_ids = fields.One2many('slide.slide', 'channel_id', string="Slides")
|
||||
slide_last_update = fields.Date('Last Update', compute='_compute_slide_last_update', store=True)
|
||||
slide_partner_ids = fields.One2many('slide.slide.partner', 'channel_id', string="Slide User Data", groups='website.group_website_publisher')
|
||||
promote_strategy = fields.Selection([
|
||||
('none', 'No Featured Presentation'),
|
||||
('latest', 'Latest Published'),
|
||||
('most_voted', 'Most Voted'),
|
||||
('most_viewed', 'Most Viewed'),
|
||||
('custom', 'Featured Presentation')],
|
||||
string="Featuring Policy", default='most_voted', required=True)
|
||||
|
||||
('most_viewed', 'Most Viewed')],
|
||||
string="Featuring Policy", default='latest', required=True)
|
||||
access_token = fields.Char("Security Token", copy=False, default=_default_access_token)
|
||||
nbr_presentations = fields.Integer('Number of Presentations', compute='_compute_slides_statistics', store=True)
|
||||
nbr_documents = fields.Integer('Number of Documents', compute='_compute_slides_statistics', store=True)
|
||||
@@ -130,6 +129,11 @@ class Channel(models.Model):
|
||||
can_upload = fields.Boolean('Can Upload', compute='_compute_access')
|
||||
can_publish = fields.Boolean('Can Publish', compute='_compute_access')
|
||||
|
||||
@api.depends('slide_ids.is_published')
|
||||
def _compute_slide_last_update(self):
|
||||
for record in self:
|
||||
record.slide_last_update = fields.Date.today()
|
||||
|
||||
@api.depends('channel_partner_ids.channel_id')
|
||||
def _compute_members_count(self):
|
||||
read_group_res = self.env['slide.channel.partner'].sudo().read_group([('channel_id', 'in', self.ids)], [], 'channel_id')
|
||||
@@ -201,10 +205,6 @@ class Channel(models.Model):
|
||||
if channel.id: # avoid to perform a slug on a not yet saved record in case of an onchange.
|
||||
channel.website_url = '%s/slides/%s' % (base_url, slug(channel))
|
||||
|
||||
@api.onchange('visibility')
|
||||
def change_visibility(self):
|
||||
pass
|
||||
|
||||
@api.multi
|
||||
def action_redirect_to_members(self):
|
||||
action = self.env.ref('website_slides.slide_channel_partner_action').read()[0]
|
||||
@@ -269,13 +269,13 @@ class Channel(models.Model):
|
||||
'partner_id': self.env.user.partner_id.id
|
||||
})]
|
||||
if 'image' in vals:
|
||||
tools.image_resize_images(vals)
|
||||
tools.image_resize_images(vals, return_large=True)
|
||||
return super(Channel, self.with_context(mail_create_nosubscribe=True)).create(vals)
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
if 'image' in vals:
|
||||
tools.image_resize_images(vals)
|
||||
tools.image_resize_images(vals, return_large=True)
|
||||
res = super(Channel, self).write(vals)
|
||||
if 'active' in vals:
|
||||
# archiving/unarchiving a channel does it on its slides, too
|
||||
|
||||
@@ -11,9 +11,8 @@ import uuid
|
||||
|
||||
from werkzeug import urls
|
||||
|
||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
||||
from odoo import api, fields, models, tools, _
|
||||
from odoo.addons.http_routing.models.ir_http import slug
|
||||
from odoo.tools import image
|
||||
from odoo.exceptions import Warning, UserError
|
||||
from odoo.http import request
|
||||
from odoo.addons.http_routing.models.ir_http import url_for
|
||||
@@ -97,11 +96,6 @@ class Slide(models.Model):
|
||||
'latest': 'date_published desc',
|
||||
}
|
||||
|
||||
_PROMOTIONAL_FIELDS = [
|
||||
'__last_update', 'name', 'image_thumb', 'image_medium', 'slide_type', 'total_views', 'category_id',
|
||||
'channel_id', 'description', 'tag_ids', 'write_date', 'create_date',
|
||||
'website_published', 'website_url', 'website_meta_title', 'website_meta_description', 'website_meta_keywords', 'website_meta_og_img']
|
||||
|
||||
_sql_constraints = [
|
||||
('exclusion_html_content_and_url', "CHECK(html_content IS NULL OR url IS NULL)", "A slide is either filled with a document url or HTML content. Not both.")
|
||||
]
|
||||
@@ -124,10 +118,10 @@ class Slide(models.Model):
|
||||
access_token = fields.Char("Security Token", copy=False, default=_default_access_token)
|
||||
is_preview = fields.Boolean('Always visible', default=False)
|
||||
completion_time = fields.Float('# Hours', default=1, digits=(10, 4))
|
||||
image = fields.Binary('Image', attachment=True)
|
||||
# TODO DBE : review image medium and small - using standard image calls (see web/image/.. route)
|
||||
image_medium = fields.Binary('Medium', compute="_get_image", store=True, attachment=True)
|
||||
image_thumb = fields.Binary('Thumbnail', compute="_get_image", store=True, attachment=True)
|
||||
image = fields.Binary("Image", attachment=True)
|
||||
image_large = fields.Binary("Large image", attachment=True)
|
||||
image_medium = fields.Binary("Medium image", attachment=True)
|
||||
image_small = fields.Binary("Small image", attachment=True)
|
||||
# subscribers
|
||||
partner_ids = fields.Many2many('res.partner', 'slide_slide_partner', 'slide_id', 'partner_id',
|
||||
string='Subscribers', groups='base.group_website_publisher')
|
||||
@@ -162,16 +156,6 @@ class Slide(models.Model):
|
||||
public_views = fields.Integer('# of Public Views')
|
||||
total_views = fields.Integer("Total # Views", default="0", compute='_compute_total', store=True)
|
||||
|
||||
@api.depends('image')
|
||||
def _get_image(self):
|
||||
for record in self:
|
||||
if record.image:
|
||||
record.image_medium = image.crop_image(record.image, type='top', ratio=(4, 3), size=(500, 400))
|
||||
record.image_thumb = image.crop_image(record.image, type='top', ratio=(4, 3), size=(200, 200))
|
||||
else:
|
||||
record.image_medium = False
|
||||
record.image_thumb = False
|
||||
|
||||
@api.depends('slide_views', 'public_views')
|
||||
def _compute_total(self):
|
||||
for record in self:
|
||||
@@ -278,6 +262,9 @@ class Slide(models.Model):
|
||||
for key, value in doc_data.items():
|
||||
values.setdefault(key, value)
|
||||
|
||||
if 'image' in values:
|
||||
tools.image_resize_images(values, return_large=True)
|
||||
|
||||
slide = super(Slide, self).create(values)
|
||||
|
||||
if slide.website_published:
|
||||
@@ -294,6 +281,9 @@ class Slide(models.Model):
|
||||
for key, value in doc_data.items():
|
||||
values.setdefault(key, value)
|
||||
|
||||
if 'image' in values:
|
||||
tools.image_resize_images(values, return_large=True)
|
||||
|
||||
res = super(Slide, self).write(values)
|
||||
if values.get('website_published'):
|
||||
self.date_published = datetime.datetime.now()
|
||||
@@ -592,5 +582,5 @@ class Slide(models.Model):
|
||||
res = super(Slide, self)._default_website_meta()
|
||||
res['default_opengraph']['og:title'] = res['default_twitter']['twitter:title'] = self.name
|
||||
res['default_opengraph']['og:description'] = res['default_twitter']['twitter:description'] = self.description
|
||||
res['default_opengraph']['og:image'] = res['default_twitter']['twitter:image'] = "/web/image/slide.slide/%s/image_thumb" % (self.id)
|
||||
res['default_opengraph']['og:image'] = res['default_twitter']['twitter:image'] = "/web/image/slide.slide/%s/image_small" % (self.id)
|
||||
return res
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 176 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 180 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 143 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#C37933" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563zm56.757-126.57l12.882-12.602c1.867-1.743 2.49-3.922 1.867-6.536-.747-2.551-2.365-4.139-4.854-4.76l-17.55-4.482 4.947-17.365c.747-2.552.156-4.73-1.773-6.535-1.805-1.93-3.983-2.52-6.535-1.774l-17.363 4.948-4.48-17.551c-.623-2.552-2.21-4.14-4.761-4.761-2.552-.685-4.73-.094-6.535 1.773L150 93.324l-12.602-12.977c-1.805-1.93-3.983-2.52-6.535-1.773-2.551.622-4.138 2.209-4.76 4.76l-4.481 17.552-17.363-4.948c-2.552-.747-4.73-.155-6.535 1.774-1.929 1.805-2.52 3.983-1.773 6.535l4.947 17.365-17.55 4.481c-2.489.623-4.107 2.21-4.854 4.761-.622 2.614 0 4.793 1.867 6.536l12.882 12.603-12.882 12.603c-1.867 1.743-2.49 3.921-1.867 6.535.747 2.552 2.365 4.14 4.854 4.762l17.55 4.481-4.947 17.365c-.747 2.552-.156 4.73 1.773 6.535 1.805 1.93 3.983 2.52 6.535 1.774l17.363-4.948 4.48 17.551c.623 2.552 2.21 4.17 4.761 4.855 2.614.622 4.792 0 6.535-1.867L150 206.755l12.602 12.884c1.245 1.369 2.832 2.053 4.761 2.053.436 0 1.027-.062 1.774-.186 2.551-.747 4.138-2.365 4.76-4.855l4.481-17.551 17.363 4.948c2.552.747 4.73.155 6.535-1.774 1.929-1.805 2.52-3.983 1.773-6.535l-4.947-17.365 17.55-4.481c2.489-.623 4.107-2.21 4.854-4.762.622-2.614 0-4.792-1.867-6.535l-12.882-12.603z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#E2BE00" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563zm56.757-126.57l12.882-12.602c1.867-1.743 2.49-3.922 1.867-6.536-.747-2.551-2.365-4.139-4.854-4.76l-17.55-4.482 4.947-17.365c.747-2.552.156-4.73-1.773-6.535-1.805-1.93-3.983-2.52-6.535-1.774l-17.363 4.948-4.48-17.551c-.623-2.552-2.21-4.14-4.761-4.761-2.552-.685-4.73-.094-6.535 1.773L150 93.324l-12.602-12.977c-1.805-1.93-3.983-2.52-6.535-1.773-2.551.622-4.138 2.209-4.76 4.76l-4.481 17.552-17.363-4.948c-2.552-.747-4.73-.155-6.535 1.774-1.929 1.805-2.52 3.983-1.773 6.535l4.947 17.365-17.55 4.481c-2.489.623-4.107 2.21-4.854 4.761-.622 2.614 0 4.793 1.867 6.536l12.882 12.603-12.882 12.603c-1.867 1.743-2.49 3.921-1.867 6.535.747 2.552 2.365 4.14 4.854 4.762l17.55 4.481-4.947 17.365c-.747 2.552-.156 4.73 1.773 6.535 1.805 1.93 3.983 2.52 6.535 1.774l17.363-4.948 4.48 17.551c.623 2.552 2.21 4.17 4.761 4.855 2.614.622 4.792 0 6.535-1.867L150 206.755l12.602 12.884c1.245 1.369 2.832 2.053 4.761 2.053.436 0 1.027-.062 1.774-.186 2.551-.747 4.138-2.365 4.76-4.855l4.481-17.551 17.363 4.948c2.552.747 4.73.155 6.535-1.774 1.929-1.805 2.52-3.983 1.773-6.535l-4.947-17.365 17.55-4.481c2.489-.623 4.107-2.21 4.854-4.762.622-2.614 0-4.792-1.867-6.535l-12.882-12.603z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><g fill="none"><circle cx="150" cy="150" r="150" fill="#FFF"/><path fill="#838997" d="M150 300C67.157 300 0 232.843 0 150S67.157 0 150 0s150 67.157 150 150-67.157 150-150 150zm0-9.375c77.665 0 140.625-62.96 140.625-140.625 0-77.665-62.96-140.625-140.625-140.625C72.335 9.375 9.375 72.335 9.375 150c0 77.665 62.96 140.625 140.625 140.625zm0-14.063C80.101 276.563 23.437 219.9 23.437 150S80.102 23.437 150 23.437 276.563 80.102 276.563 150 219.899 276.563 150 276.563zm56.757-126.57l12.882-12.602c1.867-1.743 2.49-3.922 1.867-6.536-.747-2.551-2.365-4.139-4.854-4.76l-17.55-4.482 4.947-17.365c.747-2.552.156-4.73-1.773-6.535-1.805-1.93-3.983-2.52-6.535-1.774l-17.363 4.948-4.48-17.551c-.623-2.552-2.21-4.14-4.761-4.761-2.552-.685-4.73-.094-6.535 1.773L150 93.324l-12.602-12.977c-1.805-1.93-3.983-2.52-6.535-1.773-2.551.622-4.138 2.209-4.76 4.76l-4.481 17.552-17.363-4.948c-2.552-.747-4.73-.155-6.535 1.774-1.929 1.805-2.52 3.983-1.773 6.535l4.947 17.365-17.55 4.481c-2.489.623-4.107 2.21-4.854 4.761-.622 2.614 0 4.793 1.867 6.536l12.882 12.603-12.882 12.603c-1.867 1.743-2.49 3.921-1.867 6.535.747 2.552 2.365 4.14 4.854 4.762l17.55 4.481-4.947 17.365c-.747 2.552-.156 4.73 1.773 6.535 1.805 1.93 3.983 2.52 6.535 1.774l17.363-4.948 4.48 17.551c.623 2.552 2.21 4.17 4.761 4.855 2.614.622 4.792 0 6.535-1.867L150 206.755l12.602 12.884c1.245 1.369 2.832 2.053 4.761 2.053.436 0 1.027-.062 1.774-.186 2.551-.747 4.138-2.365 4.76-4.855l4.481-17.551 17.363 4.948c2.552.747 4.73.155 6.535-1.774 1.929-1.805 2.52-3.983 1.773-6.535l-4.947-17.365 17.55-4.481c2.489-.623 4.107-2.21 4.854-4.762.622-2.614 0-4.792-1.867-6.535l-12.882-12.603z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -15,6 +15,266 @@ $MAX-Z-INDEX : 2147483647 !default;
|
||||
object-position: top;
|
||||
}
|
||||
|
||||
|
||||
// Common to new slides pages
|
||||
// **************************************************
|
||||
|
||||
.o_wslides_wrap {
|
||||
.text_small_caps {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.image-muted {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.cta-title {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// New home page
|
||||
// **************************************************
|
||||
|
||||
div .o_wslides_home_nav {
|
||||
position: relative;
|
||||
top: -50px;
|
||||
}
|
||||
|
||||
div .o_wslides_home_main {
|
||||
.o_wslides_home_header {
|
||||
}
|
||||
.o_wslides_home_footer {
|
||||
}
|
||||
|
||||
.o_wslides_home_aside {
|
||||
.fa-check {
|
||||
color: #00A09D;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
.o_wslides_home_content_section_title, .o_wslides_home_aside_title {
|
||||
h3 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
h4 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_course_card {
|
||||
.card-body {
|
||||
padding: 0.75em 1em;
|
||||
}
|
||||
.card-footer {
|
||||
padding-top: 0.75em 1em;
|
||||
}
|
||||
}
|
||||
// responsive card-deck like
|
||||
.row.o_wslides_row > div[class*='col-'] {
|
||||
display: flex;
|
||||
flex:1 0 auto;
|
||||
.card {
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
|
||||
// tools
|
||||
// ****************************************
|
||||
.text_small_caps {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
||||
.image-muted {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.o_wslides_home_circled {
|
||||
border-radius: 50%;
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
padding: 0.25em 0.5em 0.25em 0.5em;
|
||||
border: 0.2em solid #666;
|
||||
text-align: center;
|
||||
box-sizing: initial;
|
||||
}
|
||||
|
||||
.progress {
|
||||
overflow: visible;
|
||||
margin-bottom: 0em;
|
||||
height: 4px;
|
||||
.progress-bar {
|
||||
background-color: #00A09D;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
span {
|
||||
background-color: #00A09D;
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
padding: 2px 3px 2px 4px;
|
||||
right: -1.4em;
|
||||
border-radius: 2px;
|
||||
}
|
||||
span:after {
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
border-color: rgba(255, 255, 255, 0);
|
||||
border-bottom-color: #00A09D;
|
||||
border-width: 5px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// New course page
|
||||
// **************************************************
|
||||
|
||||
.o_wslides_container {
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
max-width: 1140px;
|
||||
padding: 32px 32px 0px 32px;
|
||||
}
|
||||
|
||||
.o_wslides_course_nav {
|
||||
margin: auto;
|
||||
background: linear-gradient(150deg, #875A7B 20%, #62495B 80%) !important;
|
||||
opacity: 0.95;
|
||||
|
||||
nav {
|
||||
.breadcrumb-item::before {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.breadcrumb-item {
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.8;
|
||||
transition: opacity linear .3s;
|
||||
}
|
||||
&.active {
|
||||
a {
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
ol {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_course_header {
|
||||
margin: auto;
|
||||
background: linear-gradient(150deg, #875A7B 20%, #62495B 80%) !important;
|
||||
border-bottom: 48px solid #66445e;
|
||||
|
||||
.o_wslides_course_header_container {
|
||||
top: 48px;
|
||||
padding-top: 0px;
|
||||
|
||||
.o_wslides_course_header_content {
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
.o_wslides_course_description {
|
||||
margin-right: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_course_header_aside {
|
||||
img {
|
||||
width: 100%;
|
||||
max-width: 256px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_course_content {
|
||||
margin: auto;
|
||||
background-color: #f2f2f2;
|
||||
|
||||
.o_wslides_content_container {
|
||||
position: relative;
|
||||
top: -80px;
|
||||
}
|
||||
|
||||
// responsive card-deck like
|
||||
.row.o_wslides_row > div[class*='col-'] {
|
||||
display: flex;
|
||||
flex:1 0 auto;
|
||||
.card {
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_course_content_nav {
|
||||
.o_wslides_nav_tabs {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
.o_wslides_navlink {
|
||||
color: white;
|
||||
border-radius: 0px;
|
||||
height: 48px;
|
||||
font-weight: bold;
|
||||
padding-top: 12px;
|
||||
border-left: 2px solid #875A7B;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
&:hover {
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
background-color: #875A7B;
|
||||
}
|
||||
}
|
||||
.o_wslides_navlink.active {
|
||||
color: #212529;
|
||||
background-color: #f2f2f2;
|
||||
border: 0px;
|
||||
}
|
||||
}
|
||||
.o_wslides_course_content_main {
|
||||
h3 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.o_wslides_course_content_aside {
|
||||
top: 1px;
|
||||
width: 256px;
|
||||
max-width: 256px;
|
||||
margin-left: 15px;
|
||||
background-color: white;
|
||||
|
||||
.o_wslides_course_aside_line {
|
||||
}
|
||||
}
|
||||
|
||||
.o_wslides_lesson_card {
|
||||
.card-footer {
|
||||
padding-top: 0.75em;
|
||||
padding-bottom: 0.75em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Old brol to clean someday
|
||||
// **************************************************
|
||||
|
||||
.oe_slides_panel_footer .fa, .oe_slide_js_embed_option_link{
|
||||
color : theme-color('primary');
|
||||
cursor: pointer;
|
||||
@@ -61,10 +321,6 @@ img.oe_slides_promote_image {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.oe_slides_box_shadow {
|
||||
box-shadow: 0 0 5px #CCC;
|
||||
}
|
||||
|
||||
.oe_slides_apart_small {
|
||||
@include top-covered-image;
|
||||
height: 60px;
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<field name="image" widget="image" class="oe_avatar" options='{"preview_image": "image_thumb"}' attrs="{'required': [('slide_type', 'not in', ('document'))], 'readonly': [('slide_type', 'in', ('document', 'presentation', 'video'))]}"/>
|
||||
<field name="image" widget="image" class="oe_avatar" options='{"preview_image": "image_large"}'
|
||||
attrs="{
|
||||
'required': [('slide_type', 'not in', ('document'))],
|
||||
'readonly': [('slide_type', 'in', ('document', 'presentation', 'video'))]}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
<label for="name" string="Name"/>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<h4><t t-esc="suggest_slide.name"/></h4>
|
||||
</div>
|
||||
<span class="oe-image-thumbnail">
|
||||
<img class="img-fluid" t-attf-src="/web/image/slide.slide/#{suggest_slide.id}/image_thumb" alt="suggest_slide.name"/>
|
||||
<img class="img-fluid" t-attf-src="/web/image/slide.slide/#{suggest_slide.id}/image_small" alt="suggest_slide.name"/>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
<t t-if="slide.slide_type in ('presentation', 'document')">
|
||||
<div id="PDFViewerLoader" class="oe_slides_loader">
|
||||
<img class="img-fluid" t-attf-src="/web/image/slide.slide/#{slide.id}/image_medium" style="margin:auto;height:100%" alt="suggest_slide.name"/>
|
||||
<img class="img-fluid" t-attf-src="/web/image/slide.slide/#{slide.id}/image_large" style="margin:auto;height:100%" alt="suggest_slide.name"/>
|
||||
<h4 class="text-center">
|
||||
<i class="fa fa-spinner fa-spin"></i> Loading ...
|
||||
</h4>
|
||||
|
||||
@@ -5,85 +5,12 @@
|
||||
<!-- Tools template: share on social networkds -->
|
||||
<template id='slides_share' name="Slides Media Share">
|
||||
<div>
|
||||
<a t-attf-href="https://www.facebook.com/sharer/sharer.php?u=#{slide.website_url}" class="o_slides_social_share" social-key="facebook" aria-label="Share on Facebook" title="Share on Facebook"><i class="fa fa-facebook-square fa-2x"/></a>
|
||||
<a t-attf-href="https://twitter.com/intent/tweet?text=#{slide.name}&url=#{slide.website_url}" class="o_slides_social_share" social-key="twitter" aria-label="Share on Twitter" title="Share on Twitter"><i class="fa fa-twitter fa-2x"/></a>
|
||||
<a t-attf-href="http://www.linkedin.com/shareArticle?mini=true&url=#{slide.website_url}&title=#{slide.name}&" social-key="linkedin" class="o_slides_social_share" aria-label="Share on LinkedIn" title="Share on LinkedIn"><i class="fa fa-linkedin fa-2x"/></a>
|
||||
<a t-attf-href="https://plus.google.com/share?url=#{slide.website_url}" class="o_slides_social_share" social-key="gplus" aria-label="Share on Google Plus" title="Share on Google Plus"><i class="fa fa-google-plus-square fa-2x"/></a>
|
||||
<a t-attf-href="https://www.facebook.com/sharer/sharer.php?u=#{record.website_url}" class="o_slides_social_share" social-key="facebook" aria-label="Share on Facebook" title="Share on Facebook"><i class="fa fa-facebook-square fa-2x"/></a>
|
||||
<a t-attf-href="https://twitter.com/intent/tweet?text=#{record.name}&url=#{record.website_url}" class="o_slides_social_share" social-key="twitter" aria-label="Share on Twitter" title="Share on Twitter"><i class="fa fa-twitter fa-2x"/></a>
|
||||
<a t-attf-href="http://www.linkedin.com/shareArticle?mini=true&url=#{record.website_url}&title=#{record.name}&" social-key="linkedin" class="o_slides_social_share" aria-label="Share on LinkedIn" title="Share on LinkedIn"><i class="fa fa-linkedin fa-2x"/></a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Channels View: main template, display list of available channels -->
|
||||
<template id="channels" name="Channels">
|
||||
<t t-call="website.layout">
|
||||
<div class="container mt16">
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<h1 t-if="not search_term">Select a Channel</h1>
|
||||
<h1 t-if="search_term">Channel found for "<i><t t-esc="search_term"/></i>"</h1>
|
||||
<div class="form-inline justify-content-center">
|
||||
<form method="GET" class="o_website_slides_search">
|
||||
<div class="input-group">
|
||||
<input type="text" name="search" class="search-query form-control oe_search_box" placeholder="Search..." t-att-value="search_term"/>
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary oe_search_button" aria-label="Search" title="Search">
|
||||
<i class="fa fa-search"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<t t-foreach="channels" t-as="channel">
|
||||
<div t-if="channel_index % 3 == 0" class="clearfix"/>
|
||||
<div class="col-md-4 mb32">
|
||||
<div class="card card-body">
|
||||
<div>
|
||||
<a t-attf-href="/slides/#{slug(channel)}">
|
||||
<img t-if="channel.image" t-attf-src="/web/image/slide.channel/#{channel.id}/image_medium"
|
||||
class="img-fluid oe_slides_channel_thumbnail"
|
||||
t-att-alt="channel.name"/>
|
||||
<img t-if="not channel.image" src="/website_slides/static/src/img/channel-default.jpg"
|
||||
class="img-fluid oe_slides_opacity"
|
||||
t-att-alt="channel.name"/>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mt4 float-right">
|
||||
<t t-call="website.publish_management">
|
||||
<t t-set="object" t-value="channel"/>
|
||||
<t t-set="publish_edit" t-value="True"/>
|
||||
<t t-set="action" t-value="'website_slides.action_slide_channels'"/>
|
||||
</t>
|
||||
</div>
|
||||
<h3 class="mt4 mb4 lead" t-att-title="channel.name" style="width:55%">
|
||||
<a t-attf-href="/slides/#{slug(channel)}" t-esc="channel.name"/>
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-muted oe_no_empty" t-field="channel.description"/>
|
||||
</div>
|
||||
<t t-call="website_rating.rating_widget_stars_static">
|
||||
<t t-set="rating_avg" t-value="channel.rating_avg"/>
|
||||
<t t-set="rating_count" t-value="channel.rating_count"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Channels View: option: subscription -->
|
||||
<template id="opt_subscription_on_channels" name="Subscription" customize_show="True" inherit_id="website_slides.channels">
|
||||
<xpath expr="//p[@t-field='channel.description']" position="after">
|
||||
<t t-call="website_mail.follow">
|
||||
<t t-set="email" t-value="user.email"/>
|
||||
<t t-set="object" t-value="channel"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Channels: no channel found -->
|
||||
<template id="channel_not_found" name="Private Presentation">
|
||||
<t t-call="website.layout">
|
||||
@@ -101,52 +28,40 @@
|
||||
</template>
|
||||
|
||||
<!-- Channels sub-template: header -->
|
||||
<template id="slides_channel_header" name="Slides Channel Header">
|
||||
<section class="oe_slides_box_shadow">
|
||||
<template id="course_nav" name="Course Navigation Header">
|
||||
<div class="o_wslides_course_nav">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- Name and breadcrumb -->
|
||||
<div class="float-left col-lg-8 col-md-12 col-12 mt16 mb8">
|
||||
<div class="row">
|
||||
<h3 class="mt0">
|
||||
<a t-attf-href="/slides/#{slug(channel)}" t-esc="channel.name"/>
|
||||
<span t-if="not channel.is_member" class="o_wslides_join_channel">
|
||||
<a role="button" class="btn btn-primary o_wslides_join_channel_link"
|
||||
title="Join Channel" aria-label="Join Channel" href="#"
|
||||
t-att-data-channel-id="channel.id">
|
||||
<i class="fa fa-chevron-right"></i> Join
|
||||
</a>
|
||||
</span>
|
||||
<span t-if="channel.is_member">
|
||||
<a role="button" class="btn btn-primary o_wslides_join_channel_link"
|
||||
title="Join Channel" aria-label="Join Channel" href="#">
|
||||
<i class="fa fa-chevron-right"></i> Joined
|
||||
</a>
|
||||
</span>
|
||||
<t t-if="category">
|
||||
/ <a t-attf-href="/slides/#{slug(channel)}/category/#{slug(category)}" t-esc="category.name"/>
|
||||
</t>
|
||||
<t t-if="channel.can_upload">
|
||||
<a role="button" class="btn btn-primary oe_slide_js_upload" title="Upload Presentation"
|
||||
aria-label="Upload Presentation" href="#"
|
||||
t-att-data-channel-id="channel.id"
|
||||
t-att-data-can-upload="channel.can_upload"
|
||||
t-att-data-can-publish="channel.can_publish">
|
||||
<i class="fa fa-cloud-upload"></i> Upload
|
||||
</a>
|
||||
</t>
|
||||
</h3>
|
||||
<ul class="navbar-nav ml-auto float-right pt-2">
|
||||
<li class="nav-item">
|
||||
<a t-attf-href="/profile/user/#{user.id}?channel_id=#{channel.id}" t-attf-class="text-dark font-weight-bold nav-link}">
|
||||
<i class="fa fa-diamond text-secondary" /> <t t-esc="user_id.karma"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Search box -->
|
||||
<div class="col-lg-4 col-md-12 col-12 pul-right mt16 mb8">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<!-- nav -->
|
||||
<nav aria-label="breadcrumb" class="col-6">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/slides">Home</a>
|
||||
</li>
|
||||
<li t-att-class="'breadcrumb-item %s' % ('active' if not search_category and not search_tag and not search_slide_type else '')">
|
||||
<a t-att-href="'/slides/%s' % slug(channel)"><span t-esc="channel.name"/></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" t-att-aria-current="'page' and search_category" t-if="search_category">
|
||||
<a t-att-href="'/slides/%s/category/%s' % (slug(channel), slug(search_category))"><span t-esc="search_category.name"/></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" t-att-aria-current="'page' and search_tag" t-if="search_tag">
|
||||
<a t-att-href="'/slides/%s/tag/%s' % (slug(channel), slug(search_tag))"><span t-esc="search_tag.name"/></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" t-att-aria-current="'page' and search_slide_type" t-if="search_slide_type">
|
||||
<a t-att-href="'/slides/%s?slide_type=%s' % (slug(channel), search_slide_type)"><span t-esc="slide_types[search_slide_type]"/></a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="col-4 d-flex flex-row">
|
||||
<!-- karma -->
|
||||
<!-- <ul class="navbar-nav ml-auto float-right pt-2">
|
||||
<li class="nav-item">
|
||||
<a t-attf-href="/profile/user/#{user.id}?channel_id=#{channel.id}" t-attf-class="text-dark font-weight-bold nav-link}">
|
||||
<i class="fa fa-diamond text-secondary" /> <t t-esc="user_id.karma"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- search -->
|
||||
<form t-attf-action="/slides/#{slug(channel)}" role="search" method="get">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="search" t-attf-placeholder="Search in #{channel.name}" t-att-value="search"/>
|
||||
@@ -157,247 +72,308 @@
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="not search">
|
||||
<!-- Navigation -->
|
||||
<div class="col-lg-8 col-md-12 col-12">
|
||||
<ul class="nav nav-tabs nav-tabs-border" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}"
|
||||
t-attf-class="nav-link#{not slide_type and ' active' or ''}"> <i class="fa fa-home"/> Home</a>
|
||||
</li>
|
||||
<li t-if="header_object.nbr_presentations" class="nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}/presentation"
|
||||
t-attf-class="nav-link#{slide_type == 'presentation' and ' active' or ''}">
|
||||
<span class="badge badge-pill" t-esc="header_object.nbr_presentations"/> Presentations
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="header_object.nbr_videos" class="nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}/video"
|
||||
t-attf-class="nav-link#{slide_type == 'video' and ' active' or ''}">
|
||||
<span class="badge badge-pill" t-esc="header_object.nbr_videos"/> Videos
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="header_object.nbr_documents" class="li nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}/document"
|
||||
t-attf-class="nav-link#{slide_type == 'document' and ' active' or ''}">
|
||||
<span class="badge badge-pill" t-esc="header_object.nbr_documents"/> Documents
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="header_object.nbr_infographics" class="nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}/infographic"
|
||||
t-attf-class="nav-link#{slide_type == 'infographic' and ' active' or ''}">
|
||||
<span class="badge badge-pill" t-esc="header_object.nbr_infographics"/> Infographics
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="header_object.nbr_webpages" class="nav-item">
|
||||
<a t-attf-href="/slides/#{slug(channel)}#{category and '/category/' + slug(category) or ''}/webpage"
|
||||
t-attf-class="nav-link#{slide_type == 'webpage' and ' active' or ''}">
|
||||
<span class="badge badge-pill" t-esc="header_object.nbr_webpages"/> Pages
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Sort options -->
|
||||
<div class="col-lg-4 col-md-12 col-12">
|
||||
<span class="float-right">
|
||||
<span class="text-muted">Sort by:</span>
|
||||
<a href="?sorting=date">
|
||||
<span t-attf-style="#{sorting and sorting == 'date' and 'font-weight:bold;' ''}">Newest</span>
|
||||
</a>
|
||||
<span class="text-muted">|</span>
|
||||
<a href="?sorting=view">
|
||||
<span t-attf-style="#{sorting and sorting == 'view' and 'font-weight:bold;' ''}">Most Viewed</span>
|
||||
</a>
|
||||
<span class="text-muted">|</span>
|
||||
<a href="?sorting=vote">
|
||||
<span t-attf-style="#{sorting and sorting == 'vote' and 'font-weight:bold;' ''}">Most Voted</span>
|
||||
</a>
|
||||
</span>
|
||||
<!-- sort / filter -->
|
||||
<small class="dropdown float-right ml-2">
|
||||
<h6 class="m-0">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="slidesChannelDropdownSort"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<t t-if="sorting == 'most_voted'">Most Voted</t>
|
||||
<t t-elif="sorting == 'most_viewed'">Most Viewed</t>
|
||||
<t t-else="">Newest</t>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="slidesChannelDropdownSort" role="menu">
|
||||
<div role="separator" class="dropdown-header">Sort by</div>
|
||||
<a role="menuitem" t-att-href="'/slides/%s?%s' % (slug(channel), keep_query('debug', 'slide_type', sorting='latest'))"
|
||||
t-att-class="'dropdown-item %s' % ('active' if sorting and sorting == 'latest' else '')">Newest</a>
|
||||
<a role="menuitem" t-att-href="'/slides/%s?%s' % (slug(channel), keep_query('debug', 'slide_type', sorting='most_voted'))"
|
||||
t-att-class="'dropdown-item %s' % ('active' if sorting and sorting == 'most_voted' else '')">Most Voted</a>
|
||||
<a role="menuitem" t-att-href="'/slides/%s?%s' % (slug(channel), keep_query('debug', 'slide_type', sorting='most_viewed'))"
|
||||
t-att-class="'dropdown-item %s' % ('active' if sorting and sorting == 'most_viewed' else '')">Most Viewed</a>
|
||||
</div>
|
||||
</h6>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Channel main template -->
|
||||
<template id='home' name="Odoo Slides">
|
||||
<t t-set="head">
|
||||
<template id='course_main' name="Course Main">
|
||||
<t t-set="head">
|
||||
<t t-call-assets="web.pdf_js_lib" t-css="false"/>
|
||||
<script type="text/javascript" src="/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js"></script>
|
||||
</t>
|
||||
<t t-call="website.layout">
|
||||
<div class="wrap">
|
||||
<div class="wrap o_wslides_wrap">
|
||||
<t t-set="main_object" t-value="channel"/>
|
||||
<t t-call="website_slides.slides_channel_header">
|
||||
<t t-if="not category">
|
||||
<t t-set="header_object" t-value="channel"/>
|
||||
</t>
|
||||
<t t-if="category">
|
||||
<t t-set="header_object" t-value="category"/>
|
||||
</t>
|
||||
</t>
|
||||
<section t-if="not tag and not slide_type and not search and not is_public_user and not category" class="wrap mt16 mb0" groups="website.group_website_designer">
|
||||
<div class="container">
|
||||
<div class="alert alert-danger alert-dismissable mb0" role="alert">
|
||||
<p>
|
||||
Review your channel settings to promote your most viewed or recent published presentation
|
||||
</p>
|
||||
<a t-attf-href="/web#return_label=Website&id=#{channel.id}&view_type=form&model=slide.channel&action=#{request.env.ref('website_slides.action_slide_channels').id }" class="fa fa-arrow-right mt8">
|
||||
Channel Settings
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_slides_promote_box" t-if="channel.slide_ids and not tag and not slide_type and not search and not category">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-5 mt16 mb16">
|
||||
<a t-attf-href="/slides/slide/#{slug(channel.slide_ids[0])}">
|
||||
<img t-attf-src="/web/image/slide.slide/#{channel.slide_ids[0].id}/image_medium" class="img-fluid shadow oe_slides_promote_image" alt="Promoted slide"/>
|
||||
</a>
|
||||
<t t-call="website_slides.course_nav"/>
|
||||
|
||||
<div class="row o_wslides_course_header">
|
||||
<div class="col-lg-12 o_wslides_container o_wslides_course_header_container">
|
||||
<div class="row align-items-end">
|
||||
<div class="col o_wslides_course_header_aside">
|
||||
<img class="mr-3" t-att-src="'/web/image/slide.channel/%s/image' % channel.id"/>
|
||||
</div>
|
||||
<div class="col-lg-7 mt16 mb16">
|
||||
<h3 class="row">
|
||||
<a t-attf-href="/slides/slide/#{slug(channel.slide_ids[0])}">
|
||||
<t t-esc="channel.slide_ids[0].name"/>
|
||||
</a>
|
||||
</h3>
|
||||
<div class="row mt8 mb8" t-if="channel.slide_ids[0].tag_ids">
|
||||
<t t-foreach="channel.slide_ids[0].tag_ids" t-as="slide_tag">
|
||||
<a t-attf-href="/slides/#{slug(channel)}/tag/#{slug(slide_tag)}" t-attf-class="badge badge-secondary #{tag and tag.id == slide_tag.id and 'badge-primary' ''}" t-field="slide_tag.name"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="row oe_no_empty" t-esc="channel.slide_ids[0].description"/>
|
||||
<p class="row mt8">
|
||||
<t t-call="website_rating.rating_stars_static_popup_composer">
|
||||
<t t-set="rating_avg" t-value="rating_avg"/>
|
||||
<t t-set="rating_total" t-value="rating_count"/>
|
||||
<t t-set="object" t-value="channel"/>
|
||||
<t t-set="hash" t-value="message_post_hash"/>
|
||||
<t t-set="pid" t-value="message_post_pid"/>
|
||||
<t t-set="default_message_id" t-value="last_message_id"/>
|
||||
<t t-set="default_message" t-value="last_message"/>
|
||||
<t t-set="default_rating_value" t-value="last_rating_value"/>
|
||||
<t t-set="force_submit_url" t-value="'/slides/mail/update_comment' if last_message_id else False"/>
|
||||
</t>
|
||||
</p>
|
||||
<p class="row mt8">
|
||||
<b>Share:</b>
|
||||
<t t-call="website_slides.slides_share">
|
||||
<t t-set="slide" t-value="channel.slide_ids[0]"/>
|
||||
</t>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="o_slides_discussion_rating">
|
||||
<div class="container mt16 mb16">
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 offset-lg-2">
|
||||
<t t-call="portal.message_thread">
|
||||
<t t-set="object" t-value="channel"/>
|
||||
<t t-set="display_rating" t-value="True"/>
|
||||
<t t-set="disable_composer" t-value="True"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container mt16">
|
||||
<div class="row">
|
||||
<div class="col-12" t-if="search and not slides">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
Sorry, but nothing matches your search criteria <b><t t-esc="search"/></b>. Please try again with different keywords.
|
||||
<div class="col-8 o_wslides_course_header_content">
|
||||
<h3 class="row"><span class="font-weight-bold col" t-field="channel.name"/></h3>
|
||||
<div class="row">
|
||||
<div class="col-12 o_wslides_course_description" t-field="channel.description"/>
|
||||
<div class="col-6 mt8 mb64">
|
||||
<t t-call="website_rating.rating_stars_static_popup_composer">
|
||||
<t t-set="rating_avg" t-value="rating_avg"/>
|
||||
<t t-set="rating_total" t-value="rating_count"/>
|
||||
<t t-set="object" t-value="channel"/>
|
||||
<t t-set="hash" t-value="message_post_hash"/>
|
||||
<t t-set="pid" t-value="message_post_pid"/>
|
||||
<t t-set="default_message_id" t-value="last_message_id"/>
|
||||
<t t-set="default_message" t-value="last_message"/>
|
||||
<t t-set="default_rating_value" t-value="last_rating_value"/>
|
||||
<t t-set="force_submit_url" t-value="'/slides/mail/update_comment' if last_message_id else False"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-12" style="padding-left: 15px;padding-right: 15px;" t-if="channel.total_slides == 0">
|
||||
<div class="jumbotron">
|
||||
<h1>No presentation published yet.</h1>
|
||||
<p>
|
||||
The <i><t t-esc="channel.name"/></i> is empty.
|
||||
<span t-if="channel.can_upload">
|
||||
Upload PDF presentations, documents, videos or infographic using the button below.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_wslides_course_content">
|
||||
<div class="col-lg-12 o_wslides_container o_wslides_content_container">
|
||||
<div class="row justify-content-end o_wslides_course_content_nav">
|
||||
<div class="col-8">
|
||||
<ul class="nav nav-tabs o_wslides_nav_tabs" role="tablist" id="profile_extra_info_tablist">
|
||||
<li class="nav-item o_wslides_nav_tabs_item_home">
|
||||
<a t-att-href="'/slides/%s%s?%s' % (slug(channel), '/%s' % slug(category) if category else '', keep_query('debug'))"
|
||||
t-att-class="'nav-link o_wslides_navlink %s' % ('' if search_slide_type else 'active')">
|
||||
<i class="fa fa-home"/> Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a t-att-href="'/slides/%s' % (slug(channel))"
|
||||
t-att-class="'nav-link o_wslides_navlink'">Review</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_wslides_course_content_main">
|
||||
<!-- Channel presentation, aka general information + CTAs -->
|
||||
<div class="col-4 o_wslides_course_content_aside">
|
||||
<div class="row justify-content-center mt8 o_wslides_join_channel">
|
||||
<a t-if="not channel.is_member and channel.visibility == 'public'" role="button"
|
||||
class="col-10 btn btn-primary o_wslides_join_channel_link"
|
||||
title="Start Course" aria-label="Start Course Channel"
|
||||
t-att-href="'#'"
|
||||
t-att-data-channel-id="channel.id">
|
||||
<span class="cta-title text_small_caps">
|
||||
<t t-if="channel.channel_type == 'documentation'">Start Course</t>
|
||||
<t t-else="">Join Course</t>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<!-- Public user has not right to create/write on slide-->
|
||||
<a role="button" t-if="channel.can_upload" class="btn btn-primary oe_slide_js_upload" t-attf-channel-id="#{channel.id}" aria-label="Upload Presentation" title="Upload Presentation" href="#">
|
||||
<i class="fa fa-cloud-upload"></i> Upload
|
||||
</a>
|
||||
<t t-if="not channel.is_member and channel.visibility == 'invite'">
|
||||
<a role="button" class="col-10 btn btn-light" t-att-href="'#'">
|
||||
<span class="cta-title text_small_caps">Private Course</span>
|
||||
</a>
|
||||
</p>
|
||||
<div t-if="channel.enroll_msg" t-field="channel.enroll_msg"/>
|
||||
<span t-if="not channel.enroll_msg">Contact website administrator.</span>
|
||||
</t>
|
||||
<span t-if="channel.is_member" class="col-10 btn btn-primary">
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
<span class="cta-title text_small_caps">Already member</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-12" t-if="slide_type or category or tag">
|
||||
<div class="alert alert-success mb0" role="status" t-if="tag">
|
||||
Results for <strong t-esc="tag.name"/>
|
||||
<div class="row mt8">
|
||||
<span class="col-5">Last Update</span>
|
||||
<span class="col"><t t-esc="channel.slide_last_update" t-options="{'widget': 'date'}"/></span>
|
||||
</div>
|
||||
<t t-call="website_slides.slides_grid_view"/>
|
||||
</div>
|
||||
<div class="row text-center" t-if="slide_type or category or tag">
|
||||
<t t-call="website.pager"/>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-12 mb16" t-if="not slide_type and category_datas and not tag">
|
||||
<t t-foreach="category_datas" t-as="category">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-12">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-12 mt8 oe_slides_bottom_border">
|
||||
<a t-if="category['id']" t-attf-href="/slides/#{slug(channel)}/category/#{category['id']}" class="h3 mt0 mb0">
|
||||
<t t-esc="category['name']"/>
|
||||
</a>
|
||||
<span t-if="not category['id']" title="Uncategorized presentation" class="h3 mt0 mb0">
|
||||
<t t-esc="category['name']"/>
|
||||
</span>
|
||||
<a t-attf-href="/slides/#{slug(channel)}/category/#{category['id']}" class="float-right" t-if="category['total_slides'] - 4 > 0 and category['id']">
|
||||
<i class="fa fa-arrow-right"/> See all
|
||||
</a>
|
||||
<div class="row mt8">
|
||||
<span class="col-5">Members</span>
|
||||
<span class="col" t-esc="channel.members_count"/>
|
||||
</div>
|
||||
<div class="row mt8"><div class="col"><hr/></div></div>
|
||||
<t t-set="slide_type_keys" t-value="slide_types.keys()"/>
|
||||
<t t-foreach="slide_type_keys" t-as="slide_type_key">
|
||||
<div class="row mt8 align-items-center">
|
||||
<span class="col-5">
|
||||
<t t-if="search_category">
|
||||
<a t-att-href="'/slides/%s/category/%s?%s' % (slug(channel), slug(search_category), keep_query('debug', slide_type=slide_type_key))"
|
||||
t-att-class="'%s' % ('active' if search_slide_type == slide_type_key else '')">
|
||||
<t t-esc="slide_types[slide_type_key]"/>
|
||||
</a>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<a t-att-href="'/slides/%s?%s' % (slug(channel), keep_query('debug', slide_type=slide_type_key))"
|
||||
t-att-class="'%s' % ('active' if search_slide_type == slide_type_key else '')">
|
||||
<t t-esc="slide_types[slide_type_key]"/>
|
||||
</a>
|
||||
</t>
|
||||
</span>
|
||||
<span class="col">
|
||||
<t t-if="search_category">
|
||||
<span class="badge badge-pill badge-info" t-esc="search_category['nbr_%ss' % slide_type_key]"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="badge badge-pill badge-info" t-esc="channel['nbr_%ss' % slide_type_key]"/>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<div class="row mt8"><div class="col"><hr/></div></div>
|
||||
<div class="row justify-content-center mt8">
|
||||
<button role="button" class="btn btn-primary col-10" title="Share Channel"
|
||||
aria-label="Share Channel"
|
||||
data-toggle="modal" data-target="#slideChannelShareModal">
|
||||
<i class="fa fa-share-square"></i> Share
|
||||
</button>
|
||||
<div class="modal fade" id="slideChannelShareModal" tabindex="-1" role="dialog" aria-labelledby="slideChannelShareModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="slideChannelShareModalLabel">
|
||||
Share
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span>&times;</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5>Share on Social Networks</h5>
|
||||
<t t-call="website_slides.slides_share">
|
||||
<t t-set="record" t-value="channel"/>
|
||||
</t>
|
||||
<h5 class="mt16">Share Link</h5>
|
||||
<input type="text" class="form-control" readonly="readonly" onclick="this.select();"
|
||||
t-att-value="channel.website_url"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="not search">
|
||||
<t t-call="website_slides.slides_grid_view">
|
||||
<t t-set="slides" t-value="category['slides']"/>
|
||||
|
||||
</div>
|
||||
<div t-if="channel.can_upload" class="row justify-content-center mt8 mb8">
|
||||
<a role="button" class="btn btn-primary oe_slide_js_upload col-10" title="Upload Presentation"
|
||||
aria-label="Upload Presentation" href="#"
|
||||
t-att-data-channel-id="channel.id"
|
||||
t-att-data-can-upload="channel.can_upload"
|
||||
t-att-data-can-publish="channel.can_publish">
|
||||
<i class="fa fa-cloud-upload"></i> Upload
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Channel content, aka slides (lessons in documentation mode) -->
|
||||
<div class="col-8 mt24 ml32 o_wslides_channel_content_promoted">
|
||||
<div class="row mt16 align-items-center">
|
||||
<div class="col">
|
||||
<h3><i class="fa fa-plus-square"/> Featured lesson</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="slide_promoted">
|
||||
<div class="col-4">
|
||||
<img class="img img-fluid" t-att-src="'/web/image/slide.slide/%s/image' % slide_promoted.id"/>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="row">
|
||||
<h3 class="col-6" t-att-title="slide_promoted.name">
|
||||
<t t-if="slide_promoted.is_preview or channel.is_member">
|
||||
<a t-attf-href="/slides/slide/#{slug(slide_promoted)}" class="font-weight-bold text-muted" t-field="slide_promoted.name"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="font-weight-bold text-muted" t-field="slide_promoted.name"/>
|
||||
</t>
|
||||
</h3>
|
||||
<div class="col-12" t-field="slide_promoted.description"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Channel content, aka slides (lessons in documentation mode) -->
|
||||
<div class="col-12">
|
||||
<div class="tab-content mt16" id="slideChannelContent">
|
||||
<div class="tab-pane active" role="tabpanel" aria-labelledby="profile-tab" id="slideChannelContentAbout">
|
||||
<t t-foreach="category_data" t-as="category">
|
||||
<div class="row mt16 align-items-center">
|
||||
<div class="col">
|
||||
<a t-att-href="'/slides/%s/category/%s' % (slug(channel), category['id'])" class="float-right">
|
||||
View all
|
||||
</a>
|
||||
<h3><i class="fa fa-plus-square"/> <t t-esc="category['name']"/></h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<t t-call="website_slides.slides_grid_view">
|
||||
<t t-set="slides" t-value="category['slides']"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-call="website_slides.slides_grid_view"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Embedded template: display a list of slides in a grid view -->
|
||||
<template id='slides_grid_view' name="Slides (Grid View)">
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-lg-4 col-md-6 col-12 mt16 mb16" t-foreach="slides" t-as="slide">
|
||||
<div class="card card-body">
|
||||
<a t-attf-href="/slides/slide/#{slug(slide)}">
|
||||
<img t-attf-src="/web/image/slide.slide/#{slide.id}/image_thumb" class="img-fluid img-thumbnail oe_slides_grid_thumbnail" alt="slide.name"/>
|
||||
</a>
|
||||
<span t-if="not slide.website_published" class="badge badge-danger" style="position: absolute;right: 20px;top: 7px;">Unpublished</span>
|
||||
|
||||
<div style="padding: 5px;">
|
||||
<h4 class="mt4 mb8 oe_slides_ellipsis">
|
||||
<a t-att-title="slide.name" t-attf-href="/slides/slide/#{slug(slide)}" t-esc="slide.name"/>
|
||||
</h4>
|
||||
<div class="text-muted clearfix">
|
||||
<small class="float-left"><t t-esc="slide.total_views"/> Views</small>
|
||||
<small class="float-right"><timeago class="timeago" t-att-datetime="slide.create_date"></timeago></small>
|
||||
</div>
|
||||
<p t-if="slide.tag_ids" style="padding-top: 5px;">
|
||||
<t t-foreach="slide.tag_ids" t-as="att_tag">
|
||||
<a t-attf-href="/slides/#{slug(channel)}/tag/#{slug(att_tag)}" t-attf-class="badge badge-secondary #{tag and tag.name == att_tag.name and 'badge-primary' ''}" t-field="att_tag.name"/>
|
||||
<div class="row o_wslides_row mt8">
|
||||
<div class="col-lg-3 col-md-6 col-12" t-foreach="slides" t-as="slide">
|
||||
<div class="card o_wslides_lesson_card">
|
||||
<img class="card-img-top img-fuild"
|
||||
style="max-height: 160px;"
|
||||
t-att-src="'/web/image/slide.slide/%s/image_large' % slide.id if slide.image else '/website_slides/static/src/img/channel-default.jpg'"
|
||||
t-att-alt="channel.name"/>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title" t-att-title="slide.name">
|
||||
<t t-if="slide.is_preview or channel.is_member">
|
||||
<a t-attf-href="/slides/slide/#{slug(slide)}" t-esc="slide.name"/>
|
||||
</t>
|
||||
</p>
|
||||
<t t-else="">
|
||||
<span class="text-muted" t-esc="slide.name"/>
|
||||
</t>
|
||||
</h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">
|
||||
<t t-if="user.has_group('website.group_website_publisher')">
|
||||
<i class="fa fa-globe float-right o_wslides_slide_manage_publish"></i>
|
||||
<i class="fa fa-pencil float-right o_wslides_slide_manage_edit"></i>
|
||||
<i class="fa fa-trash float-right o_wslides_slide_manage_unlink"></i>
|
||||
</t>
|
||||
<t t-if="slide.is_preview">
|
||||
<span class="badge badge-info">Free preview</span>
|
||||
</t>
|
||||
<t t-if="not slide.is_published and user.has_group('website.group_website_publisher')">
|
||||
<span class="badge badge-danger">Unpublished</span>
|
||||
</t>
|
||||
</h6>
|
||||
<div class="card-text">
|
||||
<div class="text-muted oe_no_empty" t-field="slide.description"/>
|
||||
<div t-if="slide.tag_ids">
|
||||
<t t-foreach="slide.tag_ids" t-as="tag">
|
||||
<a t-att-href="'/slides/%s/tag/%s' % (slug(slide.channel_id), slug(tag))" class="badge badge-secondary">
|
||||
<t t-esc="tag.name"/>
|
||||
</a>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<!-- CHECKME: like only if logged -->
|
||||
<div class="float-right text-right o_wslides_like">
|
||||
<span class="o_wslides_like_up" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id">
|
||||
<i class="fa fa-thumbs-up fa-1x" role="img" aria-label="Likes" title="Likes"></i>
|
||||
<span t-esc="slide.likes"/>
|
||||
</span>
|
||||
<span class="o_wslides_like_down" tabindex="0" data-toggle="popover" t-att-data-slide-id="slide.id">
|
||||
<i class="fa fa-thumbs-down fa-1x" role="img" aria-label="Dislikes" title="Dislikes"></i>
|
||||
<span t-esc="slide.dislikes"/>
|
||||
</span>
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
<t t-call="website_slides.slides_misc_float_time">
|
||||
<t t-set="value" t-value="slide.completion_time"/>
|
||||
</t>
|
||||
<!-- <t t-esc="slide.total_views"/> Views
|
||||
<timeago class="timeago" t-att-datetime="slide.create_date"></timeago> -->
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -435,7 +411,7 @@
|
||||
<div clas="row">
|
||||
<div class="col-lg-8" t-if="slide.tag_ids">
|
||||
<t t-foreach="slide.tag_ids" t-as="slide_tag">
|
||||
<a t-attf-href="/slides/#{slug(slide.channel_id)}/tag/#{slug(slide_tag)}" t-attf-class="badge badge-secondary ml4 mb4 float-right #{tag and tag.id == slide_tag.id and 'badge-primary' ''}" t-field="slide_tag.name"/>
|
||||
<a t-attf-href="/slides/#{slug(slide.channel_id)}/tag/#{slug(slide_tag)}" t-attf-class="badge badge-secondary ml4 mb4 float-right #{search_tag and search_tag.id == slide_tag.id and 'badge-primary' ''}" t-field="slide_tag.name"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
@@ -708,7 +684,7 @@
|
||||
<template id="related_slides" name="Related Slide">
|
||||
<li class="media mt-3">
|
||||
<a t-attf-href="/slides/slide/#{slug(slide)}" class="mr-3">
|
||||
<img class="oe_slides_apart_small" t-attf-src="/web/image/slide.slide/#{slide.id}/image_thumb" alt="slide.name"/>
|
||||
<img class="oe_slides_apart_small" t-attf-src="/web/image/slide.slide/#{slide.id}/image_small" alt="slide.name"/>
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<a t-attf-href="/slides/slide/#{slug(slide)}"><h6 t-esc="slide.name" class="mb-1"/></a>
|
||||
@@ -723,7 +699,9 @@
|
||||
<!-- Slide sub-template: share: social media -->
|
||||
<template id='slide_social_media' name="Share on Social Networks">
|
||||
<h4 class="mt0">Share on Social Networks</h4>
|
||||
<t t-call="website_slides.slides_share"/>
|
||||
<t t-call="website_slides.slides_share">
|
||||
<t t-set="record" t-value="slide"/>
|
||||
</t>
|
||||
<h4 class="mt-3">Share Link</h4>
|
||||
<input type="text" class="form-control" t-att-value="slide.website_url" readonly="readonly" onClick="this.select();"/>
|
||||
<span class="form-text">Use permanent link to share in social media</span>
|
||||
|
||||
@@ -0,0 +1,429 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo><data>
|
||||
|
||||
<!-- Channels home template -->
|
||||
<template id='courses_home' name="Odoo Courses Homepage">
|
||||
<t t-call="website.layout">
|
||||
<t t-call="website_slides.courses_header">
|
||||
<t t-set="header_title" t-value="'Reach new heights'"/>
|
||||
<t t-set="header_subtitle" t-value="'Start your online course today !'"/>
|
||||
<t t-set="header_text" t-value="'Skill up and have an impact! Your business career starts here. Time to start a course.'"/>
|
||||
<t t-set="header_cta_url" t-value="'slides'"/>
|
||||
<t t-set="header_cta_title" t-value="'Pick a course'"/>
|
||||
</t>
|
||||
<div class="wrap">
|
||||
<div class="container mt16 o_wslides_home_nav">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<button class="navbar-toggler" type="button"
|
||||
data-toggle="collapse" data-target="#navbarSlidesHomepage"
|
||||
aria-controls="navbarSlidesHomepage" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSlidesHomepage">
|
||||
<a class="navbar-brand" href="#"></a>
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item">
|
||||
<h4><a class="nav-link" href="/slides/all"><i class="fa fa-rocket"/> All courses</a></h4>
|
||||
</li>
|
||||
<li class="nav-item ml16">
|
||||
<h4><a class="nav-link" href="/slides/all"><i class="fa fa-certificate"/> Certifications</a></h4>
|
||||
</li>
|
||||
<li class="nav-item ml16">
|
||||
<h4><a class="nav-link" href="/slides/all"><i class="fa fa-file"/> My courses</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="container mt16 o_wslides_home_main">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<t t-if="channels_my">
|
||||
<t t-set="void_count" t-value="3 - len(channels_my[:3])"/>
|
||||
<div class="o_wslides_home_content_section">
|
||||
<div class="row mt16 o_wslides_home_content_section_title align-items-center">
|
||||
<div class="col">
|
||||
<a href="slides/all" class="float-right">View all</a>
|
||||
<h3><i class="fa fa-certificate"/> Complete latest courses</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_wslides_row mt8">
|
||||
<t t-foreach="channels_my[:3]" t-as="channel">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<div class="o_wslides_home_content_section">
|
||||
<div class="row mt16 o_wslides_home_content_section_title align-items-center">
|
||||
<div class="col">
|
||||
<a href="slides/all" class="float-right">View all</a>
|
||||
<h3><i class="fa fa-fire"/> Most popular courses</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_wslides_row mt8">
|
||||
<t t-foreach="channels_popular[:3]" t-as="channel">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_wslides_home_content_section">
|
||||
<div class="row mt16 o_wslides_home_content_section_title align-items-center">
|
||||
<div class="col">
|
||||
<a href="slides/all" class="float-right">View all</a>
|
||||
<h3><i class="fa fa-plus-square"/> Newest courses</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_wslides_row mt8">
|
||||
<t t-foreach="channels_newest[:3]" t-as="channel">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12" t-call="website_slides.course_card"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<t t-if="is_public_user">
|
||||
<t t-call="website_slides.slides_home_achievements_small"/>
|
||||
<t t-call="website_slides.slides_home_users_small"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-call="website_slides.slides_home_user_profile_small"/>
|
||||
<hr />
|
||||
<t t-call="website_slides.slides_home_user_achievements_small"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<t t-call="website_slides.courses_footer">
|
||||
<t t-set="footer_title" t-value="'Meet the people who transformed their company'"/>
|
||||
<t t-set="footer_text" t-value="'Nobody gave me a real text so instead of a lorem ipsum I put that one.'"/>
|
||||
<t t-set="footer_cta_url" t-value="'slides'"/>
|
||||
<t t-set="footer_cta_title" t-value="'Go meet them'"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Channel all/main template -->
|
||||
<template id='courses_all' name="Odoo All Courses">
|
||||
<t t-call="website.layout">
|
||||
<t t-call="website_slides.courses_header">
|
||||
<t t-set="header_title" t-value="'All Courses'"/>
|
||||
<t t-set="header_subtitle" t-value="'Start your online course today !'"/>
|
||||
</t>
|
||||
<div class="wrap">
|
||||
<div class="container mt16 o_wslides_home_nav">
|
||||
<!-- Navbar dynamically composed using displayed channel tag groups. -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" t-att-href="'/slides?%s' % keep_query('debug')"><i class="fa fa-chevron-left"/></a>
|
||||
<button class="navbar-toggler" type="button"
|
||||
data-toggle="collapse" data-target="#navbarTagGroups"
|
||||
aria-controls="navbarTagGroups" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarTagGroups">
|
||||
<t t-set="search_tag_groups" t-value="search_tags.mapped('group_id')"/>
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<t t-foreach="tag_groups" t-as="tag_group">
|
||||
<li t-att-class="'nav-item dropdown ml16 %s' % ('active' if tag_group in search_tag_groups else '')">
|
||||
<h4><a class="nav-link dropdown-toggle"
|
||||
href="/slides/all"
|
||||
t-att-data-target="'#navToogleTagGroup%s' % tag_group.id"
|
||||
role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false"
|
||||
t-esc="tag_group.name"/></h4>
|
||||
<div class="dropdown-menu" t-att-id="'navToogleTagGroup%s' % tag_group.id">
|
||||
<t t-foreach="tag_group.tag_ids" t-as="tag">
|
||||
<a t-att-class="'dropdown-item %s' % ('active' if tag in search_tags else '')"
|
||||
t-att-href="'/slides/all?%s' % keep_query('*', **{'channel_tag_group_id_%s' % tag_group.id: tag.id if tag not in search_tags else False})"
|
||||
t-esc="tag.name"/>
|
||||
</t>
|
||||
</div>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<form method="GET" class="form-inline justify-content-center">
|
||||
<div class="input-group">
|
||||
<input type="search" name="search" class="form-control"
|
||||
placeholder="Search something" aria-label="Search"
|
||||
t-att-value="search_term"/>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-success oe_search_button" type="submit" aria-label="Search" title="Search">
|
||||
<i class="fa fa-search"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="container mt16 o_wslides_home_main">
|
||||
<t t-if="search_term and not channels_layouted">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="alert alert-info">No channel was found matching your search <t t-esc="search_term"/>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="channels_layouted" t-as="channels_row">
|
||||
<t t-set="missing" t-value="0"/>
|
||||
<div class="card-deck mb32">
|
||||
<t t-foreach="channels_row" t-as="channel">
|
||||
<t t-if="channel">
|
||||
<t t-call="website_slides.course_card"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="missing" t-value="missing + 1"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="missing">
|
||||
<div t-att-class="'col-%s' % (missing * 3)"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<t t-call="website_slides.courses_footer">
|
||||
<t t-set="footer_title" t-value="'Meet the people who transformed their company'"/>
|
||||
<t t-set="footer_text" t-value="'Nobody gave me a real text so instead of a lorem ipsum I put that one.'"/>
|
||||
<t t-set="footer_cta_url" t-value="'slides'"/>
|
||||
<t t-set="footer_cta_title" t-value="'Go meet them'"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="courses_header">
|
||||
<section class="s_cover parallax bg-black-50 pt40 pb40 o_wslides_home_header" data-scroll-background-ratio="0" style="background-image: none;">
|
||||
<span class="s_parallax_bg oe_img_bg oe_custom_bg" style="background-image: url("/website_slides/static/src/img/channel_banner_moutain.jpg"); background-position: 52.1% 17.69%;"></span>
|
||||
<div class="container">
|
||||
<div class="row s_nb_column_fixed">
|
||||
<div class="s_title pt0 col-lg-12" data-name="Title">
|
||||
<h1 class="s_title_small_caps" style="font-size: 62px; text-align: left;"><t t-esc="header_title"/></h1>
|
||||
<h4 t-if="header_subtitle" class="s_title_small_caps" style="font-size: 34px; text-align: left;"><t t-esc="header_subtitle"/></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row s_nb_column_fixed">
|
||||
<div t-if="header_text" class="col-lg-3 s_text pt16 pb16" data-name="Text">
|
||||
<p class="lead" style="text-align: left;"><t t-esc="header_text"/></p>
|
||||
</div>
|
||||
<div t-if="header_cta_title" class="col-lg-3 s_btn text-center pt16 pb16" data-name="Buttons">
|
||||
<a t-att-href="header_cta_url"
|
||||
class="btn btn-primary o_default_snippet_text text_small_caps"><t t-esc="header_cta_title"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id="courses_footer">
|
||||
<section class="s_cover parallax bg-black-50 pt40 pb40 o_wslides_home_footer mt16" data-scroll-background-ratio="0" style="background-image: none;">
|
||||
<span class="s_parallax_bg oe_img_bg oe_custom_bg" style="background-image: url("/website/static/src/img/backgrounds/people.jpg"); background-position: 50.11% 29.1%;"></span>
|
||||
<div class="container">
|
||||
<div class="row s_nb_column_fixed">
|
||||
<div class="col-lg-12 s_title" data-name="Title">
|
||||
<h1 class="s_title_small_caps" style="font-size: 40px; text-align: left;"><t t-esc="footer_title"/></h1>
|
||||
<h4 t-if="footer_subtitle" class="s_title_small_caps" style="font-size: 26px; text-align: left;"><t t-esc="footer_subtitle"/></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row s_nb_column_fixed">
|
||||
<div t-if="footer_text" class="col-lg-3 s_text pt16 pb16" data-name="Text">
|
||||
<p class="lead o_default_snippet_text" style="text-align: left;"><t t-esc="footer_text"/></p>
|
||||
</div>
|
||||
<div t-if="footer_cta_title" class="col-lg-3 s_btn text-center pt16 pb16" data-name="Buttons">
|
||||
<a t-att-href="footer_cta_url"
|
||||
class="btn btn-primary o_default_snippet_text text_small_caps"><t t-esc="footer_cta_title"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id='course_card' name="Course Card">
|
||||
<div class="card o_wslides_course_card">
|
||||
<img class="card-img-top img-fuild"
|
||||
style="max-height: 160px;"
|
||||
t-att-src="'/web/image/slide.channel/%s/image_large' % channel.id if channel.image else '/website_slides/static/src/img/channel-default.jpg'"
|
||||
t-att-alt="channel.name"/>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title" t-att-title="channel.name">
|
||||
<a t-attf-href="/slides/#{slug(channel)}" t-esc="channel.name"/>
|
||||
</h5>
|
||||
<div class="card-text">
|
||||
<div class="text-muted oe_no_empty" t-field="channel.description"/>
|
||||
<div t-if="channel.tag_ids">
|
||||
<t t-foreach="channel.tag_ids" t-as="tag">
|
||||
<a t-att-href="'/slides/all?channel_tag_id=%s' % tag.id" class="badge badge-secondary">
|
||||
<t t-esc="tag.name"/>
|
||||
</a>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row justify-content-between align-items-center">
|
||||
<small class="text-muted col-3">
|
||||
<t t-call="website_slides.slides_misc_float_time">
|
||||
<t t-set="value" t-value="channel.total_time"/>
|
||||
</t>
|
||||
</small>
|
||||
<t t-if="channel.is_member">
|
||||
<div class="col">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" t-att-aria-valuenow="channel.completion" aria-valuemin="0" aria-valuemax="100" t-attf-style="width:#{channel.completion}%;">
|
||||
<!-- <span><t t-esc="channel.completion"/>%</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<small class="text-muted col-5"><span t-esc="len(channel.slide_ids)"/> steps</small>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='slides_home_achievements_small' name="Latest Achievements">
|
||||
<div class="o_wslides_home_aside">
|
||||
<div class="row mt16 o_wslides_home_aside_title">
|
||||
<div class="col">
|
||||
<a href="slides" class="text-muted float-right">
|
||||
<small class="float-right">View all</small>
|
||||
</a>
|
||||
<h3>Latest achievements</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<t t-if="achievements">
|
||||
<div class="col">
|
||||
<t t-foreach="achievements" t-as="achievement">
|
||||
<t t-call="website_slides.achievement_card"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else=""><p class="col mt8">No achievements currently :(</p></t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='achievement_card' name="Achivement Card">
|
||||
<div class="row no-gutters mt8 align-items-center">
|
||||
<div class="col-2">
|
||||
<t t-call="website_slides.slides_misc_user_image">
|
||||
<t t-set="user" t-value="achievement.user_id"/>
|
||||
<t t-set="record" t-value="channels_popular[:1]"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="font-weight-bold" t-esc="achievement.user_id.name"/> achieved <a href="/slides"><span t-esc="achievement.badge_id.name"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='slides_home_users_small' name="Latest Users">
|
||||
<div class="o_wslides_home_aside">
|
||||
<div class="row mt16 o_wslides_home_aside_title">
|
||||
<div class="col">
|
||||
<a href="slides" class="text-muted float-right">
|
||||
<small class="float-right">View all</small>
|
||||
</a>
|
||||
<h3>Heroes of the week</h3>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<t t-if="users">
|
||||
<div class="col">
|
||||
<t t-set="counter" t-value="1"/>
|
||||
<t t-foreach="users" t-as="user">
|
||||
<t t-call="website_slides.user_quickkarma_card"/>
|
||||
<t t-set="counter" t-value="counter + 1"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else=""><p class="col mt8">No heroes currently :(</p></t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='user_quickkarma_card' name="User QuickKarma Card">
|
||||
<div class="row no-gutters mt8 align-items-center">
|
||||
<div class="col-2">
|
||||
<span class="font-weight-bold text-muted o_wslides_home_circled" t-esc="counter"/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<t t-call="website_slides.slides_misc_user_image">
|
||||
<t t-set="record" t-value="channels_popular[:1]"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="font-weight-bold" t-esc="user.name"/>
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="text-muted" t-esc="user.rank_id.name"/><span class="ml8 mr8">•</span><span t-esc="user.karma" class="badge badge-success"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='slides_home_user_profile_small' name="User Profile">
|
||||
<div class="o_wslides_home_aside">
|
||||
<div class="row mt16 o_wslides_home_aside_title align-items-center">
|
||||
<div class="col">
|
||||
<t t-call="website_slides.slides_misc_user_image">
|
||||
<t t-set="record" t-value="channels_popular[:1]"/>
|
||||
</t>
|
||||
<a t-att-href="'/slides'" class="float-right">Edit</a>
|
||||
<h4 t-esc="user.name" class="font-weight-bold"/>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<p class="col">INSERT DBE TEMPLATE HERE</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='slides_home_user_achievements_small' name="User Achievements">
|
||||
<div class="o_wslides_home_aside mt16">
|
||||
<t t-foreach="challenges" t-as="challenge">
|
||||
<t t-set="challenge_done" t-value="challenge in challenges_done if challenges_done else False"/>
|
||||
<div class="row no-gutters mt8 align-items-center">
|
||||
<div class="col-3">
|
||||
<img t-att-class="'rounded-circle float-left %s' % 'image-muted' if not challenge_done else ''"
|
||||
style="max-height: 36px;"
|
||||
t-att-src="'/web/image/gamification.badge/%s/image_medium' % challenge.reward_id.id"
|
||||
t-att-alt="challenge.reward_id.name"/>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<span t-att-class="'font-weight-bold text_small_caps %s' % 'text-muted' if not challenge_done else ''" t-esc="challenge.reward_id.name"/><br/>
|
||||
<span class="text-muted" t-esc="challenge.reward_id.description"/>
|
||||
</div>
|
||||
<div class="col-2" t-if="challenge_done">
|
||||
<i class="fa fa-check float-right" aria-label="Done" title="Done" role="img"></i>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id='slides_misc_user_image' name="Float Time">
|
||||
<img t-att-class="img_class if img_class else 'rounded-circle float-left'"
|
||||
t-att-style="img_style if img_style else 'max-height: 32px;'"
|
||||
t-att-src="'/profile/avatar/%s?field=image_medium%s' % (user.id, '&res_model=%s&res_id=%s' % (record._name, record.id) if record else '')"
|
||||
t-att-alt="user.name"/>
|
||||
</template>
|
||||
|
||||
<template id='slides_misc_float_time' name="Float Time">
|
||||
<t t-set="hours" t-value="int(value)"/>
|
||||
<t t-set="minuts" t-value="int(60.0 * (value - int(value)))"/>
|
||||
<span t-esc="hours"/> hr
|
||||
<t t-if="minuts">
|
||||
<span t-esc="minuts"/> mins
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</data></odoo>
|
||||
@@ -7,9 +7,14 @@
|
||||
'version': '1.0',
|
||||
'summary': 'Allows to link forum on a course',
|
||||
'description': """A Slide channel can be linked to forum. Also, profiles from slide and forum are regrouped together""",
|
||||
'depends': ['website_slides', 'website_forum'],
|
||||
'depends': [
|
||||
'website_slides',
|
||||
'website_forum'
|
||||
],
|
||||
'data': [
|
||||
'views/slide_channel_views.xml'
|
||||
'views/slide_channel_views.xml',
|
||||
'views/website_slides_templates.xml',
|
||||
'data/slide_channel_demo.xml',
|
||||
],
|
||||
'auto_install': True,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="0">
|
||||
|
||||
<record id="forum_forum_demo_channel_1" model="forum.forum">
|
||||
<field name="name">Basics of Gardening</field>
|
||||
</record>
|
||||
|
||||
<record id="website_slides.slide_channel_demo_1_gard1" model="slide.channel">
|
||||
<field name="forum_id" ref="website_slides_forum.forum_forum_demo_channel_1"/>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo><data>
|
||||
|
||||
<template id='course_main' inherit_id="website_slides.course_main">
|
||||
<!-- Channel main template: add link to forum -->
|
||||
<xpath expr="//li[hasclass('o_wslides_nav_tabs_item_home')]" position="after">
|
||||
<li class="nav-item" t-if="channel.forum_id">
|
||||
<a t-att-href="'/forum/%s' % (slug(channel))"
|
||||
t-att-class="'nav-link o_wslides_navlink'">Forum</a>
|
||||
</li>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data></odoo>
|
||||