Commit 323ccfdcba2fb0190638f029bb1c13885b2df7c9

Authored by Zambom
1 parent 32cdd32b

Adding alternative to show pdf in mobile broswer

Showing 1 changed file with 18 additions and 20 deletions   Show diff stats
pdf_file/templates/pdf_file/view.html
@@ -33,25 +33,23 @@ @@ -33,25 +33,23 @@
33 <div class="panel panel-info topic-panel-invisible"> 33 <div class="panel panel-info topic-panel-invisible">
34 <div class="panel-heading panel-invisible"> 34 <div class="panel-heading panel-invisible">
35 {% endif %} 35 {% endif %}
36 - <div class="row">  
37 - <div class="col-md-12 category-header">  
38 - <h4 class="panel-title" style="margin-top: 10px; margin-bottom: 8px">  
39 - <span>{{pdf_file}}</span>  
40 - </h4>  
41 -  
42 - <div class="col-md-5 pull-right category-card-items">  
43 - <a href="{% url 'mural:resource_view' pdf_file.slug %}" class="pull-right action_icon">  
44 - <i class="fa fa-list" aria-hidden="true"></i>  
45 - {% resource_mural_number pdf_file request.user %}  
46 - </a>  
47 - </div>  
48 - </div> 36 + <div class="row">
  37 + <div class="col-md-12 category-header">
  38 + <h4 class="panel-title" style="margin-top: 10px; margin-bottom: 8px">
  39 + <span>{{pdf_file}}</span>
  40 + </h4>
  41 +
  42 + <div class="col-md-5 pull-right category-card-items">
  43 + <a href="{% url 'mural:resource_view' pdf_file.slug %}" class="pull-right action_icon">
  44 + <i class="fa fa-list" aria-hidden="true"></i>
  45 + {% resource_mural_number pdf_file request.user %}
  46 + </a>
49 </div> 47 </div>
50 </div> 48 </div>
51 -<object width="100%" height="800px" type="application/pdf" data="{{pdf_file.file.url}}" id="pdf_content">  
52 - <p>{% trans "PDF could not be displayed" %}</p>  
53 - </object>  
54 -  
55 -  
56 -  
57 -{% endblock content %} 49 + </div>
  50 + </div>
  51 + <object width="100%" height="800px" type="application/pdf" data="{{pdf_file.file.url}}" id="pdf_content">
  52 + <iframe id="pdfviewer" src="http://docs.google.com/gview?embedded=true&url={{pdf_file.file.url}}" frameborder="0" width="100%" height="800px"></iframe>
  53 + {# <p>{% trans "PDF could not be displayed" %}</p> #}
  54 + </object>
  55 +{% endblock content %}
58 \ No newline at end of file 56 \ No newline at end of file