From e8b5d82e45280e454d2c00b713dbd04a5cb8d3e1 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 1 Nov 2019 11:48:46 -0400 Subject: [PATCH] Revert "Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks" --- .../templates/static_content.html | 5 ++++- lms/templates/pdf_viewer.html | 22 +++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 1945206659..afa7fbab8e 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -31,7 +31,10 @@ logger = logging.getLogger(__name__) %> <%def name='url(file, raw=False)'><% -url = staticfiles_storage.url(file) +try: + url = staticfiles_storage.url(file) +except: + url = file ## HTML-escaping must be handled by caller %>${url | n, decode.utf8}${"?raw" if raw else ""} diff --git a/lms/templates/pdf_viewer.html b/lms/templates/pdf_viewer.html index 6c91bd20ef..5702e030f4 100644 --- a/lms/templates/pdf_viewer.html +++ b/lms/templates/pdf_viewer.html @@ -32,23 +32,23 @@ http://sourceforge.net/adobe/cmap/wiki/License/ ${current_chapter['title'] if current_chapter else ''} - + - + - - - + + + - + <%static:js group='main_vendor'/> <%static:js group='application'/> @@ -417,7 +417,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/ - - + +