More work on the front page
[oweals/karmaworld.git] / karmaworld / templates / courses / course_list.html
1 {% extends "base.html" %}
2 {% load url from future %}
3
4 {% block title %}
5   Share College Course Notes
6 {% endblock %}
7
8 {% block pagestyle %}
9   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/home.css">
10   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/data_table_list.css">
11   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/datatables-css/jquery.dataTables.css">
12 {% endblock %}
13
14 {% block pagescripts %}
15   <script>
16     // If there were form errors, open the form and jump to it
17     var jump_to_form = {% if jump_to_form %} true {% else%} false {% endif %};
18   </script>
19   <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
20   <script src="{{ STATIC_URL }}js/course-list.js"></script>
21 {% endblock %}
22
23 {% block content %}
24 <section id="home_content">
25   <div id="page_header" class="">
26     <div id="subhead" class="row">
27       <div id="splash">
28         Browse and contribute lecture notes and quizzes from over 100 college courses.
29       </div>
30     </div>
31   </div>
32
33   <div id="course-search-bar" class="row">
34     <div class="small-12 columns">
35       <button class="add-course" onclick="$('#add-course-btn').click();">Add a Course</button>
36       <input class="search-courses" type="text" placeholder="Search Courses" />
37       <div id="course-sort-wrapper">
38         Sort By
39         <select class="course-sort">
40           <option value="0">Date</option>
41           <option value="1">Number of Notes</option>
42           <option value="2" selected>Popularity</option>
43         </select>
44       </div>
45     </div>
46   </div>
47
48
49   <div class="row">
50     <div class="small-12 columns">
51       <!-- Main course table -->
52       <table id="data_table_list">
53         <thead class="hide">
54           <tr>
55             <th class="no-display" id="data-table-date"> Date </th>
56             <th class="no-display" id="data-table-note-count"> # Notes </th>
57             <th class="no-display" id="data-table-thanks"> Popularity </th>
58             <th class="no-display" id="data-table-upload"> School & Instructor </th>
59             <th class="no-display" id="data-table-course-name"> Course Name </th>
60             <th class="no-display" id="data-table-school-name"> Stats </th>
61           </tr>
62         </thead>
63         <tbody>
64         {% for course in object_list %}
65           {% include 'courses/course_list_entry.html' %}
66         {% endfor %}
67         </tbody>
68       </table>
69     </div><!-- .ten columns -->
70   </div> <!-- .row -->
71
72   <div class="row">
73     <div id="add-course-divider" class="small-10 columns small-offset-1"> <hr/> </div>
74   </div>
75
76   <div class="row">
77     <div class="small-12 columns large-10 large-offset-1">
78       <div id="add-course-btn">
79         <i class="fa fa-arrow-circle-o-up"></i> add a course
80       </div>
81       {% include 'partial/add_course.html' %}
82     </div><!-- .ten columns -->
83   </div> <!-- .row -->
84
85   <div class="row">
86     <div class="small-10 columns small-offset-1"> <hr/> </div>
87   </div>
88
89 </section> <!-- #results_content -->
90
91 {% endblock %}
92
93 {% block bodyscripts %}
94 {% endblock bodyscripts %}