From: Łukasz Rekucki Date: Tue, 9 Mar 2010 20:10:41 +0000 (+0100) Subject: Added history to document view X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/85b88321baaf99ad7133cbd195018d7ed1cab165?ds=inline;hp=514e98aeae05045d0086aae39960124a572e646f Added history to document view --- 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 @@
-