[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:
Jeremy Kersten
2015-12-21 17:21:33 +01:00
parent df745c25fb
commit 9f795ef295
+1 -1
View File
@@ -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: