[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 15bbf2b4f94421b715b99a35136bee91130aee0f

Shawn Moore sartak at bestpractical.com
Wed Feb 9 22:31:11 EST 2011


The branch, master has been updated
       via  15bbf2b4f94421b715b99a35136bee91130aee0f (commit)
      from  4e3e5bbdeda4b9c681cdcd5068e1140f53ca5fa7 (commit)

Summary of changes:
 lib/Jifty/Plugin/RecordHistory/View.pm |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 15bbf2b4f94421b715b99a35136bee91130aee0f
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Feb 9 22:31:01 2011 -0500

    Put change_fields in a ul/li structure

diff --git a/lib/Jifty/Plugin/RecordHistory/View.pm b/lib/Jifty/Plugin/RecordHistory/View.pm
index c8ab183..7043493 100644
--- a/lib/Jifty/Plugin/RecordHistory/View.pm
+++ b/lib/Jifty/Plugin/RecordHistory/View.pm
@@ -112,9 +112,13 @@ template 'change-update' => sub {
     my $change = shift;
 
     my $change_fields = $change->change_fields;
-    while (my $change_field = $change_fields->next) {
-        show 'change_field' => $change_field;
-    }
+    return if !$change_fields->count;
+
+    ul {
+        while (my $change_field = $change_fields->next) {
+            show 'change_field' => $change_field;
+        }
+    };
 };
 
 template 'change_field' => sub {
@@ -125,7 +129,7 @@ template 'change_field' => sub {
     my $old   = $change_field->old_value;
     my $new   = $change_field->new_value;
 
-    outs _("%1 changed from '%2' to '%3'.", $field, $old, $new);
+    li { _("%1 changed from '%2' to '%3'.", $field, $old, $new) };
 };
 
 1;

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



More information about the Bps-public-commit mailing list