1 {% extends "base.html" %}
2 {% load url from future %}
5 Share College Course Notes
9 <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/home.css">
10 <!-- <link rel="stylesheet" href="{{ STATIC_URL }}css/responsive-tables.css"> -->
11 <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/data_table_list.css">
12 <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/datatables-css/jquery.dataTables.css">
15 {% block pagescripts %}
16 <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
19 $(document).ready(function() {
20 // If there were form errors, open the form and jump to it
21 var jump_to_form = {% if jump_to_form %}true{% else%}false{% endif %};
23 $("#add-course-form").show();
24 $('#add-course-btn').hide();
25 document.getElementById('add-course-form').scrollIntoView(true);
28 // load dataTable for course data
29 $('#data_table_list').dataTable({
30 // remove the default filter label
34 // we will set column widths explicitly
36 // don't provide a option for the user to change the table page length
37 'bLengthChange': false,
38 // sepcify the number of rows in a page
40 // Position the filter bar at the top
41 'sDom': '<"top"f>rt<"bottom"p><"clear">',
42 // Specify options for each column
45 // 4th element: thanks
66 // 1st element: "sort by" label
73 'aaSorting': [[6,'desc']]
75 $('.dataTables_filter input').attr("placeholder", "search courses");
76 // TODO: can't prepend html to .dataTables_filter input html for fontawesome search icon
82 <section id="home_content">
83 <div id="page_header" class="">
84 <div id="subhead" class="row">
85 <div class="small-3 large-2 columns">
86 <img src='{{ STATIC_URL }}img/noun_project_6858.svg' alt="A depiction of books">
88 <div class="small-9 large-10 columns">
89 <div class="row subhead-spacer hide-for-small"> </div>
90 <span>Access a growing database of <span style="color: #f05a28;">{{ note_count }}</span> college lecture notes</span>
95 <div class="small-12 columns">
96 <!-- Main course table -->
97 <table id="data_table_list">
100 <th id="data-table-sort-by"> Sort by: </th>
101 <th class="no-display" id="data-table-date-hidden"> Date </th>
102 <th class="no-display" id="data-table-note-count-hidden"> # Notes </th>
103 <th class="no-display" id="data-table-thanks-hidden"> Popularity </th>
104 <th id="data-table-date"> Date </th>
105 <th id="data-table-note-count"> # Notes </th>
106 <th id="data-table-thanks"> Popularity </th>
107 <th class="no-display" id="data-table-upload"> Upload </th>
108 <th class="no-display" id="data-table-course-name"> Course Name </th>
109 <th class="no-display" id="data-table-school-name"> Institution </th>
110 <th class="no-display" id="data-table-instructor-name"> Instructor </th>
114 {% for course in object_list %}
115 {% include 'courses/course_list_entry.html' %}
119 </div><!-- .ten columns -->
123 <div id="add-course-divider" class="small-10 columns small-offset-1"> <hr/> </div>
127 <div class="small-12 columns large-10 large-offset-1">
128 <div id="add-course-btn">
129 <i class="fa fa-arrow-circle-o-up"></i> add a course
131 {% include 'partial/add_course.html' %}
132 </div><!-- .ten columns -->
136 <div class="small-10 columns small-offset-1"> <hr/> </div>
139 </section> <!-- #results_content -->
143 {% block bodyscripts %}
144 {% endblock bodyscripts %}