Improve form layout
[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="//cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/css/jquery.dataTables.min.css">
10   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/home.css">
11 {% endblock %}
12
13 {% block pagescripts %}
14   <script>
15     // If there were form errors, open the form and jump to it
16     var jump_to_form = {% if jump_to_form %} true {% else%} false {% endif %};
17     var csrf_token = "{{ csrf_token }}";
18     var dataTable_sDom = '<"top">rt<"bottom"p><"clear">';
19   </script>
20   <script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
21   <script src="{{ STATIC_URL }}js/course.js"></script>
22   <script src="{{ STATIC_URL }}js/add-course.js"></script>
23   <script src="{{ STATIC_URL }}js/course-list.js"></script>
24   <script src="//cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/jquery.dataTables.min.js"></script>
25 {% endblock %}
26
27 {% block raw_content %}
28 <section id="home_content">
29   <div id="page_header">
30     <div id="splash" class="museo700">
31       <div id="splash_copy" class="row">
32         <div class="small-12 large-8 columns large-offset-2">
33           Access a growing database of <span class="note_count">{{ note_count }}</span> college lecture notes.
34         </div>
35       </div>
36       <div class="row">
37         <div class="small-12 columns">
38           <a href="{% url 'about' %}">
39             <button id="intro-video-button">Watch the video&nbsp;&nbsp;<i class='fa fa-caret-right'></i></button>
40           </a>
41         </div>
42       </div>
43     </div>
44   </div>
45
46   <div id="course-search-bar">
47     <div class="row">
48       <div class="large-2 columns show-for-large-up">
49         <button id="add-course-btn" class="inline-button important" data-reveal-id="add-course-form">Add a Course</button>
50       </div>
51       <div class="small-12 large-6 columns">
52         <input class="search-courses" type="text" placeholder="Search Courses" />
53       </div>
54       <div class="large-4 columns show-for-large-up">
55         <div id="course-sort-wrapper">
56           Sort By
57           <select class="course-sort">
58             <option value="0">Date</option>
59             <option value="1">Number of Notes</option>
60             <option value="2" selected>Popularity</option>
61           </select>
62         </div>
63       </div>
64     </div>
65   </div>
66
67   <div class="row">
68     <div class="small-12 columns">
69       <!-- Main course table -->
70       <table id="data_table_list">
71         <thead class="hide">
72           <tr>
73             <th class="no-display" id="data-table-date"> Date </th>
74             <th class="no-display" id="data-table-note-count"> # Notes </th>
75             <th class="no-display" id="data-table-thanks"> Popularity </th>
76             <th class="no-display" id="data-table-upload"> Course </th>
77           </tr>
78         </thead>
79         <tbody>
80         {% for course in course_list %}
81           {% include 'courses/course_list_entry.html' %}
82         {% endfor %}
83         </tbody>
84       </table>
85     </div>
86   </div> <!-- .row -->
87
88   {% include 'partial/add_course.html' %}
89
90 </section> <!-- #results_content -->
91
92 {% endblock %}
93