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
3b312a2c
Commit
3b312a2c
authored
Aug 02, 2012
by
Brittany Cheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dementrock/mitx into discussion2
parents
cf4ac2ef
833b8950
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/templates/discussion/_sort.html
+5
-5
No files found.
lms/templates/discussion/_sort.html
View file @
3b312a2c
...
...
@@ -3,16 +3,16 @@
<
%
def
name=
"link_to_sort(key, title)"
>
% if key == sort_key:
% if sort_order.lower() == 'desc':
${_link_to_sort(key, 'asc', title + ' [v]')}
${_link_to_sort(key, 'asc', title + ' [v]'
, 'sorted'
)}
% else:
${_link_to_sort(key, 'desc', title + ' [^]')}
${_link_to_sort(key, 'desc', title + ' [^]'
, 'sorted'
)}
% endif
% else:
${_link_to_sort(key, 'desc', title)}
% endif
</
%
def>
<
%
def
name=
"_link_to_sort(key, order, title)"
>
<
%
def
name=
"_link_to_sort(key, order, title
, cls=''
)"
>
<
%
def
merge
(
dic1
,
dic2
)
:
return
dict
(
dic1
.
items
()
+
dic2
.
items
())
...
...
@@ -21,9 +21,9 @@
return
base_url
+
'?'
+
urlencode
(
merge
(
query_params
,
{'
page
'
:
1
,
'
sort_key
'
:
key
,
'
sort_order
'
:
order
}))
%
>
% if discussion_type == 'inline':
<a
class=
"discussion-sort-link discussion-inline-sort-link"
href=
"javascript:void(0)"
sort-url=
"${url_for_sort(key, order)}"
>
${title}
</a>
<a
class=
"discussion-sort-link discussion-inline-sort-link
${cls}
"
href=
"javascript:void(0)"
sort-url=
"${url_for_sort(key, order)}"
>
${title}
</a>
% else:
<a
class=
"discussion-sort-link"
href=
"${url_for_sort(key, order)}"
>
${title}
</a>
<a
class=
"discussion-sort-link
${cls}
"
href=
"${url_for_sort(key, order)}"
>
${title}
</a>
% endif
</
%
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