[Jifty-commit] r6069 - wifty/trunk/lib/Wifty

Jifty commits jifty-commit at lists.jifty.org
Sat Dec 6 09:04:38 EST 2008


Author: ruz
Date: Sat Dec  6 09:04:36 2008
New Revision: 6069

Modified:
   wifty/trunk/lib/Wifty/View.pm

Log:
* string inside if block don't work without outs
* dl for history is not suitable - use ul
* add diff region
* needs CSS

Modified: wifty/trunk/lib/Wifty/View.pm
==============================================================================
--- wifty/trunk/lib/Wifty/View.pm	(original)
+++ wifty/trunk/lib/Wifty/View.pm	Sat Dec  6 09:04:36 2008
@@ -80,21 +80,24 @@
     $revisions->do_search; # avoid count+fetch
     { title is $revisions->count . " revisions of " . $page->name }
 
-    dl { { id is 'history' }
-        while ( my $rev = $revisions->next ) {
-            dt {
-                hyperlink(
-                    label => $rev->created,
-                    url   => '/view/' . $page->name . '/' . $rev->id
-                );
-                if ( $rev->created_by->id ) {
-                    '(' . $rev->created_by->name . ')';
-                } else {
-                    '(Anonymous)';
-                }
-            };
-            dd { length( $rev->content ) . ' bytes' };
-        }
+    ul { { id is 'history' }
+        while ( my $rev = $revisions->next ) { li {
+            hyperlink(
+                label => $rev->created,
+                url   => '/view/' . $page->name . '/' . $rev->id
+            );
+            if ( $rev->created_by->id ) {
+                outs(' ', '(' . $rev->created_by->name . ')');
+            } else {
+                outs(' ', _('(Anonymous)'));
+            }
+            outs( ' ', _('%1 bytes', length $rev->content ) );
+            render_region(
+                'revision-'. $rev->id .'-diff',
+                path => '/helpers/diff',
+                defaults => { page => $page->id, to => $rev->id },
+            )
+        } }
     };
 };
 


More information about the Jifty-commit mailing list