Merge branch 'master' into feature_course_add_with_dept
authorCharles Connell <charles@connells.org>
Sun, 13 Apr 2014 23:17:26 +0000 (19:17 -0400)
committerCharles Connell <charles@connells.org>
Sun, 13 Apr 2014 23:17:26 +0000 (19:17 -0400)
Conflicts:
karmaworld/apps/courses/views.py
karmaworld/assets/css/global.css
karmaworld/assets/js/add-course.js
karmaworld/templates/courses/course_detail.html
karmaworld/templates/courses/course_list.html
karmaworld/templates/courses/course_list_entry.html
karmaworld/templates/partial/add_course.html
karmaworld/templates/user_profile.html

1  2 
karmaworld/apps/courses/admin.py
karmaworld/apps/courses/views.py
karmaworld/assets/css/global.css
karmaworld/assets/css/home.css
karmaworld/settings/common.py
karmaworld/templates/courses/course_detail.html
karmaworld/templates/courses/course_list.html
karmaworld/templates/courses/course_list_entry.html
karmaworld/templates/partial/add_course.html
karmaworld/templates/user_profile.html
karmaworld/urls.py

Simple merge
index 30dcb77b98709aa4d3591c377abead58d229691c,d7ecef62d90b17e7d366fd997599fe7d30a383d4..e355525bbb08d028c4bcd957886aa566b47f3b72
@@@ -4,7 -4,8 +4,8 @@@
  """ Views for the KarmaNotes Courses app """
  
  import json
--
++g
+ from django.conf import settings
  from django.core import serializers
  from django.core.exceptions import MultipleObjectsReturned
  from django.core.exceptions import ObjectDoesNotExist
@@@ -64,10 -42,14 +65,11 @@@ class CourseListSubView(ListView)
          # get the total number of notes
          context['note_count'] = Note.objects.count()
          # get the course form for the form at the bottom of the homepage
 -        context['course_form'] = kwargs.get('course_form', CourseForm())
 -        if context['course_form'].errors:
 -            # if there was an error in the form
 -            context['jump_to_form'] = True
 +        context['course_form'] = CourseForm()
  
-         # Include "Add Course" button in header
-         context['display_add_course'] = True
+         # Include settings constants for honeypot
+         for key in ('HONEYPOT_FIELD_NAME', 'HONEYPOT_VALUE'):
+             context[key] = getattr(settings, key)
  
          return context
  
index fe1f2deae621c867a20d2271b4951aa54569c52d,6c5faaa194d9a4eb7b36d4ed68c56a9d9d7c8014..12135296f8b6e30c6722691dad2d77a36e4493c8
@@@ -499,480 -137,112 +137,112 @@@ a.inherit-color 
    text-decoration: underline;
  }
  
- a.activity_target:hover
- {
-   color: #f1592a;
- }
- .course_details
- {
-   font-size: 14px;
-   line-height: 2em;
- }
- .activity_details_context, .activity_details_context a
- {
-   font-family: "MuseoSlab-900";
-   font-size: 11px;
-   text-transform: uppercase;
-   line-height: 200%;
-   padding: 5px 0;
- }
- .activity_details_callout
- {
-   padding: 20px 25px;
-   margin: 15px 0 13px;
- }
- .note_preview
- {
-   margin-bottom: 2em;
-   line-height: 125%;
-   font: 14px/1.4em "Georga", Serif;
-   font-style: italic;
- }
- .activity_details_callout_copy
- {
-   line-height: 125%;
-   font: 14px/1.4em "Georga", Serif;
-   font-style: italic;
- }
- .activity_details_status
- {
-   font-size: 13px;
-   font-family: "MuseoSans-500";
-   color: #232323;
- }
- .activity_details_status_number
- {
-   color: #f1592a;
-   font-family: "MuseoSans-900";
- }
- .activity_details_status_secondary_number
- {
-   font-family: "MuseoSlab-900";
- }
- .badge
- {
-   background: none repeat scroll 0 0 #FFFFCD;
-   border-top-color: rgb(238, 238, 238);
-   border-right-color: rgb(204, 204, 204);
-   border-bottom-color: rgb(204, 204, 204);
-   border-left-color: rgb(238, 238, 238);
-   border-style: solid;
-   border-width: 1px;
-   font-size: 14px;
-   padding: 4px 6px 4px 6px;
+ span.table-school {
    font-weight: bold;
-   line-height: 250%;
  }
  
- .course_meta_action
- {
-   height: 36px;
-   width: 39px;
-   font-family: "MuseoSlab-900";
-   font-size: 9px;
-   color: #FFF;
-   text-align: center;
-   padding-top: 13px;
-   margin-top: 20px; /* POSITION WITH JAVASCRIPT */
- }
- .course_meta_join
- {
-   background: url(../img/course_meta_join_bg.png) no-repeat;
-   text-transform: uppercase;
+ span.table-note-count,
+ span.table-quiz-count,
+ span.table-thanks-count {
+   margin-right: 15px;
  }
  
- .course_meta_drop
- {
-   background: url(../img/course_meta_drop_bg.png) no-repeat;
-   text-transform: uppercase;
+ .table-course-name {
+   font-size: 1.8em;
+   margin-right: 10px;
  }
  
- .add-note-btn:before {
-   content="<i class='fa fa-arrow-circle-o-up'></i>";
- }
- .add-note-btn:hover {
-   background-color: white;
-   color: #f05a28;
- }
- .add-note-btn {
-   padding:0;
-   margin: 0 auto;
- }
- .add-note-btn,
- #add-note-btn,
- #add-course-btn,
- #existing-course-btn,
- #save-btn,
- #save_note_tags,
- #edit-save-btn
- {
+ table.dataTable {
+   margin-bottom: 30px;
    border: none;
-   background-color: transparent;
-   color: #f05a28;
-   cursor: pointer;
-   font: 30px/1.2em "MuseoSlab-300", serif;
-   margin: 1px;
-   text-align: center;
-   text-transform: uppercase;
-   /* transition: ease-out ? ? ? */
- }
- #existing-course-btn,
- #save-btn,
- #edit-save-btn {
-   margin-top: 13px;
- }
- #existing-course-btn.disabled,
- #save-btn.disabled,
- #edit-save-btn.disabled
- {
-   color: #afafaf;
-   cursor: auto;
- }
- .validation_error {
-   color:red;
- }
- ul.validation_error {
-   display: inline;
-   list-style-type: none;
- }
- #add-note-form, #add-course-form, #edit-course-form
- {
-   display: none;
- }
- .progress
- {
-   border: solid 1px black;
-   height: 10px;
- }
- #progress-fill
- {
-   height: 100%;
-   width: 0;
-   background-color: #f1592a;
- }
- /* COPY */
- .body_copy h1
- {
-   font-family: "MuseoSlab-700";
-   font-size: 15px;
-   text-transform: uppercase;
-   margin-top: 18px;
-   margin-bottom: 10px;
- }
- .body_copy p, ol, ul
- {
-   font-family: "MuseoSlab-500";
-   font-size: 15px;
-   margin-top: 4px;
-   margin-bottom: 4px;
- }
- .body_copy strong
- {
-   font-family: "MuseoSlab-700";
- }
- .body_copy p
- {
-   white-space: pre-wrap;
- }
- .body_copy ol, ul
- {
-   padding-left: 30px;
- }
- /*
-  * Hack to make the wrongly added code blocks look normal.  Html2text should not
-  * actually make these code blocks, but does when users have whitespace in d
-  * ocuments. Longterm fix should be in Html2text.
-  */
- code
- {
-   font-family: "MuseoSlab-500";
-   font-size: 15px;
-   font-weight: normal;
-   color: black;
- }
- /* GLOBAL FOOTER */
- footer#global_footer
- {
-   width: 100%;
-   min-height: 164px;
-   color: #FFF;
-   padding-top: 36px;
-   background-color: #000;
- }
- footer#global_footer a
- {
-   color: #FFF;
- }
- #footer_links_container
- {
-   font-size: 13px;
-   padding-bottom: 54px;
- }
- #colophon
- {
-   font-family: "MuseoSlab-500";
-   font-size: 11px;
-   line-height: 175%;
- }
- #colophon a
- {
-   color: #FFF;
-   text-decoration: underline;
- }
- #cc_logo
- {
-   margin-right: 5px;
-   margin-top: 3px;
- }
- /* EDITS POST DESIGN */
- ul#course_menu li a
- {
-   color: white;
- }
- /* New course-list homepage css */
- #subhead span
- {
-   /*margin-left: 2em;*/
-   font-family: "MuseoSlab-300";
-   font-size: 19px;
+   table-layout: fixed;
  }
  
- .subhead-spacer {
-   height: 42px;
+ table.dataTable div.table-entry-first-line {
+   font-size: 0.9em;
+   margin: 0 0 5px 0;
  }
  
- .header_subhead
- {
-   font-family: "MuseoSans-900";
-   font-size: 10px;
-   text-align: center;
-   text-transform: uppercase;
-   padding-top: 20px;
-   padding-bottom: 1px;
+ table.dataTable div.table-entry-third-line {
+   font-size: 0.9em;
+   margin: 5px 0 0 0;
  }
  
- .center
- {
-   text-align: center;
+ table.dataTable div.data-table-entry {
+   margin: 20px 0 20px 0;
  }
  
- #page_instruction
- {
-   font-family: "MuseoSlab-700";
-   font-size: 12px;
- }
- /* end new course-list homepage css */
- a.white
- {
-   color: white;
+ table.dataTable a {
+   color: inherit;
  }
  
- a.white:hover
- {
-   color: #FFF;
-   cursor: pointer;
-   text-decoration: underline;
+ .even {
+   background-color: #fafafa !important;
+   border-top: 1px solid #f0f0f0;
+   border-bottom: 1px solid #f0f0f0;
  }
  
- /* post-designers css hacks */
- .button_disabled img
- {
-   opacity: 0.4;
-   filter: alpha(opacity=40); /* msie */
+ .odd {
+   background-color: transparent !important;
  }
  
- .voted_message
- {
-   cursor: pointer;
-   font-size: 13px;
-   font-family: "MuseoSans-500";
-   color: #232323;
+ td {
+   background-color: inherit !important;
  }
  
- .voted_message:hover
- {
-   cursor: pointer;
-   text-decoration: underline;
+ ul.ui-autocomplete {
+   z-index: 1000;
  }
  
- /* new form submit */
- .submit_upload
- {
-   background: none;
+ .ui-tabs-panel {
    border: none;
-   color: white;
-   cursor: pointer;
-   font-family: "MuseoSlab-300";
-   font-size: 32px;
- }
- /* GAAAH, random body p copy should be readable text */
- p.text
- {
-   font-family: "MuseoSlab-500";
-   font-size: 17px;
-   margin: 20px 0 0;
-   line-height: 150%;
- }
- p.text a
- {
-   color: #f05a28;
-   text-decoration: underline;
- }
- #thankyou
- {
-   margin: 60px 20px;
-   padding: 20px;
- }
- #thankyou p
- {
-   font-family: "MuseoSlab-300";
-   font-size: 22px;
-   margin: 0px;
- }
- /* Nick redesign for course page */
- #breadcrumbs, #breadcrumbs a
- {
-   font-family: "MuseoSans-300";
-   font-size: 12px;
-   padding-top: 10px;
-   color: black;
+   border-top: 1px solid #dfdfdf;
+   padding: 20px 10px 20px 10px;
  }
  
- #breadcrumbs > .breadcrumbs {
-   /* override foundation 4 panel and outline for breadcrumbs */
-   border-style: none;
-   background-color: white;
- }
- .header_title
- {
-   margin-top: 1em;
-   text-align: center;
-   font-family: "MuseoSlab-500";
-   font-size: 24px;
- }
- #course_name a {
-   color: black;
+ .ui-tabs-nav li {
+   margin: 0 10px 0 10px;
+   border: 1px solid #dfdfdf;
  }
  
- #course_name:hover a{
-   text-decoration: underline;
- }
- .doubleline
- {
-   border: dotted black;
-   border-width: 1px 0 0;
- }
- .doubleline hr
- {
-   
- }
- hr.midrule
- {
-   border: dotted black;
-   border-width: 1px 0 0;
-   width: 140px;
-   margin: 2em auto;
+ #tabs {
+   border: none;
  }
  
- legend, label
- {
-   font: 12px/2em "MuseoSlab-300";
+ dl.tabs dd.active {
+   border-radius: 3px;
  }
  
- .qq-upload-button {
-   margin-bottom:12px;
+ dl.tabs dd {
+   margin: 0 10px 0px 10px;
+   border: 1px solid #dfdfdf;
+   border-bottom: none;
  }
  
- /* Turning font awesome icons into buttons */
- .awesome-action:hover {
-   /* For awesome icons with clickstates */
-   color: #f05a28;
-   cursor: pointer;
+ dl.tabs dd,
+ dl.tabs dd a {
+   border-top-left-radius: 3px;
+   border-top-right-radius: 3px;
  }
  
- #drpbx-btn {
-   color: #3d9ae8;
-   cursor: pointer;
+ dl.tabs dd a {
+   padding: 5px 10px 5px 10px;
  }
  
- /* Filepicker integration */
- .fp_dropzone {
-   width: 100%;
-   height: 50px;
-   text-align: center;
-   background-color: #F6F6F6;
-   border: 1px dashed #666;
-   border-radius: 6px;
-   padding: 20px;
- }
- .dragdrop {
-   text-align: center;
+ div.tabs-content {
+   margin-top: -1px;
+   border-top: 1px solid #dfdfdf;
  }
  
.inline-form {
-   border-bottom: 1px dashed #666;
div.message-container {
+   margin: 20px 0 0 0;
  }
  
- /* Social account integration */
- ul.socialaccount_providers li {
-   list-style: none;
-   margin: 10px 0 5px 0;
+ ul.socialaccount_providers {
+   list-style-type: none;
  }
  
- /* FOR LARGE SCREENS ONLY */
- @media only screen and (min-width: 768px) {
-   /* Front page intro text, large on wide, resize on small */
-   #subhead span {
-     font-size: 22px;
-   }
+ ul.socialaccount_providers li{
+   display: inline;
+   margin: 0 5px 0 5px;
 -}
 +}
index 399fadbfe1fdca10c11f5e8686ae71f8e361f207,b9fca7df8d0614c20cc51eb1909a003d517654d6..bec3a491d73a6f85f399f0062798df95d66d35ae
- /* HOME */
- #home_content
- {
-   padding-top: 46px;
- }
- /* VIDEO */
- #home_video
- {
-   margin-left: -10px;
- }
- #home_video_overlay
- {
-   background-image: url(../img/home_video_screen_80opacity.png);
-   position: absolute;
-   top: -574px;
-   height: 575px;
-   width: 1020px;
-   color: #FFF;
-   cursor: pointer;
- }
- #home_video_overlay_headline
- {
-   padding-top: 76px;
-   font-size: 60px;
- }
- #home_video_overlay_more
- {
-   padding-top: 164px;
-   font-size: 28px;
-   text-transform: uppercase;
- }
- #home_video_overlay_more_arrow
- {
-   margin-top: -20px;
+ #splash {
+   padding: 8% 5% 8% 5%;
+   color: #ffffff;
+   text-align: center;
+   font-size: 3em;
+   background-image: url('../img/banner_small.jpg');
+   background-size: cover;
+   background-position: center center;
  }
  
- /* HOMEPAGE RECENT */
+ @media only screen and (max-width: 40.063em) {
+   #splash {
+     font-size: 1.8em;
+   }
+ } /* medium screens and down */
  
- #recent_uploaded_container
- {
-   background-color: #000;
+ input.search-courses {
+   display: inline;
+   margin: 0 0 10px 5px;
+   max-width: 30em;
  }
  
- #recent_uploaded_headline
- {
-   text-transform: uppercase;
-   font-size: 10px;
-   color: #c0c0c0;
-   padding-top: 12px;
-   padding-bottom: 12px;
-   width: 170px!important;
+ #course-sort-wrapper {
+   float: right;
+   display: inline;
  }
  
- #recent_uploaded_scroller_screen
- {
-   position: absolute;
-   height: 34px;
-   width: 140px;
-   background: url(../img/home_recent_uploaded_scroller_screen.png) repeat-y;
-   z-index: 2;
+ select.course-sort {
+   width: 10em;
  }
  
- #recent_uploaded_scroller_screen_right
- {
-   position: absolute;
-   height: 34px;
-   width: 140px;
-   background: url(../img/home_recent_uploaded_scroller_screen_right.png) repeat-y;
-   z-index: 2;
-   margin-left: 475px;
+ #course-search-bar {
+   background: #f5f5f5;
+   padding: 15px 0 0 0;
+   font: 1em 'museo300';
  }
  
- #recent_uploaded_scroller_sled
- {
-   position: absolute;
-   top: -15px;
-   color: #FFF;
-   overflow-x: hidden;
-   white-space: nowrap;
-   width: 613px;
- }
- #recent_uploaded_scroller_sled ul li.recent_upload_note_name, #recent_uploaded_scroller_sled ul li.recent_upload_note_school
- {
-   list-style: none;
-   font-size: 13px;
-   display: inline-block;
-   margin: 0 5px;
- }
- #recent_uploaded_scroller_sled ul li.recent_upload_note_name
- {
+ #intro-video-button {
    color: #f1592a;
-   font-size: 13px;
- }
- #recent_uploaded_scroller_sled ul li.recent_upload_note_school
- {
-   color: #fff;
-   text-transform: uppercase;
-   font-size: 11px;
-   padding-top: 2px;
- }
- /* HOMEPAGE COPY */
- #home_copy p
- {
-   font-family: "MuseoSlab-700";
-   font-size: 25px;
-   margin: 40px 0;
- }
- /* override jquery ui autocomplete styles */
- .ui-menu .ui-menu-item a {
-   font-size: 18px;
+   background: #ffffff;
+   margin: 10px 0 0 0;
+   padding: 5px 5px 5px 5px;
  }
 +
Simple merge
index 6def87e9bec795c18979fca454541466c4d0e4b6,821d5179d95574680476ea1659f2734cb842c512..2be094239b8ca8c8ac52a896d8ef03b14172a4d7
    <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/datatables-css/jquery.dataTables.css">
  {% endblock %}
  
  {% block title %}
 -  Share Notes for {{ course.name }} | {{ course.school.name }}
 +  Share Notes for {{ course.name }} | {% if course.school %}{{ course.school.name }}{% else %}{{ course.department.school.name }}{% endif %}
  {% endblock %}
  
- {% block content %}
+ {% block raw_content %}
    <section id="course_content">
  
-     <div id="course_header" class="hero_gradient_bar">
-       <div class="row">
-         <div id="course_name" class="small-12 columns header_title">
-           {{ course.name }}
-         </div><!-- /course_name -->
-       </div>
-       <div class="row">
-         <div id="course_meta" class="twelve columns">
-           <div class="activity_details_context">
-             <span id="course_instructor_name">{{ course.get_prof_names }}</span>
-             <span id="course_department">{% if course.department %}// {{ course.department.name }}{% endif %}</span>
-           </div><!-- /activity_details_context -->
-         </div><!-- /course_meta -->
+     <div id="course-header">
+       <div class="row header-byline">
+         <div class="small-12 columns">
+           <span id="course-header-school">{{ course.school.name }}</span>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
+           {% if course.department %}<span class="course-header-department">{{ course.department.name }}</span>&nbsp;&nbsp;&bull;&nbsp;&nbsp;{% endif %}
+           <span id="course-header-instructor">{{ course.instructor_name }}</span>
+         </div>
        </div>
  
-       <div class="row">
-         <div id="course_meta" class="twelve columns">
-           <div class="activity_details_context">
-             {% if course.school %}{{ course.school.name }}{% else %}{{ course.department.school.name }}{% endif %}
-           </div><!-- /activity_details_context -->
-         </div><!-- /course_meta -->
-       </div>
+       <div class="row museo700">
+         <div class="small-12 columns">
+           <span id="course-header-name" class="header-title">{{ course.name }}</span>
  
-       <div class="row {% if not course.url %}hide{% endif %}">
-         <div id="course_link" class="twelve columns">
-           <div class="activity_details_context">
-             <a id="course_url" rel="nofollow" target="_blank" href="{{ course.url }}">
-               {{ course.url|slice:":50" }}
-               <i class="fa fa-external-link-square"></i>
-             </a>
-           </div><!-- /activity_details_context -->
-         </div><!-- /course_meta -->
-       </div>
+           &nbsp;&nbsp;
+           <div class="hide-for-large-up"></div>
  
-       <div class="row">
-         <div id="course_actions" class="large-3 medium-6 small-12 columns small-centered">
-           <div class="row">
-             <div class="small-12 column center">
+           <span style="display: inline;">
+             <span class="show-for-large-up">
                {% if user.is_authenticated %}
                  {% if user.get_profile.can_edit_items %}
-                   <a href="#" id="edit-button"><img src="{{ STATIC_URL }}img/edit.png" alt="edit_flag" width="25" height="35"/></a>
+                   <button id="edit-button" data-reveal-id="edit-course-form" class="modify-button"> <i class="fa fa-edit"></i> Edit this course</button>&nbsp;&nbsp;
                  {% endif %}
  
                  {% if already_flagged %}
index 985bb858ef3871a2ed62e73f3416ec8b0699ffa0,89459afcdcdeb8f0b775650256d9ad5c2c123161..8ae41abab7340ab2e2af2d241922273f90cb9003
@@@ -1,26 -1,44 +1,43 @@@
- <tr>
-   <td class="no-display"><!-- this spot solely for the Sort By header --></td>
-   <td class="small-8 columns large-4 slim"><span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span></td>
-   <td class="small-4 columns large-2 large-offset-2 slim"><span>{{ course.file_count }} Notes</span></td>
-   <td class="small-4 columns large-2 large-offset-1 slim"><span>{{ course.get_popularity }} Thanks</span></td>
+ <tr class="table-row">
+   <td class="hide">{{ course.updated_at|date:"U" }}</td>
+   <td class="hide">{{ course.file_count|stringformat:"010g" }}</td>
+   <td class="hide">{{ course.get_popularity|stringformat:"010g" }}</td>
  
-   <td class="small-12 large-5 columns">
-     <a href="{{ course.get_absolute_url }}">{% if course.department %}{{course.department.name}}: {% endif %}{{ course.name }}</a> 
-   </td>
-   <td class="hide-for-small large-1 column">
-     <div class="upload">
-       <a href="{{ course.get_absolute_url }}#upload-note">
-         <i
-           data-ot="Upload directly to this course"
-           data-ot-target="true"
-           data-ot-tip-joint="top center"
-           data-ot-target-joint="bottom center"
-           data-ot-background="white"
-           data-ot-border-color="black"
-           class="fa fa-arrow-circle-o-up opentip"></i>
-       </a>
+   <td class="small-12 columns">
+     <div class="data-table-entry">
+       <div class="table-entry-first-line">
+         <span class="table-school">
+           {% if course.school.name %}
+             {{ course.school.name }}
+           {% endif %}
+           {% if course.department.school.name %}
+             {{ course.department.school.name }}
+           {% endif %}
+         </span>
+         {% if course.department %}
+           &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+           <span class="table-department">{{ course.department.name }}</span>
+         {% endif %}
+         {% if course.instructor_name %}
+           &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+           <span class="table-instructor">{{ course.instructor_name }}</span>
+         {% endif %}
+         {% if couse.instructor.name %}
+           &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+           <span class="table-instructor">{{ course.instructor.name }}</span>
+         {% endif %}
+       </div>
+       <div class="table-entry-second-line museo700">
+         <span class="table-course-name"><a href="{{ course.get_absolute_url }}">{{ course.name }}</a></span>
+       </div>
+       <div class="table-entry-third-line">
+         <span class="table-note-count"><i class="fa fa-file-text-o"></i>&nbsp;&nbsp;{{ course.file_count }} Notes</span>
+         <span class="table-thanks-count"><i class="fa fa-thumbs-up"></i>&nbsp;&nbsp;{{ course.get_popularity }} Thanks </span>
+         <span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span>
+       </div>
      </div>
    </td>
-   <td class="small-6 large-3 columns"><span class="table-font">{% if course.school %}{{ course.school.name }}{% else %}{{ course.department.school.name }}{% endif %}</span></td>
-   <td class="small-6 large-3 columns"><span class="table-font">{{ course.get_prof_names }}</span></td>
 -
  </tr>
index 334f0818b22eb1496dbf5a2329c9a6201debea45,70298ffb93986404b968dd4277a951a292e96282..fc9327aa56c0b189a2c99a3e3ad760e33460c043
  {% load url from future %}
- <script>
-   var json_school_course_list = "{% url 'json_school_course_list' %}"
-   var json_school_course_instructor_list = "{% url 'json_school_course_instructor_list' %}"
-   var csrf_token = "{{ csrf_token }}";
- </script>
- <script src="{{ STATIC_URL }}js/setup-ajax.js"></script>
- <script src="{{ STATIC_URL }}js/course.js"></script>
- <script src="{{ STATIC_URL }}js/add-course.js"></script>
 +{{ course_form.media }}
- <link href="{{ STATIC_URL }}css/add_course.css" type="text/css" media="all" rel="stylesheet" />
 +
- <section id="add-course-form">
+ <section id="add-course-form" class="reveal-modal" data-reveal>
+   <a class="close-reveal-modal">&#215;</a>
    <form method="POST" action="{% url 'home' %}">
    {% csrf_token %}
  
 -    {% for error in course_form.non_field_errors %}
 -    <div class="row">
 -      <div class="small-12 columns">
 -        {{ error }}
 -      </div>
 -    </div>
 -    {% endfor %}
 -
 -    <div class="row">
 -      <div class="small-12 columns">
 -        <label for="str_school">
 -          School
 -          {% for error in course_form.school.errors %}
 -          <span style="color:red">
 -            {{ error }}
 -          </span>
 -          {% endfor %}
 -        </label>
 -        <div>
 -          <input id="str_school" class="" type="text" name="str_school" placeholder="Select a school"/>
 -          <input id="id_school" name="school" type='hidden'/>
 +    {% if course_form.non_field_errors %}
 +      <div class="row">
 +        <div class="small-12 columns">
 +          <ul>{% for error in course_form.non_field_errors %}
 +            <li><label class="validation_error">{{ error }}</label></li>
 +          {% endfor %}</ul>
          </div>
        </div>
 -    </div> <!-- .row -->
 -
 -    <div class="row">
 -      <div class="small-12 columns">
 -        <label for="id_name">Course Name:
 -          {% if course_form.name.errors %}
 -            <span style="color:red">
 -            {{ course_form.name.errors }}
 -            </span>
 -          {% endif %}
 -        </label>
 -        <input id="id_name" class="" type="text" name="name" maxlength="255" />
 -      </div>
 -    </div> <!-- .row -->
 +    {% endif %}
  
 -    <div class="row">
 -      <div class="small-12 columns">
 -        <label>Do not fill in this field:
 -          {% for error in honeypot_errors %}
 -            <span style="color:red">
 -            {{ error }}
 -            </span>
 -          {% endfor %}
 -        </label>
 -        <input type="text" name="{{HONEYPOT_FIELD_NAME}}" value="{{HONEYPOT_VALUE}}" />
 -      </div>
 -    </div>
 +    {{ course_form.as_p|safe }}
  
 -    <div class="row">
 -      <div class="small-12 columns large-6">
 -        <label for="id_instructor_name">
 -          Instructor Name:
 -          {% for error in course_form.instructor_name.errors %}
 -            <span style="color:red">
 -            {{ error }}
 -            </span>
 -          {% endfor %}
 -        </label><!-- -->
 -        <input id="id_instructor_name" class="" type="text" name="instructor_name" maxlength="75" />
 -      </div>
 -
 -      <div class="small-12 columns large-6">
 -        <label for="id_instructor_email">
 -          Instructor Email:
 -          {% for error in course_form.instructor_email.errors %}
 -            <span style="color:red">
 -            {{ error }}
 -            </span>
 -          {% endfor %}
 -        </label>
 -        <input id="id_instructor_email" class="" type="text" name="instructor_email" maxlength="75" />
 -      </div><!--  -->
 -    </div> <!-- .row -->
 -
 -    <div class="row">
 -      <div class="small-12 columns">
 -        <label for="id_url">Course url:
 -          {% for error in course_form.url.errors %}
 -            <span style="color:red">
 -            {{ error }}
 -            </span>
 -          {% endfor %}
 -        </label>
 -        <input id="id_url" class="" type="text" name="url" maxlength="255" />
 -      </div>
 -    </div> <!-- .row -->
      <div class="row">
        <div class="small-4 large-8 columns small-centered text-center">
 -        <button id="save-btn" class="disabled">
 +        <button id="save-btn" type="submit">
            <i class="fa fa-save"></i> Save
          </button>
 -        <span id="existing-course-msg" class="hide">
 -          Looks like this course already exists on KarmaNotes!
 -          <a id="existing-course-btn" class="button">Go To Existing Course <i class="fa fa-arrow-right"></i></a></span>
        </div>
      </div>
  
index 5c5be2be989d4c3e325d19f1bcd863b50fb8401e,5dd52ff37ca4f579c2d0c080e656f52d4f85e359..a9376edc8b0cb3c60d7e7f83284d87238253f182
                      {% endif %}
  
                    </div>
-                 {% endwith %}
-               {% endif %}
+                 </div>
  
+               {% endfor %}
+             </div>
+             <div id="control_panel" class="content">
+               <div class="account_settings_row">
+                 <div class="row">
+                   <div class="small-12 large-2 columns account_settings_category">
+                     Name:
+                   </div>
+                   <div class="small-12 large-8 columns account_settings_value end">
+                     {{ user.get_full_name }}
+                   </div>
+                 </div>
+               </div>
+               <div class="account_settings_row">
+                 <div class="row">
+                   <div class="small-12 large-2 columns account_settings_category">
+                     Username:
+                   </div>
+                   <div class="small-12 large-8 columns account_settings_value end">
+                     {{ user.username }}
+                   </div>
+                 </div>
+               </div>
+               <div class="account_settings_row">
+                 <div class="row">
+                   <div class="small-12 large-2 columns account_settings_category">
+                     Email:
+                   </div>
+                   <div class="small-12 large-8 columns account_settings_value">
+                     {{ user.email }}
+                   </div>
+                   <div class="small-12 large-2 columns account_settings_edit">
+                     <a href="{% url 'account_email' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
+                   </div>
+                 </div>
+               </div>
+               <div class="account_settings_row">
+                 <div class="row">
+                   <div class="small-12 large-2 columns account_settings_category">
+                     Password:
+                   </div>
+                   <div class="small-12 large-8 columns account_settings_value">
+                     ********
+                   </div>
+                   <div class="small-12 large-2 columns account_settings_edit">
+                     <a href="{% url 'account_change_password' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
+                   </div>
+                 </div>
+               </div>
+               <div class="account_settings_row">
+                 <div class="row">
+                   <div class="small-12 large-2 columns account_settings_category">
+                     Social accounts:
+                   </div>
+                   <div class="small-12 large-8 columns account_settings_value">
+                     {% social_account_list request.user %}
+                   </div>
+                   <div class="small-12 large-2 columns account_settings_edit">
+                     <a href="{% url 'socialaccount_connections' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
+                   </div>
+                 </div>
+               </div>
              </div>
            </div>
          </div>
+       </div>
  
-       {% endfor %}
+       {% if not object_list %}
+         <div class="row">
+           <div id="no_activity" class="small-12 columns">
+             <h4>Nothing to show here yet.</h4>
+           </div>
+         </div>
+       {% endif %}
  
 -
 -
      </div>
  
  
index 895d9ec05253a5ea27eb9bcaa2f54877e270ad0c,a58194b358d7c935a7521bc86fb907d37841aac9..b56707574ce72f44289f28c642a07efad092ab1b
@@@ -15,16 -15,16 +15,15 @@@ from karmaworld.apps.courses.views impo
  from karmaworld.apps.courses.views import school_course_list
  from karmaworld.apps.courses.views import school_course_instructor_list
  from karmaworld.apps.notes.views import NoteView, thank_note, NoteSearchView, flag_note, downloaded_note, edit_note_tags
- from karmaworld.apps.notes.views import RawNoteDetailView
  from karmaworld.apps.moderation import moderator
  from karmaworld.apps.document_upload.views import save_fp_upload
- from karmaworld.apps.quizzes.views import QuizView, KeywordEditView, quiz_answer
+ from karmaworld.apps.quizzes.views import QuizView, KeywordEditView, quiz_answer, get_keywords, \
+     set_delete_keyword
  from karmaworld.apps.users.views import ProfileView
- from karmaworld.apps.users.views import ControlView
  
 -# See: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#hooking-adminsite-instances-into-your-urlconf
 -
 +from ajax_select import urls as ajax_select_urls
  
 +# See: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#hooking-adminsite-instances-into-your-urlconf
  admin.autodiscover()
  
  # reused named regex capture groups