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
63b2b471
Commit
63b2b471
authored
Jul 19, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to render home page
parent
6e2de9db
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
67 deletions
+79
-67
common/static/coffee/src/discussion/discussion_router.coffee
+2
-0
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+8
-0
lms/templates/discussion/_underscore_templates.html
+69
-0
lms/templates/discussion/index.html
+0
-67
No files found.
common/static/coffee/src/discussion/discussion_router.coffee
View file @
63b2b471
...
...
@@ -24,6 +24,8 @@ if Backbone?
setActiveThread
:
=>
if
@
thread
@
nav
.
setActiveThread
(
@
thread
.
get
(
"id"
))
else
@
nav
.
goHome
showThread
:
(
forum_name
,
thread_id
)
->
@
thread
=
@
discussion
.
get
(
thread_id
)
...
...
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
63b2b471
...
...
@@ -2,6 +2,7 @@ if Backbone?
class
@
DiscussionThreadListView
extends
Backbone
.
View
events
:
"click .search"
:
"showSearch"
"click .home"
:
"goHome"
"click .browse"
:
"toggleTopicDrop"
"keydown .post-search-field"
:
"performSearch"
"click .sort-bar a"
:
"sortThreads"
...
...
@@ -43,6 +44,7 @@ if Backbone?
if
active
@
setActiveThread
(
thread_id
)
#TODO fix this entire chain of events
addAndSelectThread
:
(
thread
)
=>
commentable_id
=
thread
.
get
(
"commentable_id"
)
...
...
@@ -191,6 +193,12 @@ if Backbone?
@
$
(
".browse"
).
removeClass
(
'is-open'
)
setTimeout
(
->
@
$
(
".post-search-field"
).
focus
()),
200
goHome
:
->
@
template
=
_
.
template
(
$
(
"#discussion-home"
).
html
())
$
(
".discussion-column"
).
html
(
@
template
)
$
(
".post-list a"
).
removeClass
(
"active"
)
thread_id
=
null
toggleTopicDrop
:
(
event
)
=>
event
.
preventDefault
()
event
.
stopPropagation
()
...
...
lms/templates/discussion/_underscore_templates.html
View file @
63b2b471
...
...
@@ -171,3 +171,72 @@
<
span
class
=
"votes-count"
>+
$
{
"<%- votes['up_count'] %>"
}
<
/span
>
<
/a
>
</script>
<script
type=
"text/template"
id=
"discussion-home"
>
<
div
class
=
"discussion-article blank-slate"
>
<
section
class
=
"home-header"
>
<
span
class
=
"label"
>
DISCUSSION
HOME
:
<
/span
>
<
h1
class
=
"home-title"
>
$
{
course
.
display_name_with_default
}
<
/h1
>
<
/section
>
<
section
class
=
"home-stats"
>
<
div
class
=
"label-area"
>
<
span
class
=
"label"
>
PROFILE
,
PARTICIPATION
<
/span
>
<
a
href
=
"#"
class
=
"profile-link"
>
Your
profile
Name
<
/a
>
<
/div
>
<
div
class
=
"stats-grouping"
>
<
div
class
=
"profile-stat profile-stat-posts"
>
<
span
class
=
"count count-posts"
>
5
<
/span
>
<
span
class
=
"profile-stat-label"
>
POSTS
<
/span
>
<
/div
>
<
div
class
=
"profile-stat profile-stat-comments"
>
<
span
class
=
"count count-comments"
>
12
<
/span
>
<
span
class
=
"profile-stat-label"
>
COMMENTS
<
/span
>
<
/div
>
<
div
class
=
"profile-stat profile-stat-following"
>
<
span
class
=
"count count-following"
>
9
<
/span
>
<
span
class
=
"profile-stat-label"
>
FOLLOWING
<
/span
>
<
/div
>
<
/div
>
<
/section
>
<
span
class
=
"label label-settings"
>
HOW
TO
USE
EDX
DISCUSSIONS
<
/span
>
<
table
class
=
"home-helpgrid"
>
<
tr
class
=
"helpgrid-row helpgrid-row-navigation"
>
<
td
class
=
"row-title"
>
Find
discussions
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-reorder"
><
/i
>
<
span
class
=
"row-description"
>
Focus
in
on
specific
topics
<
/span
>
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-search"
><
/i
>
<
span
class
=
"row-description"
>
Search
for
specific
posts
<
/span
>
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-sort"
><
/i
>
<
span
class
=
"row-description"
>
Sort
by
date
,
vote
,
or
comments
<
/span
>
<
/td
>
<
/tr
>
<
tr
class
=
"helpgrid-row helpgrid-row-participation"
>
<
td
class
=
"row-title"
>
Engage
with
posts
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-plus"
><
/i
>
<
span
class
=
"row-description"
>
Upvote
posts
and
good
responses
<
/span
>
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-flag"
><
/i
>
<
span
class
=
"row-description"
>
Report
Forum
Misuse
<
/span
>
<
/td
>
<
td
class
=
"row-item"
>
<
i
class
=
"icon icon-star"
><
/i
>
<
span
class
=
"row-description"
>
Follow
posts
for
updates
<
/span
>
<
/td
>
<
/tr
>
<
tr
class
=
"helpgrid-row helpgrid-row-notification"
>
<
td
class
=
"row-title"
>
Receive
updates
<
/td
>
<
td
class
=
"row-item-full"
colspan
=
"3"
>
<
i
class
=
"icon icon-envelope"
><
/i
>
<
span
class
=
"row-setting"
><
input
type
=
"checkbox"
name
=
"email-notification"
><
/input></
span
>
<
span
class
=
"row-description"
>
If
enabled
,
you
will
receive
an
email
digest
once
a
day
notifying
you
about
new
,
unread
activity
from
posts
you
are
following
.
<
/span
>
<
/td
>
<
/tr
>
<
/table
>
<
/div>
</script>
lms/templates/discussion/index.html
View file @
63b2b471
...
...
@@ -25,73 +25,6 @@
<div
class=
"discussion-body"
>
<div
class=
"sidebar"
></div>
<div
class=
"discussion-column"
>
<div
class=
"discussion-article blank-slate"
>
<section
class=
"home-header"
>
<span
class=
"label"
>
DISCUSSION HOME:
</span>
<h1
class=
"home-title"
>
${course.display_name_with_default}
</h1>
</section>
<section
class=
"home-stats"
>
<div
class=
"label-area"
>
<span
class=
"label"
>
PROFILE, PARTICIPATION
</span>
<a
href=
"#"
class=
"profile-link"
>
Your profile Name
</a>
</div>
<div
class=
"stats-grouping"
>
<div
class=
"profile-stat profile-stat-posts"
>
<span
class=
"count count-posts"
>
5
</span>
<span
class=
"profile-stat-label"
>
POSTS
</span>
</div>
<div
class=
"profile-stat profile-stat-comments"
>
<span
class=
"count count-comments"
>
12
</span>
<span
class=
"profile-stat-label"
>
COMMENTS
</span>
</div>
<div
class=
"profile-stat profile-stat-following"
>
<span
class=
"count count-following"
>
9
</span>
<span
class=
"profile-stat-label"
>
FOLLOWING
</span>
</div>
</div>
</section>
<span
class=
"label label-settings"
>
HOW TO USE EDX DISCUSSIONS
</span>
<table
class=
"home-helpgrid"
>
<tr
class=
"helpgrid-row helpgrid-row-navigation"
>
<td
class=
"row-title"
>
Find discussions
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-reorder"
></i>
<span
class=
"row-description"
>
Focus in on specific topics
</span>
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-search"
></i>
<span
class=
"row-description"
>
Search for specific posts
</span>
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-sort"
></i>
<span
class=
"row-description"
>
Sort by date, vote, or comments
</span>
</td>
</tr>
<tr
class=
"helpgrid-row helpgrid-row-participation"
>
<td
class=
"row-title"
>
Engage with posts
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-plus"
></i>
<span
class=
"row-description"
>
Upvote posts and good responses
</span>
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-flag"
></i>
<span
class=
"row-description"
>
Report Forum Misuse
</span>
</td>
<td
class=
"row-item"
>
<i
class=
"icon icon-star"
></i>
<span
class=
"row-description"
>
Follow posts for updates
</span>
</td>
</tr>
<tr
class=
"helpgrid-row helpgrid-row-notification"
>
<td
class=
"row-title"
>
Receive updates
</td>
<td
class=
"row-item-full"
colspan=
"3"
>
<i
class=
"icon icon-envelope"
></i>
<span
class=
"row-setting"
><input
type=
"checkbox"
name=
"email-notification"
></input></span>
<span
class=
"row-description"
>
If enabled, you will receive an email digest once a day notifying you about new, unread activity from posts you are following.
</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</section>
...
...
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