Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jean Michel Rouly
research-questions
Commits
3730cfdb
Commit
3730cfdb
authored
Mar 08, 2014
by
Jean Michel Rouly
Browse files
Notify the user that they're sorting by comments.
parent
1faf2214
Changes
2
Hide whitespace changes
Inline
Side-by-side
researchquestions/website/templates/index.html
View file @
3730cfdb
...
...
@@ -26,6 +26,17 @@ Homepage
</div>
{% endif %}
{% if sort == "comments" %}
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"alert alert-dismissable alert-info text-center"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
×
</button>
Sorting questions with fewest comments first.
</div>
</div>
</div>
{% endif %}
{% if questions %}
<form
method=
"post"
>
{% csrf_token %}
...
...
researchquestions/website/views.py
View file @
3730cfdb
...
...
@@ -75,6 +75,7 @@ def index(request, *args, **kwargs):
return
render
(
request
,
'index.html'
,
{
'filter'
:
section
,
'sort'
:
sort
,
'questions'
:
questions
,
'page_range'
:
range
(
1
,
int
(
questions
.
paginator
.
num_pages
)
+
1
),
},
...
...
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