[Bps-public-commit] App-Changeloggr branch, master, updated. 04d1990b7159beef7c09aaab75cdfd53f3b8b288

sartak at bestpractical.com sartak at bestpractical.com
Wed Apr 29 13:00:21 EDT 2009


The branch, master has been updated
       via  04d1990b7159beef7c09aaab75cdfd53f3b8b288 (commit)
      from  48a66f23f8cb391de9bdee89c79ebf04e4ef8fcc (commit)

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

- Log -----------------------------------------------------------------
commit 04d1990b7159beef7c09aaab75cdfd53f3b8b288
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 29 12:55:03 2009 -0400

    Comments header

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 74339a8..65c3d57 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -118,6 +118,8 @@ sub show_change {
             hr {};
             show_vote_form($change);
         }
+
+        show_vote_comments($change);
     };
 }
 
@@ -169,5 +171,25 @@ sub show_vote_form {
     }
 }
 
+sub show_vote_comments {
+    my $change = shift;
+    my $votes = $change->votes;
+
+    $votes->limit(
+        column   => 'comment',
+        operator => '!=',
+        value    => '',
+    );
+
+    return if $votes->count == 0;
+
+    h5 { "Comments" }
+    ul {
+        while (my $vote = <$votes>) {
+            li { $vote->comment };
+        }
+    }
+}
+
 1;
 

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



More information about the Bps-public-commit mailing list