[Rt-commit] rt branch, 4.2/more-about-requestor-generalization, updated. rt-4.1.6-327-gbb199d6

Thomas Sibley trs at bestpractical.com
Thu Mar 7 19:49:16 EST 2013


The branch, 4.2/more-about-requestor-generalization has been updated
       via  bb199d632885d90b1f3e528cb80fe017773d1098 (commit)
      from  3d6be52d96eb4cddf303c70c4128aefd41db9d4f (commit)

Summary of changes:
 share/html/Elements/ShowRecord | 41 +++++++++++++++++++++++------------------
 1 file changed, 23 insertions(+), 18 deletions(-)

- Log -----------------------------------------------------------------
commit bb199d632885d90b1f3e528cb80fe017773d1098
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Mar 7 16:47:14 2013 -0800

    Switch to <%perl> blocks in ShowRecord for easier reading
    
    No functional change.

diff --git a/share/html/Elements/ShowRecord b/share/html/Elements/ShowRecord
index cd5ea16..3e98b16 100644
--- a/share/html/Elements/ShowRecord
+++ b/share/html/Elements/ShowRecord
@@ -68,26 +68,31 @@ my $fetch_columnmap = sub {
 };
 </%init>
 <div class="record <% CSSClass($Class) %> <% CSSClass(blessed($Object)) %>">
-% for my $column (@columns) {
-% my $title = $m->interp->apply_escapes($column->{title} || '', 'h');
-% my $attr  = $column->{'attribute'} || $column->{'last_attribute'};
-% unless (defined $column->{title}) {
-%   # No format-supplied title, so use the one from the column map as-is.  It's
-%   # trustworthy.
-%   $title = $fetch_columnmap->($attr,'title',[$attr]);
-% }
+<%perl>
+for my $column (@columns) {
+    my $title = $m->interp->apply_escapes($column->{title} || '', 'h');
+    my $attr  = $column->{'attribute'} || $column->{'last_attribute'};
+
+    unless (defined $column->{title}) {
+        # No format-supplied title, so use the one from the column map as-is.  It's
+        # trustworthy.
+        $title = $fetch_columnmap->($attr,'title',[$attr]);
+    }
+</%perl>
 <div class="record-field <% $Class ? CSSClass("$Class-field") : "" %> <% CSSClass($fetch_columnmap->($attr,'attribute',[$attr],'no_escape')) %>">
 <span class="label"><% loc($title) |n %></span>
-% my @out;
-% foreach my $subcol ( @{ $column->{output} } ) {
-%     my ($col) = ($subcol =~ /^__(.*?)__$/);
-%     unless ( $col ) {
-%         push @out, $subcol;
-%         next;
-%     }
-%     push @out, $fetch_columnmap->($col, 'value', [$Object]);
-% }
-% @out = grep { defined $_ and length $_ } @out;
+<%perl>
+    my @out;
+    foreach my $subcol ( @{ $column->{output} } ) {
+        my ($col) = ($subcol =~ /^__(.*?)__$/);
+        unless ( $col ) {
+            push @out, $subcol;
+            next;
+        }
+        push @out, $fetch_columnmap->($col, 'value', [$Object]);
+    }
+    @out = grep { defined $_ and length $_ } @out;
+</%perl>
 <span class="value"><% join(' ', at out) |n %></span>
 </div>
 % }

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


More information about the Rt-commit mailing list