From: Charles Connell Date: Sun, 5 Jan 2014 02:34:31 +0000 (-0500) Subject: Show PDF controls for powerpoints too X-Git-Tag: release-20150131~307 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=131f27250ceeb07754c7db0ccda8db1a408062d9;p=oweals%2Fkarmaworld.git Show PDF controls for powerpoints too --- 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):