From 85b88321baaf99ad7133cbd195018d7ed1cab165 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Tue, 9 Mar 2010 21:10:41 +0100 Subject: [PATCH 1/1] Added history to document view --- apps/wiki/models.py | 4 + .../wiki/templates/wiki/document_details.html | 33 ++++- apps/wiki/views.py | 27 +++- platforma/static/css/master.css | 40 +++++- platforma/static/js/main.js | 127 ++++++++++++++---- platforma/urls.py | 2 + 6 files changed, 201 insertions(+), 32 deletions(-) diff --git a/apps/wiki/models.py b/apps/wiki/models.py index b4adba4a..ecf7837d 100644 --- a/apps/wiki/models.py +++ b/apps/wiki/models.py @@ -22,6 +22,9 @@ class DocumentStorage(object): def all(self): return list(self.vstorage.all_pages()) + + def history(self, title): + return list(self.vstorage.page_history(title)) def _info(self, name): return self.vstorage.page_meta(name) @@ -41,6 +44,7 @@ class Document(object): except DocumentNotFound: return - 1 + @property def plain_text(self): return re.sub(self.META_REGEX, '', self.text, 1) diff --git a/apps/wiki/templates/wiki/document_details.html b/apps/wiki/templates/wiki/document_details.html index e7a33980..95a7c95e 100644 --- a/apps/wiki/templates/wiki/document_details.html +++ b/apps/wiki/templates/wiki/document_details.html @@ -34,14 +34,15 @@ Wersja: {{ document.revision }}

Platforma

    -
  1. {{ document.name }}
  2. -
  3. Kod źródłowy
  4. +
  5. {{ document.name }}
  6. +
  7. Kod źródłowy
  8. +
  9. Historia
-
+
{% toolbar %} @@ -49,7 +50,7 @@
-