From 1405cf97fd78c5f69b9c620ce06dbe427f79a86c Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Sat, 1 Sep 2012 21:16:04 -0700 Subject: [PATCH] Create a new template that inherits from course_navigation.html to avoid repeating the course navigation template and augment it with the new post button. --- .../courseware/course_navigation.html | 2 +- .../_discussion_course_navigation.html | 5 +++ lms/templates/discussion/index.html | 2 +- lms/templates/discussion/single_thread.html | 33 +------------------ 4 files changed, 8 insertions(+), 34 deletions(-) create mode 100644 lms/templates/discussion/_discussion_course_navigation.html diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 5df09207b1..27dca4363e 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -46,7 +46,7 @@ def url_class(url): % if staff_access:
  • Instructor
  • % endif - + <%block name="extratabs" /> diff --git a/lms/templates/discussion/_discussion_course_navigation.html b/lms/templates/discussion/_discussion_course_navigation.html new file mode 100644 index 0000000000..13b291196b --- /dev/null +++ b/lms/templates/discussion/_discussion_course_navigation.html @@ -0,0 +1,5 @@ +<%inherit file="../courseware/course_navigation.html" /> + +<%block name="extratabs"> +
  • New Post
  • + \ No newline at end of file diff --git a/lms/templates/discussion/index.html b/lms/templates/discussion/index.html index ed8cb765f2..182aacd82d 100644 --- a/lms/templates/discussion/index.html +++ b/lms/templates/discussion/index.html @@ -17,7 +17,7 @@ <%static:js group='discussion'/> -<%include file="../courseware/course_navigation.html" args="active_page='discussion'" /> +<%include file="_discussion_course_navigation.html" args="active_page='discussion'" /> <%include file="_new_post.html" /> diff --git a/lms/templates/discussion/single_thread.html b/lms/templates/discussion/single_thread.html index ee1ef9c269..507c24f6d6 100644 --- a/lms/templates/discussion/single_thread.html +++ b/lms/templates/discussion/single_thread.html @@ -20,38 +20,7 @@ - +<%include file="_discussion_course_navigation.html" args="active_page='discussion'"/> <%include file="_new_post.html" />