[Bps-public-commit] App-Changeloggr branch, master, updated. 29f927b216397247466f992a7d76082d935feff6

sartak at bestpractical.com sartak at bestpractical.com
Wed Apr 29 11:52:37 EDT 2009


The branch, master has been updated
       via  29f927b216397247466f992a7d76082d935feff6 (commit)
      from  f3d6ee3c32a20ab8fced4f1faa936d422ebc854b (commit)

Summary of changes:
 lib/App/Changeloggr/View.pm |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 29f927b216397247466f992a7d76082d935feff6
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 29 11:52:28 2009 -0400

    Link to diffstat and other details

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index a95e93a..4ab5310 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -88,6 +88,24 @@ sub show_change {
             my $links = $change->changelog->commit_links;
             $message = $_->linkify($message) while $_ = $links->next;
             outs_raw( $message );
+
+            my $id = $change->id;
+            hyperlink(
+                label => 'more...',
+                onclick => [{
+                    region       => Jifty->web->qualified_region("change_$id"),
+                    replace_with => '/change/more',
+                    toggle       => 1,
+                    effect       => 'slideDown',
+                    arguments    => {
+                        change => $id,
+                    },
+                },
+                "this.innerHTML = this.innerHTML == 'more...' ? 'less...' : 'more...';",
+            ]);
+            div {
+                render_region("change_$id");
+            };
         };
 
         if ($args{voting_form}) {
@@ -96,6 +114,14 @@ sub show_change {
     };
 }
 
+template '/change/more' => sub {
+    my $change = M('Change', id => get('change'));
+
+    pre {
+        $change->diffstat;
+    };
+};
+
 sub show_vote_form {
     my $change = shift;
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list