Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

revamped schedule page

  • Loading branch information...
commit ae838da781b61aec5aa96acaa74235c3fb10e68a 1 parent cff9ae2
@ngokevin ngokevin authored
View
10 schedule/templates/schedule/index.html
@@ -2,20 +2,24 @@
{% block content %}
-<h1>Schedule</h1><br/><br/>
+<h1>Schedule</h1>
+<h2>{{term}}</h2>
{% block header %}
+
<link rel="stylesheet" type="text/css" href="/site_media/stylesheets/make_schedule.css"/>
<script type="text/javascript" src="/site_media/javascripts/jquery-min.js"></script>
<script>schedule = {{json|safe}}</script>
<script type="text/javascript" src="/site_media/javascripts/schedule.js"></script>
{% endblock %}
+<div class="schedule-navigation">
{% if current_term %}
- <h3><a href="next_term/">Next Term >></a></h3>
+ <a href="next_term/"><span>Next Term >></span></a>
{% else %}
- <h3><a href="/schedule/">&#060;&#060; Current Term</a></h3>
+ <a href="/schedule/"><span>&#060;&#060; Current Term</span></a>
{% endif %}
+</div>
<div class="span-24 last">
<div class="span-18">
View
17 schedule/templates/schedule/no_course.html
@@ -2,14 +2,23 @@
{% block content %}
-<h1>Schedule</h1><br/><br/>
+<h1>Schedule</h1>
+<h2>{{term}}</h2>
+<link rel="stylesheet" type="text/css" href="/site_media/stylesheets/make_schedule.css"/>
+
+{% comment %} Navigation {% endcomment %}
+<div class="schedule-navigation">
{% if current_term %}
- <h4><a href="next_term/">Next Term >></a></h4>
+ <a href="next_term/"><span>Next Term >></span></a>
{% else %}
- <h4><a href="/schedule/">&#060;&#060; Current Term</a></h4>
+ <a href="/schedule/"><span>&#060;&#060; Current Term</span></a>
{% endif %}
+<br/>
+<br/>
+<br/>
+<h4>[No courses registered for this term]</h4>
+</div>
-<h3>No courses registered for this term</h3>
{% endblock %}
View
12 schedule/views.py
@@ -1,13 +1,15 @@
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
import simplejson as json
-
+from reglib.utilities import utilities
# Create your views here.
def index(request):
regclass = request.session['regclass']
schedule = regclass.schedule.current_classes
+ term = utilities.adjust_schedule_term(regclass.schedule.current_term)
+ term = utilities.format_term(term, True)
schedule_json = json.dumps(schedule)
no_courses = False
@@ -15,12 +17,14 @@ def index(request):
no_courses = True
if no_courses:
- return render_to_response('schedule/no_course.html', {'current_term': True})
- return render_to_response('schedule/index.html', {'schedule':schedule, 'range':range(24), 'json':schedule_json, 'current_term': True})
+ return render_to_response('schedule/no_course.html', {'current_term': True, 'term': term})
+ return render_to_response('schedule/index.html', {'schedule':schedule, 'term':term, 'range':range(24), 'json':schedule_json, 'current_term': True})
def next_term(request):
regclass = request.session['regclass']
schedule = regclass.next_schedule.current_classes
+ term = utilities.adjust_schedule_term(regclass.next_schedule.current_term)
+ term = utilities.format_term(term, True)
schedule_json = json.dumps(schedule)
no_courses = False
@@ -29,7 +33,7 @@ def next_term(request):
if no_courses:
return render_to_response('schedule/no_course.html', {'current_term': False})
- return render_to_response('schedule/index.html', {'schedule':schedule, 'range':range(24), 'json':schedule_json, 'current_term': False})
+ return render_to_response('schedule/index.html', {'schedule':schedule, 'term':term, 'range':range(24), 'json':schedule_json, 'current_term': False})
View
21 site_media/stylesheets/make_schedule.css
@@ -17,3 +17,24 @@ td{
.combination-full{
display:none;
}
+
+.schedule-navigation{
+ text-align:center;
+}
+
+.schedule-navigation a{
+ text-decoration:none;
+ color:black;
+}
+
+.schedule-navigation span{
+ font-size:1.5em;
+ padding-right:10px;
+ padding-left:10px;
+ padding-top: 3px;
+ padding-bottom: 3px;
+}
+
+.schedule-navigation span:hover{
+ background:#6C8DD5;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.