improvements on talk improvement section
authorLincoln de Sousa <lincoln@alfaiati.net>
Thu, 6 Nov 2008 21:37:07 +0000 (19:37 -0200)
committerLincoln de Sousa <lincoln@alfaiati.net>
Thu, 6 Nov 2008 21:37:07 +0000 (19:37 -0200)
eventos/templates/eventos/talk_improve.html
eventos/views.py
media/css/geral.css

index f6e582f..89c9d2a 100644 (file)
@@ -3,15 +3,26 @@
 {% block content %}
 <h2>Aprimorar Trabalho: {{ talk.titulo }}</h2>
 
-<span>Palestrante: <a href="/speaker/{{ speaker.id }}">{{ speaker.nome }}</a></span> <br />
-<span>trilha: {{ talk.trilha }}</span> <br />
-<span>Tipo: {{ talk.tipo }}</span> <br />
-<span>Descricao curta: {{ talk.descricao_curta}}</span> <br />
-<span>Descricao longa: {{ talk.descricao_longa }}</span> <br />
+<div><strong>Palestrante:</strong> <a href="/speaker/{{ speaker.id }}">{{ speaker.nome }}</a></div>
+<div><strong>trilha:</strong> {{ talk.trilha }}</div>
+<div><strong>Tipo:</strong> {{ talk.tipo }}</div>
+<div><strong>Descricao curta:</strong> {{ talk.descricao_curta}}</div>
+<div><strong>Descricao longa:</strong> {{ talk.descricao_longa }}</div>
+
+{% if improve %}
+<br /><br />
+<strong>{{ len_comments }} COMENTÁRIO(S)</strong>
+{% endif %}
 
-<ul>
+<ul id="comment-list">
 {% for i in improve  %}
-    <li class="{% cycle 'odd' 'even' %}">{{ i.comentario }}
+    <li class="{% cycle 'odd' 'even' %}">
+      <span>Postado por {{ i.usuario }}</span>
+      <em>({{ i.pub_date|date:"d/m/Y" }})</em>
+      <br />
+
+      {{ i.comentario }}
+    </li>
 {% endfor %}
 </ul>
 
 
 {% else %}
 
-Por favor, <a href="/subscribe/">cadastre-se</a> para deixar seu comentário.
+<strong>
+  Por favor, <a href="/subscribe/">cadastre-se</a> para deixar seu
+  comentário.
+</strong>
 
 {% endif %}
 
index a282844..af5d498 100644 (file)
@@ -324,7 +324,8 @@ def talk_improve(request, tid):
         instance = form.save()
         return HttpResponseRedirect('/improve/%d/' % talk.id)
 
-    c = {'talk': talk, 'form': form, 'improve': improve, 'speaker': speaker}
+    c = {'talk': talk, 'form': form, 'improve': improve,
+         'len_comments': len(improve), 'speaker': speaker}
     return render_to_response('eventos/talk_improve.html', Context(c),
                               context_instance=RequestContext(request))
 
index 3e0c27f..e687f53 100644 (file)
@@ -216,3 +216,14 @@ ul.errorlist {
     color: #FF3300;
     padding: 5px;
 }
+
+
+#comment-list li {
+    margin-bottom: 10px;
+    border: solid 1px #dedede;
+    padding: 10px;
+}
+
+#comment-list li.even {
+    background: #f7f7f7;
+}
\ No newline at end of file