removing slash after all instances of {{ STATIC_URL }} template tag #66
[oweals/karmaworld.git] / karmaworld / templates / notes / note_detail.html
1 {% extends "base.html" %}
2 {% load url from future %}
3
4 {% block pagestyle %}
5   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/note_course_pages.css">
6 {% endblock %}
7
8 {% block pagescripts %}
9 <script>
10   var view_note_pk = {{ note.id }};
11   var view_note_title = "{{ note.name }}";
12   var view_note_description = "{{ note.desc }}";
13   var editing_note = false;
14
15   function autoResize(id){
16       var newheight;
17       var newwidth;
18
19       if(document.getElementById){
20         newheight = document.getElementById(id).contentWindow.document .body.scrollHeight;
21         newwidth = document.getElementById(id).contentWindow.document .body.scrollWidth;
22       }
23
24       document.getElementById(id).height = (newheight+ 10) + "px";
25       document.getElementById(id).width= (newwidth + 5) + "px";
26       //alert('height: ' + newheight);
27   }
28
29 </script>
30 {% endblock %}
31
32 {% block content %}
33   <section id="note_content">
34
35     <div id="note_header" class="hero_gradient_bar">
36       <div class="row">
37         <div id="note_back_to_course" class="twelve columns">
38           <a href="{{ note.course.get_absolute_url }}">
39             {# TODO: style this not like a link #}
40             <img src="{{ STATIC_URL }}img/search_arrow_left.png" alt="search_arrow_left" width="5" height="10" />&nbsp;back to {{ note.course.name }}
41           </a>
42
43         </div>
44       </div>
45
46       <div class="row">
47         <div id="note_name" class="twelve columns">
48           {{ note.name }}
49         </div><!-- /note_name -->
50       </div>
51
52       {% comment %}
53       <!-- disabiling viewCount and liked count -->
54       <div class="row">
55         <div id="note_status" class="twelve columns">
56           <div class="activity_details_status">
57             So far, <span class="activity_details_status_number">{{ note.numUpVotes }}</span> people have completely fallen in love with with these notes. <span class="activity_details_status_secondary_number">{{ note.viewCount }}</span> people have viewed them.
58           </div><!-- /activity_details_status -->
59         </div><!-- /note_status -->
60       </div>
61       {% endcomment %}
62
63
64
65       {% comment %}
66       <!-- uploaded by style -->
67       <div class="row">
68         <div id="note_author" class="twelve columns">
69           uploaded by
70           {% if owns_file %}
71             you
72           {% else %}
73             {{ note.owner.get_profile.get_name }}
74           {% endif %}
75         </div><!-- /note_author -->
76       </div>
77
78       <!-- vote html -->
79       <div class="row">
80         <div id="note_actions" class="three columns centered">
81           {% if not owns_file %}
82           <div class="row">
83             <div class="six column thank" {% if has_voted %} style="display:none" {% endif %} data-id={{ file.id }}>
84               <img src="{{ STATIC_URL }}img/note_thank.png" alt="note_thank" width="34" height="34" />
85             </div>
86             <div class="six column flag" {% if has_voted %} style="display:none" {% endif %} data-id={{ file.id }}>
87                <img src="{{ STATIC_URL }}img/note_flag.png" alt="note_flag" width="25" height="35" />
88             </div>
89             <div class="twelve column voted_message" data-id={{ file.id }} {% if not has_voted %} style="display:none" {% endif %}>
90               You've
91               <span id="thanked_or_flagged">
92                 {% if not lovable %}
93                   thanked
94                 {% elif not flaggable %}
95                   flagged
96                 {% endif %}
97               </span>
98              this file
99             </div>
100             <!-- disabling downloads for now -->
101             <div class="four column">
102               <img src="{{ STATIC_URL }}img/note_download.png" alt="note_download" width="51" height="36" />
103             </div>
104           </div>
105           {% endif %} <!-- not owns_file -->
106         </div><!-- /note_actions -->
107       </div>
108       {% endcomment %}
109     </div><!-- /note_header -->
110
111
112     <div id="note_container">
113
114       <div class="row">
115         <div class="eight columns centered body_copy">
116
117           {% if note.desc %}
118             <h1>description</h1>
119
120             <p>{{ note.desc }}</p>
121           {% endif %}
122
123           <h1>notes</h1>
124
125           <div class="note-text">
126             <iframe style="border:none; width:100%;" id="noteframe" src="/raw/{{ note.id }}" onload="autoResize('noteframe')">
127             </iframe>
128           </div> <!-- .note-text -->
129           <div class="note-error" style="display:none">
130             This document's content is currently unavailable. It's likely the document is still being processed. Please try again later.
131           </div>
132
133         </div><!-- /body_copy -->
134       </div>
135
136     </div><!-- /note_container -->
137
138
139   </section><!--/note_content-->
140 {% endblock %}