# note that .save() has the side-effect of kicking of a celery processing task
if request.user.is_authenticated():
- raw_document.save(user=request.user)
+ raw_document.save()
else:
anonymous_upload_urls = request.session.get(ANONYMOUS_UPLOAD_URLS, [])
anonymous_upload_urls.append(request.POST['fp_file'])
r_d_f.save_m2m()
# Proccess document after the tags are saved so that it isn't converted
# to a note before the tags are attached to the document
- raw_document.process_document()
+ raw_document.process_document(user=request.user)
return HttpResponse({'success'})
else:
else:
# course exists
note_instance.course.update_note_count()
- note_instance.course.school.update_note_count()
+ if note_instance.course.school:
+ note_instance.course.school.update_note_count()
+ elif note_instance.course.department.school:
+ note_instance.course.department.school.update_note_count()
@receiver(pre_save, sender=Note, weak=False)
def note_pre_save_receiver(sender, **kwargs):
--- /dev/null
+__author__ = 'charles'
--- /dev/null
+from allauth.socialaccount.models import SocialAccount
+from django import template
+
+register = template.Library()
+
+
+class SocialAccountListNode(template.Node):
+ def __init__(self, user):
+ self.user_string = template.Variable(user)
+
+ def render(self, context):
+ try:
+ user = self.user_string.resolve(context)
+ accounts = [account.provider.title() for account in user.socialaccount_set.all()]
+ accounts_string = ', '.join(accounts)
+ return accounts_string
+ except template.VariableDoesNotExist:
+ return ''
+
+
+def do_social_account_list(parser, token):
+ try:
+ # split_contents() knows not to split quoted strings.
+ tag_name, user = token.split_contents()
+ except ValueError:
+ raise template.TemplateSyntaxError("social_account_list tag requires a single argument")
+ return SocialAccountListNode(user)
+
+register.tag('social_account_list', do_social_account_list)
+
kwargs['badge'] = self.request.user.get_profile().get_badge()
return super(ProfileView, self).get_context_data(**kwargs)
-
-class ControlView(TemplateView):
- template_name = 'control_panel.html'
-
background: url(../img/team_crop.jpg);
}
-#hero_image_caption_container
-{
- position: absolute;
- z-index: 5;
- bottom: 20px;
-}
-
-#hero_image_caption
-{
- font-family: "MuseoSlab-700";
- font-size: 17px;
- color: #FFF;
- line-height: 150%;
-}
-
/* COPY */
#about_copy_header
{
padding-top: 40px;
color: #f05a28;
- font-family: "MuseoSlab-700";
font-size: 38px;
}
#about_copy_body p
{
- font-family: "MuseoSlab-500";
font-size: 17px;
margin: 20px 0 0;
line-height: 150%;
#donate_copy_header
{
- font-family: "MuseoSlab-700";
font-size: 40px;
color: #3a3a3a;
}
#donate_copy_body
{
- font-family: "MuseoSlab-700";
font-size: 20px;
color: #3a3a3a;
padding-top: 10px;
#donate_button
{
- font-family: "MuseoSlab-900";
}
+
#amazon-donate-form {
margin: 1em 1em 0;
}
#leaderboard_header
{
padding-top: 75px;
- font-family: "MuseoSlab-700";
font-size: 25px;
}
#leaderboard_copy
{
- font-family: "MuseoSlab-500";
font-size: 17px;
padding-top: 3px;
padding-bottom: 30px;
.leaderboard_rank
{
- font-family: "MuseoSans-900";
font-size: 14px;
- /*width: 20px!important;*/
padding-top: 4px;
}
.leaderboard_school, .leaderboard_score
{
- font-family: "MuseoSlab-500";
font-size: 19px;
}
.bullets li
{
- font-family: "MuseoSlab-500";
font-size: 17px;
}
+#stats-container {
+ margin: 20px 0 20px 0;
+}
+
+#user-name {
+ font-size: 1.5em;
+}
+
+.stat-count {
+ font-size: 2.5em;
+}
+
+div.stat-container {
+ border-left: solid 1px #dfdfdf;
+}
+
+.activity_item {
+ margin: 15px 0 15px 0;
+}
+
+.activity_timestamp {
+ font-size: 0.7em;
+}
+
+.activity_details_action {
+ margin: 10px 0 5px 0;
+}
+
+.activity_details_object {
+ margin: 5px 0 5px 0;
+}
+
+.activity_details_points_positive,
+.activity_details_points_negative {
+ background: #f1592a;
+ padding: 0px 5px 0 5px;
+ border-radius: 2px;
+ color: #ffffff;
+}
+
+.account_settings_row {
+ padding: 15px 0 15px 0;
+ border-bottom: 1px solid #f0f0f0;
+}
+
+.account_settings_category {
+ text-align: right;
+ font-weight: normal;
+}
+
+.account_settings_edit {
+ text-align: right;
+ font: 0.8em 'museo700';
+}
+
+@media only screen and (max-width: 40.063em) {
+ .account_settings_category,
+ .account_settings_edit {
+ text-align: left;
+ }
+} /* medium screens and down */
body {
font-family: 'adelle-sans';
+ font-weight: lighter;
}
.museo300 {
.museo700 {
font-family: 'museo700';
+ font-weight: normal;
}
.adelle-sans {
font-family: 'adelle-sans';
}
+h1, h2, h3, h4, h5 {
+ font-family: 'museo700';
+}
+
+p {
+ font-weight: inherit;
+}
+
.nav-list ul {
list-style-type: none;
margin: 0;
margin: 20px 0 20px 0;
}
-table.dataTable tr.even {
+.even {
background: #fafafa;
- border-top: 2px solid #f0f0f0;
- border-bottom: 2px solid #f0f0f0;
+ border-top: 1px solid #f0f0f0;
+ border-bottom: 1px solid #f0f0f0;
}
ul.ui-autocomplete {
border: none;
}
+dl.tabs dd.active {
+ border-radius: 3px;
+}
+
+dl.tabs dd {
+ margin: 0 10px 0px 10px;
+ border: 1px solid #dfdfdf;
+ border-bottom: none;
+}
+
+dl.tabs dd,
+dl.tabs dd a {
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+
+dl.tabs dd a {
+ padding: 5px 10px 5px 10px;
+}
+
+div.tabs-content {
+ margin-top: -1px;
+ border-top: 1px solid #dfdfdf;
+}
\ No newline at end of file
+++ /dev/null
-/*
- * Metadata - jQuery plugin for parsing metadata from elements
- *
- * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
- * in the JSON will become a property of the element itself.
- *
- * There are three supported types of metadata storage:
- *
- * attr: Inside an attribute. The name parameter indicates *which* attribute.
- *
- * class: Inside the class attribute, wrapped in curly braces: { }
- *
- * elem: Inside a child element (e.g. a script tag). The
- * name parameter indicates *which* element.
- *
- * The metadata for an element is loaded the first time the element is accessed via jQuery.
- *
- * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
- * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
- *
- * @name $.metadata.setType
- *
- * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
- * @before $.metadata.setType("class")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from the class attribute
- *
- * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
- * @before $.metadata.setType("attr", "data")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from a "data" attribute
- *
- * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
- * @before $.metadata.setType("elem", "script")
- * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
- * @desc Reads metadata from a nested script element
- *
- * @param String type The encoding type
- * @param String name The name of the attribute to be used to get metadata (optional)
- * @cat Plugins/Metadata
- * @descr Sets the type of encoding to be used when loading metadata for the first time
- * @type undefined
- * @see metadata()
- */
-
-(function($) {
-
-$.extend({
- metadata : {
- defaults : {
- type: 'class',
- name: 'metadata',
- cre: /(\{.*\})/,
- single: 'metadata'
- },
- setType: function( type, name ){
- this.defaults.type = type;
- this.defaults.name = name;
- },
- get: function( elem, opts ){
- var data, m, e, attr,
- settings = $.extend({},this.defaults,opts);
- // check for empty string in single property
- if ( !settings.single.length ) { settings.single = 'metadata'; }
-
- data = $.data(elem, settings.single);
- // returned cached data if it already exists
- if ( data ) { return data; }
-
- data = "{}";
-
- if ( settings.type === "class" ) {
- m = settings.cre.exec( elem.className );
- if ( m ) { data = m[1]; }
- } else if ( settings.type === "elem" ) {
- if( !elem.getElementsByTagName ) { return undefined; }
- e = elem.getElementsByTagName(settings.name);
- if ( e.length ) { data = $.trim(e[0].innerHTML); }
- } else if ( elem.getAttribute !== undefined ) {
- attr = elem.getAttribute( settings.name );
- if ( attr ) { data = attr; }
- }
-
- if ( data.indexOf( '{' ) <0 ) { data = "{" + data + "}"; }
-
- data = eval("(" + data + ")");
-
- $.data( elem, settings.single, data );
- return data;
- }
- }
-});
-
-/**
- * Returns the metadata object for the first member of the jQuery object.
- *
- * @name metadata
- * @descr Returns element's metadata object
- * @param Object opts An object contianing settings to override the defaults
- * @type jQuery
- * @cat Plugins/Metadata
- */
-$.fn.metadata = function( opts ){
- return $.metadata.get( this[0], opts );
-};
-
-})(jQuery);
\ No newline at end of file
$(function() {
- $("#tabs").tabs();
-
$("#thank-button").click(function(event) {
event.preventDefault();
<section id="about_content">
<div class="row">
- {% comment %}
- <div id="hero_image" class="twelve columns">
- <div id="hero_image_caption_container">
- <div class="row">
- <div id="hero_image_caption" class="seven columns offset-by-one">
- <!-- <p>Meet the KarmaNotes team: Andrew, Charles, Bob, & Seth.</p> -->
- </div><!-- /hero_image_caption -->
- </div>
- </div><!-- /hero_image_caption_container -->
- </div><!-- /hero_image -->
- {% endcomment %}
<div class="small-12 columns flex-video vimeo">
<iframe src="//player.vimeo.com/video/66370775" title="0" width="960" height="436" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
</div>
<div class="row">
- <div id="about_copy_header" class="small-12 columns large-10 large-offset-1 ">
+ <div id="about_copy_header" class="small-12 columns museo700">
Help us spread the academic wealth.
</div>
</div>
<div class="row">
- <div id="about_copy_body" class="small-12 columns large-10 large-offset-1">
+ <div id="about_copy_body" class="small-12 columns">
<p>KarmaNotes empowers college students to share course notes, study guides, and other digital learning resources online. By exchanging knowledge on KarmaNotes, everyone benefits from access to a growing database of knowledge.</p>
<p>All content on KarmaNotes is licensed Creative Commons and all code is <a href="https://github.com/FinalsClub/karmaworld">free and open source</a>. We also maintain full compliance with the Digital Millennium Copyright Act.</p>
<p>Beyond the ivory tower, KarmaNotes is a network with the potential to digitize education, one lecture at a time. Like a give-a-penny jar, KarmaNotes collects knowledge for the common good. Best of all, our capacity is practically limitless, and withdrawals are entirely free. </p>
<p>KarmaNotes is improving access to learning resources thanks to support from the William and Flora Hewlett Foundation and generous scholars like you. Want to get involved or learn more? Please <a href="mailto:info@finalsclub.org?Subject=Karma%20question">contact us</a> or support our mission with a tax-deductible charitable donation to the FinalsClub Foundation.</p>
</div> <!--/about_copy_body-->
-
-
</div>
<div id="donate-text" class="small-12 small-centered columns large-6 large-uncentered">
<div class="row">
- <div id="donate_copy_header" class="">Love KarmaNotes?</div>
+ <div id="donate_copy_header" class="museo300">Love KarmaNotes?</div>
<!-- /donate_copy_header -->
</div> <!--.row-->
<div class="row">
<!-- Default donation amount -->
<input type="hidden" name="amount" value="USD 20" >
- <button id="donate_button" class="button large round expand" type="submit">
+ <button id="donate_button" class="button large round expand museo700" type="submit">
DONATE
</button>
</form>
</div> <!-- donate button container-->
<div class="row">
- <div class="small-12 columns large-10 large-offset-1">
+ <div class="small-12 columns">
<div id="leaderboard_header">
University Karma Leaderboard
</div><!-- /leaderboard_header -->
</div>
<div class="row">
- <div class="small-12 columns large-10 large-offset-1">
+ <div class="small-12 columns">
<div id="leaderboard_copy">
These schools are aces at sharing the academic wealth
</div>
<div class="row">
- <div id="leaderboard_table" class="small-10 columns small-offset-1">
+ <div id="leaderboard_table" class="small-12 columns">
{% for school in schools %}
<div class="row leaderboard_item">
<link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico">
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/fontface/fontface.css">
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/foundation.min.css">
- <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/jquery-ui.css">
+ <link rel="stylesheet" type="text/css" media="all" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/vendor/opentip.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/global.css">
+++ /dev/null
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% load account %}
-
-{% block title %}Control Panel{% endblock %}
-
-{% block content %}
- <h1>Hello {% user_display user %}!</h1>
- <p>Your account control panel:</p>
- <ul>
- <li><a href="{% url 'account_email' %}"><button>Add/Remove Emails</button></a></li>
- <li><a href="{% url 'account_change_password' %}"><button>Change Password</button></a></li>
- <li><a href="{% url 'socialaccount_connections' %}"><button>Social Accounts</button></a></li>
- </ul>
-
-{% endblock %}
-
<div class="large-12 columns">
<ul>
<li><a href="{% url 'accounts_profile' %}">{{ request.user.get_profile.get_points }} Karma Points</a></li>
- <li><a href="{% url 'control_panel' %}">My Account</a></li>
<li><a href="{% url 'account_logout' %}">Log Out</a></li>
</ul>
</div>
<li><div class="mobile-nav-item"><a href="/">Courses</a></div></li>
{% if request.user.is_authenticated %}
<li><div class="mobile-nav-item">My Notes</div></li>
- <li><div class="mobile-nav-item"><a href="{% url 'control_panel' %}">My Account</a></div></li>
+ <li><div class="mobile-nav-item"><a href="{% url 'accounts_profile' %}">Dashboard</a></div></li>
+ <li><div class="mobile-nav-item"><a href="{% url 'accounts_profile' %}#control_panel">My Account</a></div></li>
<li><div class="mobile-nav-item"><a href="{% url 'account_logout' %}">Log Out</a></div></li>
{% else %}
<li><div class="mobile-nav-item"><a href="{% url 'account_login' %}">Log In</a></div></li>
<i class="fa fa-thumbs-up"></i> Thank Note</button>
{% else %}
<button id="thank-button" class="modify-button"><i class="fa fa-thumbs-up"></i> Thank Note</button>
- <button id="thank-button-disabled" class="show-for-large-up modify-button disabled opentip hide"
+ <button id="thank-button-disabled" class="modify-button disabled opentip hide"
data-ot="You've already thanked this note"
{% include 'partial/opentip_settings.html' %}>
<i class="fa fa-thumbs-up"></i> Thank Note</button>
<div class="row">
<div id="tabs" class="small-12 columns">
- <ul>
- <li><a href="#note_container">Note</a></li>
- </ul>
- <div id="note_container">
- {% if pdf_controls %}
- <div id="zoom-buttons" class="row show-for-medium-up">
- <div id="outline-btn-wrapper" class="small-1 columns hide show-for-medium-up">
- <i id="outline-btn" class="zoom-button fa fa-bars fa-2x"></i>
- </div>
- <div class="small-4 columns">
- <span>Jump to page:
- <input id="scroll-to" type="text" style="width: 3em; display: inline" /></span>
- </div>
- <div class="small-2 small-centered columns center">
- <i id="minus-btn" class="zoom-button fa fa-search-minus fa-2x"></i>
- <i id="plus-btn" class="zoom-button fa fa-search-plus fa-2x"></i>
+ <dl class="tabs show-for-large-up" data-tab>
+ <dd class="active"><a href="#note_container">Note</a></dd>
+ </dl>
+ <div class="tabs-content">
+ <div id="note_container" class="content active">
+ {% if pdf_controls %}
+ <div id="zoom-buttons" class="row show-for-medium-up">
+ <div id="outline-btn-wrapper" class="small-1 columns hide show-for-medium-up">
+ <i id="outline-btn" class="zoom-button fa fa-bars fa-2x"></i>
+ </div>
+ <div class="small-4 columns">
+ <span>Jump to page:
+ <input id="scroll-to" type="text" style="width: 3em; display: inline" /></span>
+ </div>
+ <div class="small-2 small-centered columns center">
+ <i id="minus-btn" class="zoom-button fa fa-search-minus fa-2x"></i>
+ <i id="plus-btn" class="zoom-button fa fa-search-plus fa-2x"></i>
+ </div>
</div>
+ {% endif %}
+
+ <div class="row">
+ <div class="small-12 small-centered columns medium-12 large-12 body_copy">
+ {% if note.static_html %}
+ <div class="note-text">
+ {% if note.has_markdown %}
+ <span id="note-markdown" data-markdown="{{note.notemarkdown.markdown}}"></span>
+ {% else %}
+ <iframe style="border:none; width:100%; min-height: 1000px;"
+ id="noteframe"></iframe>
+ <noscript>
+ {{ note.text }}
+ </noscript>
+ {% endif %}
+ </div> <!-- .note-text -->
+
+ {% else %} {# note.static_html #}
+ <div class="note-error">
+ This document's content is currently unavailable. Please try again later.
+ </div>
+ {% endif %} {# note.static_html #}
+ </div><!-- /body_copy -->
</div>
- {% endif %}
-
- <div class="row">
- <div class="small-12 small-centered columns medium-12 large-12 body_copy">
- {% if note.static_html %}
- <div class="note-text">
- {% if note.has_markdown %}
- <span id="note-markdown" data-markdown="{{note.notemarkdown.markdown}}"></span>
- {% else %}
- <iframe style="border:none; width:100%; min-height: 1000px;"
- id="noteframe"></iframe>
- <noscript>
- {{ note.text }}
- </noscript>
- {% endif %}
- </div> <!-- .note-text -->
-
- {% else %} {# note.static_html #}
- <div class="note-error">
- This document's content is currently unavailable. Please try again later.
- </div>
- {% endif %} {# note.static_html #}
- </div><!-- /body_copy -->
</div>
-
</div><!-- /note_container -->
</div>
</div>
{% extends "base.html" %}
{% load url from future %}
{% load account %}
+{% load social_account_list %}
{% block pagescripts %}
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/dashboard.css">
{% endblock %}
-{% block bodyscripts %}
- <script>
- $(function() {
- $("#tabs").tabs();
- });
- </script>
-{% endblock %}
-
{% block title %}
Your KarmaNotes Profile
{% endblock %}
{% block raw_content %}
<section id="dashboard_content">
- <div id="stats_container" class="hero_gradient_bar">
- <div class="row">
- <div class="small-10 columns small-centered center header_title">
+ <div id="stats-container">
+ <div class="row museo700">
+ <div id="user-name" class="small-12 large-3 columns">
{% user_display user %}
- {% if badge %}
- <br/><span class="badge">{{ badge }}</span>
- {% endif %}
- </div>
</div>
- <div class="row">
- <div class="small-12 medium-8 large-4 columns small-centered">
- <div class="row">
- <div class="small-6 columns center stat_lead_in">
- you've earned
- </div>
- <div class="small-6 columns center stat_lead_in">
- you've uploaded
- </div>
- </div>
- <div class="row">
- <div class="small-6 columns center stat_number stat_earned">
- {{ user.get_profile.get_points }}
- </div>
- <div class="small-6 columns center stat_number stat_uploaded">
- {{ user.note_set.count }}
- </div>
- </div>
- <div class="row">
- <div class="small-6 columns center stat_object stat_earned">
- karma points
- </div>
- <div class="small-6 columns center stat_object stat_uploaded">
- notes
- </div>
- </div>
+ <div class="small-12 large-3 columns stat-container">
+ <span class="stat-count">{{ user.get_profile.get_points }}</span>
+ <br/>
+ Karma Points
+ </div>
+ <div class="small-12 large-3 columns end stat-container">
+ <span class="stat-count">{{ user.note_set.count }}</span>
+ <br/>
+ Notes Uploaded
</div>
</div>
<div id="activity_container">
<div class="row">
<div id="tabs" class="small-12 columns">
- <ul>
- <li><a href="#activity">Karma Point Activity</a></li>
- </ul>
- <div id="activity">
- {% for item in object_list %}
-
- <div class="row">
- <div class="small-10 columns small-centered {% cycle '' 'row_alt_on'%}">
-
- <div class="activity_item">
+ <dl class="tabs show-for-large-up" data-tab data-options="deep_linking: true">
+ <dd class="active"><a href="#activity">Karma Point Activity</a></dd>
+ <dd><a href="#control_panel">My Account</a></dd>
+ </dl>
+ <div class="tabs-content">
+ <div id="activity" class="content active">
+ {% for item in object_list %}
+
+ <div class="row {% cycle '' 'even'%}">
+ <div class="small-12 columns small-centered activity_item">
{% if 'KarmaEvent' in item.0 %}
{% with event=item.1 %}
<div class="row">
<div class="small-12 columns activity_timestamp">
- <span class="activity_date">{{ event.timestamp|date:"D b j Y" }}</span>
+ <span class="activity_date">{{ event.timestamp|date:"l, F j, Y" }}</span>
</div>
- <div class="small-12 columns activity_details_action">
+ <div class="small-12 columns activity_details_action museo700">
{% if event.points > 0 %}
- <span class="activity_details_points_positive">+{{ event.points }}</span>
+ <span class="activity_details_points_positive">+{{ event.points }}</span>
{% else %}
- <span class="activity_details_points_negative">{{ event.points }}</span>
+ <span class="activity_details_points_negative">{{ event.points }}</span>
{% endif %}
{{ event.get_message }}
</div>
{% if item.0 == 'NoteKarmaEvent' %}
- <div class="small-12 columns activity_details_action">
+ <div class="small-12 columns activity_details_object">
<a href="{{ event.note.get_absolute_url }}" class="activity_target">{{ event.note.name }}</a>
</div>
<div class="small-12 columns activity_details_context">
- <a href="{{ event.note.course.get_absolute_url }}" class="course_link">{{ event.note.course.name }} // {{ event.note.course.school.name }}</a>
+ <a href="{{ event.note.course.get_absolute_url }}" class="course_link">{{ event.note.course.name }} •
+ {% if event.note.course.school %}
+ {{ event.note.course.school.name }}
+ {% else %}
+ {{ event.note.course.department.school.name }}
+ {% endif %}
+ </a>
</div>
{% endif %}
{% if item.0 == 'CourseKarmaEvent' %}
- <div class="small-12 columns activity_details_action">
+ <div class="small-12 columns activity_details_object">
<a href="{{ event.course.get_absolute_url }}" class="activity_target">{{ event.course.name }}</a>
</div>
<div class="small-12 columns activity_details_context">
{% endif %}
-
</div>
+ </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>
-
- {% endfor %}
+ <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-8 columns account_settings_edit">
+ <a href="{% url 'account_email' %}"><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' %}"><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' %}"><i class="fa fa-pencil"></i> Edit</a>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
- <div class="row">
- <div class="small-10 columns small-centered column_header">
- latest activity
- </div>
- </div>
-
{% if not object_list %}
<div class="row">
- <div id="no_activity" class="small-10 columns small-centered center">
+ <div id="no_activity" class="small-12 columns">
<h4>Nothing to show here yet.</h4>
</div>
</div>
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.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
# All Auth
url(r'^accounts/', include('allauth.urls')),
url(r'^accounts/profile/', ProfileView.as_view(), name='accounts_profile'),
- url(r'^accounts/control_panel', ControlView.as_view(), name='control_panel'),
# Media handling
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',