prettier history view
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 30 Nov 2011 14:28:03 +0000 (15:28 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 30 Nov 2011 14:28:03 +0000 (15:28 +0100)
apps/wiki/templates/wiki/tabs/history_view.html
apps/wiki/views.py
redakcja/static/css/history.css

index 0764f98..c363cef 100644 (file)
                        <tr class="entry row-stub">
                        <td data-stub-value="version"></td>
                        <td>
                        <tr class="entry row-stub">
                        <td data-stub-value="version"></td>
                        <td>
-                               <span data-stub-value="description"></span>
+                <span data-stub-value="date"></span>
+               <br/><span data-stub-value="author"></span>
                                <br />
                                <br />
-               <span data-stub-value="author"></span>, <span data-stub-value="date"></span>
+                               <span data-stub-value="description"></span>
                        </td>
                        <td>
                 <div data-stub-value="publishable"></div>
                        </td>
                        <td>
                 <div data-stub-value="publishable"></div>
index d99bca6..f58e03a 100644 (file)
@@ -9,6 +9,7 @@ from django.http import Http404, HttpResponseForbidden
 from django.middleware.gzip import GZipMiddleware
 from django.utils.decorators import decorator_from_middleware
 from django.utils.encoding import smart_unicode
 from django.middleware.gzip import GZipMiddleware
 from django.utils.decorators import decorator_from_middleware
 from django.utils.encoding import smart_unicode
+from django.utils.formats import localize
 from django.utils.translation import ugettext as _
 from django.views.decorators.http import require_POST, require_GET
 from django.views.generic.simple import direct_to_template
 from django.utils.translation import ugettext as _
 from django.views.decorators.http import require_POST, require_GET
 from django.views.generic.simple import direct_to_template
@@ -270,7 +271,7 @@ def history(request, chunk_id):
                 "version": change.revision,
                 "description": change.description,
                 "author": change.author_str(),
                 "version": change.revision,
                 "description": change.description,
                 "author": change.author_str(),
-                "date": change.created_at,
+                "date": localize(change.created_at),
                 "publishable": _("Publishable") + "\n" if change.publishable else "",
                 "tag": ',\n'.join(unicode(tag) for tag in change.tags.all()),
             })
                 "publishable": _("Publishable") + "\n" if change.publishable else "",
                 "tag": ',\n'.join(unicode(tag) for tag in change.tags.all()),
             })
index b319116..acd9f93 100644 (file)
@@ -79,15 +79,14 @@ table#changes-list-container {
     font-weight: bold;
 }
 
     font-weight: bold;
 }
 
-#changes-list td[data-stub-value =
-'version'] {
+#changes-list td {
     vertical-align: text-top;
 }
 
     vertical-align: text-top;
 }
 
-#changes-list *[data-stub-value =
-'date'], #changes-list *[data-stub-value = 'author'] {
-    font-size: 11px;
+#changes-list *[data-stub-value = 'description'] {
+    font-size: .8em;
     color: gray;
     color: gray;
+    white-space: pre-line;
 }
 
 /*
 }
 
 /*