Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
322828fb
Commit
322828fb
authored
Aug 12, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecessary template
parent
44f7b37b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
107 deletions
+0
-107
lms/templates/discussion/thread.html
+0
-107
No files found.
lms/templates/discussion/thread.html
deleted
100644 → 0
View file @
44f7b37b
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%!
from
datehelper
import
time_ago_in_words
%
>
<
%!
from
dateutil
.
parser
import
parse
%
>
<
%!
import
urllib
%
>
<
%
def
name=
"render_thread(course_id, thread, show_comments=False)"
>
<div
class=
"thread"
_id=
"${thread['id']}"
>
${render_content(thread, "thread", show_comments=show_comments)}
% if show_comments:
${render_comments(thread['children'])}
% endif
</div>
</
%
def>
<
%
def
name=
"render_comments(comments)"
>
<div
class=
"comments"
>
% for comment in comments:
<div
class=
"comment"
_id=
"${comment['id']}"
>
${render_content(comment, "comment")}
<div
class=
"comments"
>
${render_comments(comment['children'])}
</div>
</div>
% endfor
</div>
</
%
def>
<
%
def
name=
"render_content(content, type, **kwargs)"
>
<div
class=
"discussion-content"
>
<div
class=
"discussion-content-wrapper clearfix"
>
${render_vote(content)}
<div
class=
"discussion-right-wrapper clearfix"
>
${render_title(content, type, **kwargs)}
<div
class=
"discussion-content-view"
>
<div
class=
"content-body ${type}-body"
>
${content['body'] | h}
</div>
<div
class=
"content-raw-body ${type}-raw-body"
style=
"display: none"
>
${content['body'] | h}
</div>
${render_tags(content, type, **kwargs)}
${render_bottom_bar(content, type, **kwargs)}
</div>
</div>
</div>
</div>
</
%
def>
<
%
def
name=
"render_title(content, type, **kwargs)"
>
<
%
if
type =
=
"
thread
"
:
if
kwargs
.
get
('
show_comments
',
False
)
:
url_for_thread =
""
else:
url_for_thread =
reverse('django_comment_client.forum.views.single_thread',
args=
[course_id,
content
['
commentable_id
'],
content
['
id
']])
%
>
% if type == "thread":
<a
class=
"thread-title"
name=
"${content['id']}"
href=
"${url_for_thread}"
>
${content['title'] | h}
</a>
% endif
</
%
def>
<
%
def
name=
"render_tags(content, type, **kwargs)"
>
<
%
def
url_for_tags
(
tags
)
:
return
reverse
('
django_comment_client
.
forum
.
views
.
search
',
args=
[course_id])
+
'?'
+
urllib
.
urlencode
({'
tags
'
:
",".
join
(
tags
)})
%
>
% if type == "thread":
<div
class=
"thread-tags"
>
% for tag in content['tags']:
<a
class=
"thread-tag"
href=
"${url_for_tags([tag])}"
>
${tag | h}
</a>
% endfor
</div>
<div
class=
"thread-raw-tags"
style=
"display: none"
>
${",".join(content['tags']) | h}
</div>
% endif
</
%
def>
<
%
def
name=
"render_bottom_bar(content, type, **kwargs)"
>
<div
class=
"info"
>
${render_info(content)}
${render_link("discussion-link discussion-reply", "Reply")}
${render_link("discussion-link discussion-edit", "Edit")}
</div>
</
%
def>
<
%
def
name=
"render_info(content)"
>
<div
class=
"comment-time"
>
${time_ago_in_words(parse(content['updated_at']))} ago by
% if content['anonymous']:
anonymous
% else:
user No.${content['user_id']}
% endif
</div>
<div
class=
"comment-count"
>
% if content.get('comments_count', -1) >= 0:
${content['comments_count']} comment(s)
% endif
</div>
</
%
def>
<
%
def
name=
"render_link(cls, html)"
>
<a
class=
"${cls}"
href=
"javascript:void(0)"
>
${html}
</a>
</
%
def>
<
%
def
name=
"render_vote(content)"
>
<div
class=
"discussion-votes"
>
${render_link("discussion-vote discussion-vote-up", "
˄
")}
${content['votes']['point']}
${render_link("discussion-vote discussion-vote-down", "
˅
")}
</div>
</
%
def>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment