From 6ab6fb76211b9b550954c9c967a2e3f0ff08a384 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Thu, 10 Jan 2013 14:22:25 -0500 Subject: [PATCH] adding first run of course_detail template that lists notes --- .../templates/courses/course_detail.html | 170 +++++++++++++++++- karmaworld/urls.py | 2 - 2 files changed, 169 insertions(+), 3 deletions(-) diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index 4f31910..668585e 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -1 +1,169 @@ -TODO: Course detail template +{% extends "base.html" %} +{% load url from future %} + +{% block pagescripts %} + +{% endblock %} + +{% block pagestyle %} + +{% endblock %} + +{% block title %} + Share Notes for {{ course.name }} | {{ course.school.name }} +{% endblock %} + +{% block content %} +
+ +
+
+
+ course +
+
+ +
+
+ {{ course.name }} +
+
+ +
+
+
+ {% comment %} + +
+
+ + + {% comment %} +
+
+
+
+ {% if course in user.get_profile.courses.all %} +
+ drop +
+ {% else %} +
+ join +
+ {% endif %} +
+
+ course_action_gear +
+
+
+
+ {% endcomment %} + +
+
+ {% if course.desc %} + {{ course.desc }} + {% endif %} + +
+
+ +
+ +
+
+
+ Latest uploaded notes +
+
+
+ +
+
+
+ + {% for note in course.note_set.all %} + +
+
+
+ {{ note.uploaded_at|date:"gA" }} // {{ note.uploaded_at|date:"D M d o" }} +
+ +
+ {{ note.name }} + {% comment %} + + {{ note.owner.get_profile.get_name }} added {{ file.name }} + {% endcomment %} +
+ + +
+
+
+ dashboard_activity_callout_icon_notebook +
+
+ + {% if note.text %} + {{ note.text|slice:":500" }}… + {% else %} + {{ note.description }} + {% endif %} +
+
+
+ {% comment %} + +
+
+ So far, {{ note.numUpVotes }} people have completely fallen in love with with these notes. {{ note.viewCount }} people have viewed them. +
+
+ {% endcomment %} +
+
+ {% endfor %} +
+
+ +
+ + {% comment %} +
+
+
+
+ search_arrow_left +
+
+
    +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
  • 6
  • +
+
+
+ search_arrow_right +
+
+
+
+ {% endcomment %} +
+{% endblock %} diff --git a/karmaworld/urls.py b/karmaworld/urls.py index 36f83f5..bd19f19 100644 --- a/karmaworld/urls.py +++ b/karmaworld/urls.py @@ -15,8 +15,6 @@ urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), - #url(r'^/(?P[^/]+)/(?P[^/]+)$', - #url(r'^/[a-z0-9\-]+$', CourseDetailView.as_view(), name='course_detail'), url(r'^(?P[^/]+)/(?P[^/]+)$', CourseDetailView.as_view(), name='course_detail'), url(r'^$', ListView.as_view(model=Course), name='home'), -- 2.25.1