1 {% extends "base.html" %}
2 {% load url from future %}
9 <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/note_course_pages.css">
12 {% block pagescripts %}
13 <script type="text/javascript">
14 var note_thank_url = "{% url 'thank_note' note.id %}"
15 var note_flag_url = "{% url 'flag_note' note.id %}"
16 var edit_note_tags_url = "{% url 'edit_note_tags' note.id %}"
17 var note_downloaded_url = "{% url 'downloaded_note' note.id %}"
18 var note_contents_url = "{{ S3_URL }}{{ note.get_relative_s3_path }}"
20 var pdfControls = true;
22 var pdfControls = false;
24 var csrf_token = "{{ csrf_token }}";
26 <script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
27 <script src="{{ STATIC_URL }}js/note-detail.js" ></script>
28 <script src="{{ STATIC_URL }}js/pxem.jQuery.js"></script>
32 <section id="note_content">
34 <div id="note_header" class="hero_gradient_bar">
36 <div class="twelve columns header_subhead">
37 <a href="{{note.course.get_absolute_url}}">
38 <i class="fa fa-arrow-left"></i> back to {{ note.course.name }}
44 <div class="small-12 columns header_title">
46 </div><!-- /note_name -->
50 <div id="note_tags" class="twelve columns activity_details_context">
53 {% for tag in note.tags.all %}
54 <span class="tag-span">{{ tag.name }}</span>
57 {% if user.get_profile.can_edit_items %}
58 <i id="edit_note_tags" class="fa fa-pencil-square-o"></i>
60 </div><!-- /note_tags -->
63 {% if user.get_profile.can_edit_items %}
65 <div id="note_tags_form" class="twelve columns activity_details_context hide">
66 <input id="note_tags_input" type="text" value="{% for tag in note.tags.all %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}">
67 <button id="save_note_tags" type=button><i class="fa fa-save"></i> Save</button>
73 <div id="note_status" class="twelve columns">
74 <div class="activity_details_status">
75 So far, <span id="thank-number" class="activity_details_status_number">{{ note.thanks }}</span> people have completely fallen in love with with these notes.
76 </div><!-- /activity_details_status -->
77 </div><!-- /note_status -->
81 <div id="note_actions" class="large-3 medium-6 small-12 columns small-centered">
83 {% if user.is_authenticated %}
84 <div class="small-4 column">
85 {% if already_flagged %}
86 <img src="{{ STATIC_URL }}img/note_flag_disabled.png"
88 width="25" height="35"
89 data-ot="You've already flagged this note"
90 {% include 'partial/opentip_settings.html' %}
93 <a href="#" id="flag-button">
94 <img src="{{ STATIC_URL }}img/note_flag.png" alt="note_flag" width="25" height="35" />
97 <a href="#" id="flag-button-disabled" class="hide">
98 <img src="{{ STATIC_URL }}img/note_flag_disabled.png" alt="note_flag" width="25" height="35" />
101 <div class="small-4 column">
102 {% if already_thanked %}
103 <img src="{{ STATIC_URL }}img/note_thank_disabled.png"
105 width="34" height="34"
106 data-ot="You've already thanked this note"
107 {% include 'partial/opentip_settings.html' %}
110 <a href="#" id="thank-button">
111 <img src="{{ STATIC_URL }}img/note_thank.png" alt="note_thank" width="34" height="34"/>
114 <a href="#" id="thank-button-disabled" class="hide">
115 <img src="{{ STATIC_URL }}img/note_thank_disabled.png" alt="note_thank" width="34" height="34"/>
118 <div class="small-4 column">
119 <a id="note-download-button" href="{{ note.get_fp_url }}">
121 src="{{ STATIC_URL }}img/note_download.png"
123 width="51" height="36"
124 data-ot="It costs 2 karma points to download a note"
125 {% include 'partial/opentip_settings.html' %}
130 <div class="small-4 column">
131 <img src="{{ STATIC_URL }}img/note_flag_disabled.png"
133 width="25" height="35"
134 data-ot="You need to log in to flag a note"
135 {% include 'partial/opentip_settings.html' %}
138 <div class="small-4 column">
139 <img src="{{ STATIC_URL }}img/note_thank_disabled.png"
141 width="34" height="34"
142 data-ot="You need to log in to thank a note"
143 {% include 'partial/opentip_settings.html' %}
146 <div class="small-4 column">
148 src="{{ STATIC_URL }}img/note_download_disabled.png"
150 width="51" height="36"
151 data-ot="You need to log in to download a note"
152 {% include 'partial/opentip_settings.html' %}
158 </div><!-- /note_actions -->
161 {% if note.license %}
163 <div id="note_pedigree" class="twelve columns activity_details_status">
164 {{ note.license.html|safe }} {% if note.upstream_link %}<a href="{{note.upstream_link}}" target="_blank">{{ note.upstream_link|slice:":80" }}</a>{% endif %}
165 </div><!-- /note_pedigree -->
169 </div><!-- /course_header -->
171 {% if pdf_controls %}
172 <div id="zoom-buttons" class="row show-for-medium-up">
173 <div id="outline-btn-wrapper" class="small-1 columns hide show-for-medium-up">
174 <i id="outline-btn" class="zoom-button fa fa-bars fa-2x"></i>
176 <div class="small-4 columns">
178 <input id="scroll-to" type="text" style="width: 3em; display: inline" /></span>
180 <div class="small-2 small-centered columns center">
181 <i id="minus-btn" class="zoom-button fa fa-search-minus fa-2x"></i>
182 <i id="plus-btn" class="zoom-button fa fa-search-plus fa-2x"></i>
188 <div id="note_container">
190 <div class="small-12 small-centered columns medium-12 large-12 body_copy">
191 {% if note.static_html %}
192 <div class="note-text">
193 <iframe style="border:none; width:100%; min-height: 1000px;"
194 id="noteframe"> </iframe>
198 </div> <!-- .note-text -->
200 {% else %} {# note.static_html #}
201 <div class="note-error">
202 This document's content is currently unavailable. Please try again later.
204 {% endif %} {# note.static_html #}
205 </div><!-- /body_copy -->
208 </div><!-- /note_container -->
211 </section><!--/note_content-->