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">
10 <link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}css/annotator.min.css" />
13 {% block pagescripts %}
14 <script type="text/javascript">
15 var note_id = {{ note.id }};
16 var note_thank_url = "{% url 'thank_note' note.id %}"
17 var note_flag_url = "{% url 'flag_note' note.id %}"
18 var edit_note_tags_url = "{% url 'edit_note_tags' note.id %}"
19 var note_downloaded_url = "{% url 'downloaded_note' note.id %}"
20 var note_contents_url = "{{ S3_URL }}{{ note.get_relative_s3_path }}"
21 var pdfControls = {% if pdf_controls %} true {% else %} false {% endif %};
22 var csrf_token = "{{ csrf_token }}";
23 var annotator_js_url = "{{ STATIC_URL }}js/annotator-full.min.js";
24 var annotator_css_url = "{{ STATIC_URL }}css/annotator.min.css";
25 var setup_ajax_url = "{{ STATIC_URL }}js/setup-ajax.js";
26 var empty_js = "{{ STATIC_URL }}js/empty.js";
28 <script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
31 {% block bodyscripts %}
32 <script src="{{ STATIC_URL }}js/note-detail.js" ></script>
33 <script src="{{ STATIC_URL }}js/pxem.jQuery.js"></script>
34 <script src="{{ STATIC_URL }}js/marked.js" ></script>
35 <script src="{{ STATIC_URL }}js/annotator-full.min.js"></script>
36 <script src="{{ STATIC_URL }}js/jquery.cookie.js"></script>
39 $(document).foundation('joyride', 'start');
44 {% block raw_content %}
45 <section id="note_content">
47 <div class="return-to-course show-for-large-up">
49 <div class="small-12 columns">
50 <a href="{{ note.course.get_absolute_url }}">
51 <i class="fa fa-angle-double-left"></i> See all notes for {{ note.course.name }}
57 <div id="note_header">
59 <div class="row header-byline">
60 <div class="small-12 columns">
61 <strong>Lecture note for {{ note.course.name }} </strong>
63 {% if note.course.department.school %}
64 {{ note.course.department.school.name }}
66 {{ note.course.school.name }}
69 <span style="display: inline;"><span class="show-for-large-up"><i class="fa fa-thumbs-up"></i> <span id="thank-number">{{ note.thanks }}</span> Thanks</span></span>
73 <div class="row museo700">
74 <div class="small-12 columns header-title-row">
75 <span class="header-title">{{ note.name }} </span>
76 <span style="display: inline;">
77 <span class="show-for-large-up">
78 {% if user.is_authenticated %}
79 {% if already_thanked %}
80 <button id="thank-button-disabled" class="modify-button disabled opentip"
81 data-ot="You've already thanked this note"
82 {% include 'partial/opentip_settings.html' %}>
83 <i class="fa fa-thumbs-up"></i> Thank Note</button>
85 <button id="thank-button" class="modify-button"><i class="fa fa-thumbs-up"></i> Thank Note</button>
86 <button id="thank-button-disabled" class="modify-button disabled opentip hide"
87 data-ot="You've already thanked this note"
88 {% include 'partial/opentip_settings.html' %}>
89 <i class="fa fa-thumbs-up"></i> Thank Note</button>
92 <button id="thank-button-disabled" class="modify-button disabled opentip"
93 data-ot="Log in to thank this note"
94 {% include 'partial/opentip_settings.html' %}>
95 <i class="fa fa-thumbs-up"></i> Thank Note</button>
98 {% if user.is_authenticated %}
99 {% if already_flagged %}
100 <button id="flag-button-disabled" class="modify-button disabled opentip"
101 data-ot="You've already reported this note"
102 {% include 'partial/opentip_settings.html' %}>
103 <i class="fa fa-thumbs-up"></i> Report Note</button>
105 <button id="flag-button" class="modify-button"><i class="fa fa-thumbs-up"></i> Report Note</button>
106 <button id="flag-button-disabled" class="modify-button disabled opentip hide"
107 data-ot="You've already reported this note"
108 {% include 'partial/opentip_settings.html' %}>
109 <i class="fa fa-thumbs-up"></i> Report Note</button>
112 <button id="flag-button-disabled" class="modify-button disabled opentip"
113 data-ot="Log in to report this note"
114 {% include 'partial/opentip_settings.html' %}>
115 <i class="fa fa-thumbs-up"></i> Report Note</button>
118 {% if user.is_authenticated %}
119 <a href="{{ note.get_fp_url }}">
120 <button id="note-download-button" class="modify-button opentip"
121 data-ot="It costs 2 karma points to download a note"
122 {% include 'partial/opentip_settings.html' %}>
123 <i class="fa fa-download"></i> Download Note</button></a>
125 <button id="note-download-button-disabled" class="modify-button disabled opentip"
126 data-ot="Log in to download this note"
127 {% include 'partial/opentip_settings.html' %}>
128 <i class="fa fa-download"></i> Download Note</button>
131 {% if user.get_profile.can_edit_items %}
132 <button id="edit-note-tags" class="modify-button" data-reveal-id="note-tag-dialog">
133 <i class="fa fa-pencil-square-o"></i> Edit Tags
141 <div id="note-tags" class="row show-for-large-up">
142 <div class="small-12 columns">
143 <strong>Tags: </strong>
145 {% for tag in note.tags.all %}
146 <span class="tag-span">{{ tag.name }}</span>
149 </div><!-- /note_tags -->
152 <div id="note-tag-dialog" class="reveal-modal" data-reveal>
153 <a class="close-reveal-modal">×</a>
155 <div class="small-12 columns">
156 <p>Edit this note's tags:
157 <input id="note_tags_input" type="text" value="{% for tag in note.tags.all %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}"></p>
158 <button id="save_note_tags" type="submit" value="tags-form"><i class="fa fa-save"></i> Save</button>
163 {% if note.license %}
165 <div id="note_pedigree" class="twelve columns activity_details_status">
166 {{ note.license.html|safe }} {% if note.upstream_link %}<a href="{{ note.upstream_link }}" target="_blank">{{ note.upstream_link|slice:":80" }}</a>{% endif %}
167 </div><!-- /note_pedigree -->
171 </div><!-- /note header -->
174 <div id="tabs" class="small-12 columns">
175 <dl class="tabs show-for-large-up" data-tab data-options="deep_linking: true; scroll_to_content: false">
176 <dd class="active"><a href="#note_container">Note</a></dd>
177 <dd id="keywords-tab-button"><a href="#keywords">Keywords</a></dd>
179 <div id="tabs-content" class="tabs-content">
180 <div id="note_container" class="content active">
181 {% if pdf_controls %}
182 <div id="zoom-buttons" class="row show-for-medium-up">
183 <div id="outline-btn-wrapper" class="small-1 columns hide show-for-medium-up">
184 <i id="outline-btn" class="zoom-button fa fa-bars fa-2x"></i>
186 <div class="small-4 columns">
188 <input id="scroll-to" type="text" style="width: 3em; display: inline" /></span>
190 <div class="small-2 small-centered columns center">
191 <i id="minus-btn" class="zoom-button fa fa-search-minus fa-2x"></i>
192 <i id="plus-btn" class="zoom-button fa fa-search-plus fa-2x"></i>
198 <div class="small-12 small-centered columns medium-12 large-12 body_copy">
199 {% if note.static_html %}
200 <div id="note-content-wrapper" class="note-text">
201 {% if note.has_markdown %}
202 <span id="note-markdown" data-markdown="{{note.notemarkdown.markdown}}"></span>
204 <iframe style="border:none; width:100%; min-height: 1000px;"
205 id="noteframe"></iframe>
210 </div> <!-- .note-text -->
212 {% else %} {# note.static_html #}
213 <div class="note-error">
214 This document's content is currently unavailable. Please try again later.
216 {% endif %} {# note.static_html #}
217 </div><!-- /body_copy -->
219 </div><!-- /note_container -->
221 <div id="keywords" class="content">
223 <div class="small-12 columns">
224 <form id="keyword-form" action="{{ note.get_absolute_url }}#keywords" method="post">
226 {{ keyword_formset.management_form }}
227 <div class="hide" id="keyword-form-prototype">
228 <div class="row keyword-form-row">
229 <div class="small-12 large-4 columns">
230 {{ keyword_prototype_form.keyword }}
232 <div class="small-12 large-8 columns">
233 {{ keyword_prototype_form.definition }}
234 {{ keyword_prototype_form.id }}
237 <hr class="hide-for-large-up" />
239 <div id="keyword-form-rows">
240 {% for form_row in keyword_formset %}
241 <div class="row keyword-form-row" data-index="{{ forloop.counter0 }}">
242 <div class="small-12 large-4 columns">
243 {{ form_row.keyword }}
245 <div class="small-12 large-8 columns">
246 {{ form_row.definition }}
250 <hr class="hide-for-large-up" />
253 <div class="row hide-for-medium-down">
254 <div class="small-12 columns">
255 <p class="keywords-hint">(Click <i class="fa fa-plus"></i> or press TAB in the last definition for another row)</p>
259 <div class="small-2 columns">
260 <button type="submit" name="action" value="keyword-form">Save</button>
262 <div class="small-9 large-10 columns center">
263 <i id="add-row-btn" class="fa fa-plus fa-2x"></i>
274 </section><!--/note_content-->
276 <ol class="joyride-list" data-joyride
277 data-options="cookie_monster: true; cookie_name: note_detail_joyride">
278 <li data-id="note-content-wrapper" data-text="Awesome!" data-options="tip_location: top">
279 <p>You can highlight important words or phrases in this note to add definitions for them.</p>
281 <li data-id="keywords-tab-button" data-text="Awesome!" data-options="tip_location: top">
282 <p>Keywords you define will appear here, and you can define new ones here too.</p>