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

Shawn Moore sartak at bestpractical.com
Wed Feb 9 22:59:18 EST 2011


The branch, master has been updated
       via  fe7bf208562b003453b6fab1326b14203b1e9c37 (commit)
      from  1d89c0e07b22806640be274b2a17e34d98734023 (commit)

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

- Log -----------------------------------------------------------------
commit fe7bf208562b003453b6fab1326b14203b1e9c37
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Feb 9 22:59:10 2011 -0500

    Give CSS classes to everything

diff --git a/lib/Jifty/Plugin/RecordHistory/View.pm b/lib/Jifty/Plugin/RecordHistory/View.pm
index 4233020..5d62262 100644
--- a/lib/Jifty/Plugin/RecordHistory/View.pm
+++ b/lib/Jifty/Plugin/RecordHistory/View.pm
@@ -85,7 +85,10 @@ template 'list' => sub {
 };
 
 template 'no-changes' => sub {
-    p { _("No changes.") };
+    p {
+        { class is 'no-changes' };
+        _("No changes.")
+    };
 };
 
 template 'changes' => sub {
@@ -99,11 +102,16 @@ template 'changes' => sub {
     }
 
     dl {
+        { class is 'changes' };
+
         my $prev_date = '';
         while (my $change = $changes->next) {
             my $date = $change->created_on->ymd;
             if ($date ne $prev_date) {
-                dt { $date };
+                dt {
+                    { class is 'date' };
+                    $date
+                };
                 $prev_date = $date;
             }
 
@@ -119,7 +127,11 @@ template 'change' => sub {
     my $template = 'change-' . $change->type;
 
     dd {
-        div { $change->created_on->hms };
+        { class is 'change' };
+        div {
+            { class is 'time' };
+            $change->created_on->hms
+        };
         show $template => $change
     };
 };
@@ -147,6 +159,7 @@ template 'change-update' => sub {
     };
 
     ul {
+        { class is 'change-fields' };
         while (my $change_field = $change_fields->next) {
             show 'change_field' => $change_field;
         }
@@ -161,7 +174,10 @@ template 'change_field' => sub {
     my $old   = $change_field->old_value;
     my $new   = $change_field->new_value;
 
-    li { _("%1 changed from '%2' to '%3'.", $field, $old, $new) };
+    li {
+        { class is 'change-field' };
+        _("%1 changed from '%2' to '%3'.", $field, $old, $new);
+    };
 };
 
 template 'actor' => sub {

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



More information about the Bps-public-commit mailing list