From: <psy...@us...> - 2009-06-25 22:20:31
|
Update of /cvsroot/frenchmozilla/bugzilla/template/fr/default/admin In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28315/template/fr/default/admin Modified Files: Tag: BZ_3_4_BRANCH table.html.tmpl Log Message: Bug 304267: Large lists in admin pages fail to display (they take too much time). Index: table.html.tmpl =================================================================== RCS file: /cvsroot/frenchmozilla/bugzilla/template/fr/default/admin/table.html.tmpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -u -d -r1.3 -r1.3.6.1 --- table.html.tmpl 20 Mar 2008 19:12:10 -0000 1.3 +++ table.html.tmpl 25 Jun 2009 22:20:27 -0000 1.3.6.1 @@ -50,14 +50,26 @@ # keys are column names from columns subhashes name field. # # overrides: - # Provides a method for overriding individual table cells. This is - # a hash, whose key is the column name, so the column must be - # named for one of it's cells to be overwritten. The hash value is - # an array. Each item in this array is a hash specifying - # row-matching criteria, and any overridden values. The - # row-matching criteria consist of keys: - # match_field: The name of the row value we want to match - # match_value: The value to match against + # Example: + # overrides { # first hash + # column_name_to_be_overwriten => { # second hash + # name_of_row_to_match_against => { # third hash + # value_to_match_against => { # fourth hash + # content => "some contents" + # override_content => 1 + # } + # } + # } + # } + # + # Provides a method for overriding individual table cells. This is a hash + # (1), whose key is the column name, so the column must be named for + # one of it's cells to be overwritten. The hash value is another hash + # (2). The keys of that second hash are the name of the row to match + # against. The second hash then again points to another hash. Within this + # third hash (3), the keys represent values to match against. The item + # contains a fourth hash (4) specifying overridden values. + # # Each column value mentioned in the 'columns' documentation above # can be overwritten (apart from name and heading). To override a # table-cell value 'xxx', specify a new 'xxx' value, and specify a @@ -98,30 +110,25 @@ yesno_field = c.yesno_field %] - [%# Are there any specific overrides for this column? %] - [% FOREACH override = overrides.${c.name} %] - - [%# Is the override for this row? %] - [% IF override.match_value == row.${override.match_field} %] + [%# Get any specific "important" overrides for this c.name and row.name ? %] + [% SET important = overrides.${c.name}.name.${row.name} %] - [% SET contentlink = override.contentlink - IF override.override_contentlink %] - [% SET content = override.content - IF override.override_content %] - [% SET content_use_field = override.content_use_field - IF override.override_content_use_field %] - [% SET align = override.align - IF override.override_align %] - [% SET class = override.class - IF override.override_class %] - [% SET allow_html_content = override.allow_html_content - IF override.override_allow_html_content %] - [% SET yesno_field = override.yesno_field - IF override.override_yesno_field %] + [% IF important %] + [% FOREACH key IN important.keys %] + [% SET ${key} = important.${key} %] + [% END %] + [% ELSE %] - [% LAST %] + [%# Are there any specific overrides for this column? %] + [% FOREACH match_field = overrides.${c.name}.keys %] + [% override = overrides.${c.name}.${match_field}.${row.$match_field} %] + [% NEXT UNLESS override %] - [% END %] + [% FOREACH key IN override.keys %] + [% SET ${key} = override.${key} %] + [% END %] + [% LAST %] + [% END %] [% END %] <td [% IF align %] align="[% align FILTER html %]" [% END %] |