Table to view uploads.
--- a/site-content/style.css Thu Sep 03 18:52:01 2009 +0530
+++ b/site-content/style.css Thu Sep 03 19:07:30 2009 +0530
@@ -222,6 +222,46 @@
position: relative;
left: -7%;
}
+
+/* start - table */
+table {
+ border-collapse: collapse;
+ margin: 10px 15px;
+}
+th strong {
+ color: #fff;
+}
+th {
+ background: #8EC102;
+ height: 29px;
+ padding-left: 11px;
+ padding-right: 11px;
+ color: #fff;
+ text-align: left;
+ border-left: 1px solid #B6D59A;
+ border-bottom: solid 2px #FFF;
+}
+tr {
+ height: 30px;
+}
+td {
+ padding-left: 11px;
+ padding-right: 11px;
+ /* border-left: 1px solid #FFE1C3; */
+ border-left: 1px solid #FFF;
+ border-bottom: solid 1px #ffffff;
+}
+td.first,th.first {
+ border-left: 0px;
+}
+tr.row-a {
+ background: #F8F8F8;
+}
+tr.row-b {
+ background: #EFEFEF;
+}
+/* end - table */
+
/* Footer */
#footer {
--- a/template/submission.html Thu Sep 03 18:52:01 2009 +0530
+++ b/template/submission.html Thu Sep 03 19:07:30 2009 +0530
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>OCR</title>
+<title>Spoken Tutorials</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
@@ -44,15 +44,15 @@
</tr>
{% for participant in participants %}
<tr>
- <td>{{ participant.name }}</td>
- <td>{{ participant.email }}</td>
- <td>{{ participant.language }}</td>
- <td>{{ participant.phonenumber }}</td>
- <td>{{ participant.age }}</td>
- <td>{{ participant.category }}</td>
- <td>{{ file }}</td>
+ <td>{{ participant.participant.name }}</td>
+ <td>{{ participant.participant.email }}</td>
+ <td>{{ participant.participant.language }}</td>
+ <td>{{ participant.participant.age }}</td>
+ <td>{{ participant.participant.phonenumber }}</td>
+ <td>{{ participant.participant.category }}</td>
+ <td><a href="/{{ participant.participant.filename }}">{{ participant.file_name }}</a></td>
</tr>
- {% endfor %}
+ {% endfor %}
</table>
{% endblock %}
</p>
--- a/upload/views.py Thu Sep 03 18:52:01 2009 +0530
+++ b/upload/views.py Thu Sep 03 19:07:30 2009 +0530
@@ -30,8 +30,17 @@
def submission(request, template_name='submission.html'):
"""View to return the submitted videos
"""
+ context_participants = []
+
+ participants = Participant.objects.all()
+ for participant in participants:
+ context_participants.append({
+ 'participant': participant,
+ 'file_name': str(participant.filename).split('/')[-1],
+ })
+
context = {
- 'participants': Participant.objects.all()
+ 'participants': context_participants,
}
return render_to_response(template_name, context)