From 1de17fb74597d91c22978de5249abc069d5f2fba Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 4 Sep 2014 18:22:19 -0400 Subject: [PATCH] Move more forum nav rendering logic to front end The cohort selector is rendered only for a privileged user in a cohorted course, and that logic is now in an Underscore template instead of Mako. --- .../discussion_thread_list_view_spec.coffee | 20 ++++++++++++++++--- .../src/discussion/discussion_router.coffee | 6 +++++- .../views/discussion_thread_list_view.coffee | 10 ++++++++-- .../discussion/_thread_list_template.html | 10 ++-------- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee b/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee index 11866c349c..c82ab2e406 100644 --- a/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee @@ -75,6 +75,7 @@ describe "DiscussionThreadListView", -> + <% if (isCohorted && isPrivilegedUser) { %> + <% } %> \ - %if is_course_cohorted and is_moderator: -## Lack of indentation is intentional to avoid whitespace between this and siblings -${"<% if (isCohorted && isPrivilegedUser) { %>"}\ - %endif -## Lack of indentation is intentional to avoid whitespace between this and siblings -${"<% } %>"}