From 131f27250ceeb07754c7db0ccda8db1a408062d9 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Sat, 4 Jan 2014 21:34:31 -0500 Subject: [PATCH] Show PDF controls for powerpoints too --- karmaworld/apps/notes/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/karmaworld/apps/notes/views.py b/karmaworld/apps/notes/views.py index 502356f..4cd3e3e 100644 --- a/karmaworld/apps/notes/views.py +++ b/karmaworld/apps/notes/views.py @@ -20,11 +20,10 @@ from karmaworld.apps.notes.models import Note from karmaworld.apps.notes.forms import NoteForm -ZOOM_MIMETYPES = ( +PDF_MIMETYPES = ( 'application/pdf', - 'image/jpeg', - 'image/png', - 'image/tiff' + 'application/vnd.ms-powerpoint', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' ) def is_pdf(self): @@ -58,8 +57,7 @@ class NoteDetailView(DetailView): kwargs['pdf'] = is_pdf(self) kwargs['ppt'] = is_ppt(self) - - if self.object.mimetype == 'application/pdf': + if self.object.mimetype in PDF_MIMETYPES: kwargs['pdf_controls'] = True if self.request.session.get(format_session_increment_field(self.object.id, THANKS_FIELD), False): -- 2.25.1