forked from rapidsms/rapidsms
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added simple question view, to see answers
- Loading branch information
Showing
5 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% extends "questions/base.html" %} | ||
{% load reporters %} | ||
|
||
{% block title %}Questions{% endblock %} | ||
|
||
{% block content %} | ||
<div class="module"> | ||
<h2>Answers Received to {{ question }}</h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Raw Answer</th> | ||
<th>Normalized Answer</th> | ||
<th>Reporter</th> | ||
<th>Location</th> | ||
<th>Date/time</th> | ||
</tr> | ||
</thead> | ||
<tbody>{% for answer in answers %} | ||
<tr> | ||
<td>{{ answer.raw_text }}</td> | ||
<td>{{ answer.normalized }}</td>{% if answer.submission.reporter %} | ||
<td><a href="/reporters/{{ answer.submission.reporter.pk }}"{% if answer.submission.reporter.full_name %}>{{ answer.submission.reporter.full_name }}{% else %} class="unknown">Unknown{% endif %}</a></td>{% else %} | ||
<td><span class="connection">{{ answer.submission.connection }}</span></td>{% endif %} | ||
<td>{{ answer.submission.location }}</td> | ||
<td>{{ answer.submission.submitted|last_seen }}</td> | ||
</tr>{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
<td colspan="6"> | ||
<a href="/questions/{{ question.pk }}/export/xls">Export to Excel</a> | ||
<span>{{ answers|length }} Answers</span> | ||
</td> | ||
</tfoot> | ||
</table> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters