optimize CDR rating after timed rate perf regression, RT#15739
[freeside.git] / httemplate / browse / part_tag.html
index 3bb1661..d0ef72e 100644 (file)
@@ -6,9 +6,10 @@
                                  ],
               'query'         => { 'table' => 'part_tag', },
               'count_query'   => 'SELECT COUNT(*) FROM part_tag',
-              'header'        => [ 'Tag', 'Description', 'Color' ],
-              'fields'        => [ 'tagname', 'tagdesc', 'tagcolor' ],
-              'links'         => [ $link, '', '' ],
+              'header'        => [ 'Tag', 'Message', ],
+              'fields'        => [ 'tagname', 'tagdesc', ],
+              'links'         => [ $link, '', ],
+              'cell_style'    => [ '', $tagdesc_style ],
               'disableable'   => 1,
               'disabled_statuspos' => 1,
           )
@@ -18,6 +19,8 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
+my $tagdesc_style = sub { 'background-color:#'.shift->tagcolor };
+
 my $link = [ "${p}edit/part_tag.html?", 'tagnum' ];
 
 </%init>