changeset 3292:69e39cb66e38

merged main
author Mikko Virkkil? <mvirkkil@cc.hut.fi>
date Mon, 17 Mar 2008 20:31:41 +0100
parents 954300d424eb (current diff) abb32b0af96b (diff)
children 65adbf84a0fb
files contrib/stylesheets/readme.txt contrib/stylesheets/speed.css
diffstat 5 files changed, 14 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Mon Mar 17 20:31:22 2008 +0100
+++ b/MoinMoin/action/info.py	Mon Mar 17 20:31:41 2008 +0100
@@ -5,7 +5,7 @@
     Displays page history, some general page infos and statistics.
 
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
-                2006-2007 MoinMoin:ThomasWaldmann
+                2006-2008 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -74,6 +74,12 @@
     def history(page, pagename, request):
         # show history as default
         _ = request.getText
+        default_count, limit_max_count = request.cfg.history_count
+        try:
+            max_count = int(request.form.get('max_count', [default_count])[0])
+        except:
+            max_count = default_count
+        max_count = min(max_count, limit_max_count)
 
         # open log for this page
         from MoinMoin.util.dataset import TupleDataset, Column
@@ -151,7 +157,7 @@
                 "&nbsp;".join(actions),
             ))
             count += 1
-            if count >= 100:
+            if count >= max_count:
                 break
 
         # print version history
--- a/MoinMoin/config/multiconfig.py	Mon Mar 17 20:31:22 2008 +0100
+++ b/MoinMoin/config/multiconfig.py	Mon Mar 17 20:31:41 2008 +0100
@@ -333,6 +333,8 @@
     html_head_normal  = '''<meta name="robots" content="index,nofollow">\n'''
     html_pagetitle = None
 
+    history_count = (100, 200) # (default_revisions_shown, max_revisions_shown)
+
     interwiki_preferred = [] # list of wiki names to show at top of interwiki list
 
     language_default = 'en'
--- a/contrib/stylesheets/readme.txt	Mon Mar 17 20:31:22 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-speed.css - this file shows how admonitions in restructured text pages
-            can be styled with CSS classes
--- a/contrib/stylesheets/speed.css	Mon Mar 17 20:31:22 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-.admonition_attention, .admonition_caution, .admonition_danger, .admonition_error, .admonition_hint, .admonition_important, .admonition_note, .admonition_tip, .admonition_warning {
-	border: 1pt solid #AEBDCC;
-	border-color: black;
-	background-color: #F3F5F7;
-	padding: 5pt;
-	font-family: courier, monospace;
-
-	padding-left: 50px;
-	margin: 30pt;
-	background-repeat: no-repeat;
-	background-position: 10pt 50% ;
-	background-image: url("/wiki/modern/img/attention.png");
-
-	
-	/* begin css 3 or browser specific rules - do not remove!
-	see: http://forums.techguy.org/archive/index.php/t-249849.html */
-	white-space: pre-wrap;
-	word-wrap: break-word;
-	white-space: -moz-pre-wrap;
-	white-space: -pre-wrap;
-	white-space: -o-pre-wrap;
-	/* end css 3 or browser specific rules */
-
-}
-
-.admonition_warning, .admonition_error, .admonition_danger {
-	background-image: url("/wiki/modern/img/icon-error.png");
-	border-color: red;
-	background-color: #fcc;
-	border-width: 2px;
-}
-
-.admonition_tip, .admonition_hint {
-	background-image: url("/wiki/modern/img/idea.png");
-	border-color: orange;
-	background-color: lightyellow;
-}
-
-.admonition_note {
-	background-image: url("/wiki/modern/img/icon-info.png");
-	border-color: darkblue;
-}
-
-.admonition_attention, .admonition_caution {
-	background-image: url("/wiki/modern/img/alert.png");
-	border-color: red;
-	border-width: 2px;
-	background-color: #eee;
-	
-}
-
-
-
-
-
-
-
--- a/docs/CHANGES	Mon Mar 17 20:31:22 2008 +0100
+++ b/docs/CHANGES	Mon Mar 17 20:31:41 2008 +0100
@@ -95,6 +95,10 @@
     * DocBook-formatter has support for the MoinMoin comment element, though
       only inline comments are likely to be valid since the DocBook remark is
       and inline element.
+    * ?action=info&max_count=42 - show the last 42 history entries of the page.
+      max_count has a default of default_count and a upper limit of
+      limit_max_count - you can configure both in your wiki config:
+      cfg.history_count = (100, 200) # (default_count, limit_max_count) default
 
   Other changes:
     * cfg.show_login is gone, see code in theme/__init__.py, this affects