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=button><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>
176 <dd class="active"><a href="#note_container">Note</a></dd>
178 <div class="tabs-content">
179 <div id="note_container" class="content active">
180 {% if pdf_controls %}
181 <div id="zoom-buttons" class="row show-for-medium-up">
182 <div id="outline-btn-wrapper" class="small-1 columns hide show-for-medium-up">
183 <i id="outline-btn" class="zoom-button fa fa-bars fa-2x"></i>
185 <div class="small-4 columns">
187 <input id="scroll-to" type="text" style="width: 3em; display: inline" /></span>
189 <div class="small-2 small-centered columns center">
190 <i id="minus-btn" class="zoom-button fa fa-search-minus fa-2x"></i>
191 <i id="plus-btn" class="zoom-button fa fa-search-plus fa-2x"></i>
197 <div class="small-12 small-centered columns medium-12 large-12 body_copy">
198 {% if note.static_html %}
199 <div class="note-text">
200 {% if note.has_markdown %}
201 <span id="note-markdown" data-markdown="{{note.notemarkdown.markdown}}"></span>
203 <iframe style="border:none; width:100%; min-height: 1000px;"
204 id="noteframe"></iframe>
209 </div> <!-- .note-text -->
211 {% else %} {# note.static_html #}
212 <div class="note-error">
213 This document's content is currently unavailable. Please try again later.
215 {% endif %} {# note.static_html #}
216 </div><!-- /body_copy -->
219 </div><!-- /note_container -->
223 </section><!--/note_content-->
225 <ol class="joyride-list" data-joyride
226 data-options="cookie_monster: true; cookie_name: note_detail_joyride">
227 <li data-id="note-markdown" data-text="Awesome!" data-options="tip_location: top">
228 <p>You can highlight important words or phrases in this note to add definitions for them.</p>