Added templates for listing SurveyRecords.
In the process results_heading and results_row got renamed to records_heading and records_row.
Reviewed by: Lennard de Rijk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/survey/list/records_heading.html Tue Aug 04 16:46:47 2009 +0200
@@ -0,0 +1,5 @@
+<tr align="left">
+ <th>Taken By</th>
+ <th>Taken On</th>
+ <th>Preview: {{ first_question|truncatewords:7 }}</th>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/survey/list/records_row.html Tue Aug 04 16:46:47 2009 +0200
@@ -0,0 +1,21 @@
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="return false; if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+
+ <td>
+ <div class="author">
+ {{ list.item.user.name }}
+ </div>
+ </td>
+
+ <td>
+ <div class="modified">
+ {{ list.item.modified|date:"Y-m-d H:i" }}
+ </div>
+ </td>
+
+ <td style="max-width: 150px;">
+ <div class="first_answer">
+ {{ list.item.getValues.0|truncatewords:20 }}
+ </div>
+ </td>
+</tr>
--- a/app/soc/templates/soc/survey/list/results_heading.html Tue Aug 04 15:59:42 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<tr align="left">
- {% for property in properties %}
- <th>{{ property }}</th>
- {% endfor %}
- <th>Taken By</th>
- <th>Created On</th>
- <th>Last Modified</th>
- <th>Answer</th>
- {% if grades %}
- <th>Grade</th>
- {% endif %}
-</tr>
--- a/app/soc/templates/soc/survey/list/results_row.html Tue Aug 04 15:59:42 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
-onclick="return false; if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
-
- {% for value in list.item.getValues %}
- <td>
- <div class="{{ value }}">
- {{ value }}
- </div>
- </td>
- {% endfor %}
-
- <td>
- <div class="author">
- {{ list.item.user.link_id }}
- </div>
- </td>
-
- <td>
- <div class="created">
- {{ list.item.created|date:"Y-m-d H:i" }}
- </div>
- </td>
-
- <td>
- <div class="modified">
- {{ list.item.modified|date:"Y-m-d H:i" }}
- </div>
- </td>
-
- <td>
- <a class="fetch_answers" id="results_for_{{ list.item.user.link_id }}" onclick="do_redirect=false">View</a>
- </td>
-
- {% if grades %}
- <td>
- <div class="grade">
- <select id="id_survey__{{ list.item.user.link_id }}__selection__grade"
- name="id_survey__{{ list.item.user.link_id }}__selection__grade">
-
- <option value='' {% ifequal list.item.grade '' %} selected="selected" {% endifequal %} >
- None</option>
- <option value='pass' {% ifequal list.item.grade 'Pass' %} selected="selected" {% endifequal %} >
- Pass</option>
- <option value='fail' {% ifequal list.item.grade 'Fail' %} selected="selected" {% endifequal %} >
- Fail</option>
-
- </select>
- </div>
- </td>
- {% endif %}
-</tr>