Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions lms/djangoapps/teams/templates/teams/_thread_list_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<%!
from django.utils.translation import gettext as _
%>

<script type="text/template" id="thread-list-template">
<div class="forum-nav-thread-list-wrapper" id="sort-filter-wrapper" tabindex="-1">
<div class="forum-nav-refine-bar">
<label class="forum-nav-filter-main">
## Translators: This labels a filter menu in forum navigation
<span class="sr">${_("Filter:")}</span>
<select class="forum-nav-filter-main-control">
## Translators: Show all posts
<option value="all">${_("Show all posts")}</option>

## Translators: Unread posts
<option value="unread">${_("Unread posts")}</option>

## Translators: Unanswered posts
<option value="unanswered">${_("Unanswered posts")}</option>

% if flag_moderator:
## Translators: Flagged posts
<option value="flagged">${_("Flagged")}</option>
% endif
</select>
</label>

% if isDiscussionDivisionEnabled and isPrivilegedUser:
<label class="forum-nav-filter-cohort">
## Translators: Group label
<span class="sr">${_("Group:")}</span>
<select class="forum-nav-filter-cohort-control">
<option value="">${_("in all groups")}</option>

% if groups:
% for group in groups:
<option value="${group.id}">${group.name}</option>
% endfor
% endif
</select>
</label>
% endif

<label class="forum-nav-sort">
## Translators: Sort label
<span class="sr">${_("Sort:")}</span>
<select class="forum-nav-sort-control">
<option value="activity">${_("by recent activity")}</option>
<option value="comments">${_("by most activity")}</option>
<option value="votes">${_("by most votes")}</option>
</select>
</label>
</div>

<div class="search-alerts"></div>
<ul class="forum-nav-thread-list"></ul>
</div>
</script>
23 changes: 23 additions & 0 deletions lms/djangoapps/teams/templates/teams/_underscore_templates.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/>
<%
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
enable_discussion_home_panel = settings.FEATURES.get('ENABLE_DISCUSSION_HOME_PANEL', False)
%>

<script type="text/javascript">
window.PLATFORM_NAME = "${settings.PLATFORM_NAME | n, js_escaped_string}";
% if enable_discussion_home_panel:
window.ENABLE_DISCUSSION_HOME_PANEL = true;
% else:
window.ENABLE_DISCUSSION_HOME_PANEL = false;
% endif

% if enable_daily_digest:
window.ENABLE_FORUM_DAILY_DIGEST = true;
% else:
window.ENABLE_FORUM_DAILY_DIGEST = false;
% endif

</script>
<%static:include path="common/templates/discussion/templates.underscore" />
4 changes: 2 additions & 2 deletions lms/djangoapps/teams/templates/teams/teams.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
</%static:require_module>
</%block>

<%include file="../discussion/_underscore_templates.html" />
<%include file="../discussion/_thread_list_template.html" />
<%include file="_underscore_templates.html" />
<%include file="_thread_list_template.html" />
1 change: 1 addition & 0 deletions openedx/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ def make_mako_module_dir(settings):
# Since the CMS uses the LMS's list of mako template directories for the "preview"
# template engine, we define the list here
lms_mako_template_dirs_base = list(MAKO_TEMPLATE_DIRS_BASE)
lms_mako_template_dirs_base.append(REPO_ROOT / 'lms' / 'djangoapps' / 'teams' / 'templates')
lms_mako_template_dirs_base.append(OPENEDX_ROOT / 'features' / 'course_experience' / 'templates')

CONTEXT_PROCESSORS = [
Expand Down
Loading