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
ab27cb2c
Commit
ab27cb2c
authored
Dec 04, 2013
by
Jean Michel Rouly
Browse files
Formatted question detail page.
parent
845ca5a8
Changes
6
Hide whitespace changes
Inline
Side-by-side
researchquestions/templates/comment_form.html
0 → 100644
View file @
ab27cb2c
Form
researchquestions/templates/comment_panel.html
0 → 100644
View file @
ab27cb2c
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
>
<p>
{{ comment.text }}
</p>
<a
data-toggle=
"collapse"
data-target=
"#replies{{comment.pk}}"
style=
"cursor:pointer;"
>
Replies ({{ comment.get_replies|length }})
</a>
<div
id=
"replies{{comment.pk}}"
class=
"collapse"
>
{% if comment.get_replies %}
{% for reply in comment.get_replies %}
<div
class=
"well well-sm well-replies"
>
{{ reply.text }}
</div>
{% endfor %}
{% else %}
<div
class=
"well well-sm well-replies"
>
No replies yet.
</div>
{% endif %}
<div
class=
"well well-sm well-replies"
>
{% include 'reply_form.html' %}
</div>
</div>
</div>
</div>
</div>
</div>
researchquestions/templates/index.html
View file @
ab27cb2c
...
...
@@ -17,7 +17,34 @@ HNRS 110 • Homepage
{% if questions %}
{% for question in questions %}
{% include 'question_component.html' %}
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{question.user.first_name}} {{question.user.last_name}}
<span
class=
"pull-right"
>
<em>
Asked on {{question.date.date}}
</em>
</span>
</h3>
</div>
<div
class=
"panel-body"
>
<p>
{{ question.text }}
</p>
<a
href=
"{{ question.get_absolute_url }}"
>
Comments ({{ question.get_comments|length }})
</a>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div
class=
"row"
>
...
...
researchquestions/templates/question.html
View file @
ab27cb2c
...
...
@@ -10,16 +10,61 @@ HNRS 110 • Question Discussion
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<h1>
Question Discussion
</h1>
<p
class=
"lead"
>
D
escrip
tion
</p>
<p
class=
"lead"
>
D
iscuss the student's proposed ques
tion
.
</p>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-6 col-lg-offset-1"
>
<h1>
{{question.user.first_name}} {{question.user.last_name}}
</h1>
{{ question.text }}
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{question.user.first_name}} {{question.user.last_name}}
<span
class=
"pull-right"
>
<em>
Asked on {{question.date.date}}
</em>
</span>
</h3>
</div>
<div
class=
"panel-body"
>
{{ question.text }}
</div>
<div
class=
"panel-footer"
>
<a
data-toggle=
"collapse"
data-target=
"#make-comment"
style=
"cursor:pointer;"
>
Make Comment
</a>
<div
class=
"collapse"
id=
"make-comment"
>
Form
</div>
</div>
</div>
</div>
</div>
{% if question.get_comments %}
{% for comment in question.get_comments %}
{% include 'comment_panel.html' %}
{% endfor %}
{% else %}
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"panel panel-danger"
>
<div
class=
"panel-body"
>
There are no comments here yet.
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
researchquestions/templates/question_component.html
deleted
100644 → 0
View file @
845ca5a8
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-1"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{question.user.first_name}} {{question.user.last_name}}
<span
class=
"pull-right"
>
<em>
Asked on {{question.date.date}}
</em>
</span>
</h3>
</div>
<div
class=
"panel-body"
>
{{ question.text }}
</div>
<div
class=
"panel-footer"
>
<a
href=
"{{ question.get_absolute_url }}"
>
<em>
Comments ({{ question.get_comments|length }})
</em>
</a>
</div>
</div>
</div>
</div>
researchquestions/templates/reply_form.html
0 → 100644
View file @
ab27cb2c
Form
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