[FIX] wesite_slides: use embed for document and presentation
For performance, we could use iframe with embed document. But it's more styled to use our own slide design that an iframe with a long scrollbar.
This commit is contained in:
@@ -297,7 +297,7 @@ class Slide(models.Model):
|
||||
def _get_embed_code(self):
|
||||
base_url = self.env['ir.config_parameter'].get_param('web.base.url')
|
||||
for record in self:
|
||||
if record.datas and not record.document_id:
|
||||
if record.datas and (not record.document_id or record.slide_type in ['document', 'presentation']):
|
||||
record.embed_code = '<iframe src="%s/slides/embed/%s?page=1" allowFullScreen="true" height="%s" width="%s" frameborder="0"></iframe>' % (base_url, record.id, 315, 420)
|
||||
elif record.slide_type == 'video' and record.document_id:
|
||||
if not record.mime_type:
|
||||
|
||||
Reference in New Issue
Block a user