[MediaWiki-commits] [Gerrit] Replace custom template file by using existing Bugzilla hook - change (wikimedia...modifications)

2014-02-24 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Replace custom template file by using existing Bugzilla hook
..


Replace custom template file by using existing Bugzilla hook

Makes our diff smaller. I guess there's more low hanging fruit.

Bug: 58556
Change-Id: I6edc7f5abb1c1a055132ab2f8bfe43118a7ad6f1
---
A 
extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
D template/en/custom/list/table.html.tmpl
2 files changed, 2 insertions(+), 264 deletions(-)

Approvals:
  Aklapper: Looks good to me, but someone else must approve
  Dzahn: Verified; Looks good to me, approved



diff --git 
a/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
 
b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
new file mode 100644
index 000..29aec4f
--- /dev/null
+++ 
b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
@@ -0,0 +1,2 @@
+[%# See bug 40244 and bug 58556 %]
+[% abbrev.product.maxlength = 13 %]
diff --git a/template/en/custom/list/table.html.tmpl 
b/template/en/custom/list/table.html.tmpl
deleted file mode 100644
index 6e40791..000
--- a/template/en/custom/list/table.html.tmpl
+++ /dev/null
@@ -1,264 +0,0 @@
-[%# The contents of this file are subject to the Mozilla Public
-  # License Version 1.1 (the License); you may not use this file
-  # except in compliance with the License. You may obtain a copy of
-  # the License at http://www.mozilla.org/MPL/
-  #
-  # Software distributed under the License is distributed on an AS
-  # IS basis, WITHOUT WARRANTY OF ANY KIND, either express or
-  # implied. See the License for the specific language governing
-  # rights and limitations under the License.
-  #
-  # The Original Code is the Bugzilla Bug Tracking System.
-  #
-  # The Initial Developer of the Original Code is Netscape Communications
-  # Corporation. Portions created by Netscape are
-  # Copyright (C) 1998 Netscape Communications Corporation. All
-  # Rights Reserved.
-  #
-  # Contributor(s): Myk Melez m...@mozilla.org
-  # Jesse Clark jjclark1...@gmail.com
-  #%]
-
-[%%]
-[%# Initialization   
#%]
-[%%]
-
-[%# Don't display the table or do any processing if there are no bugs 
-  # to display %]
-[% RETURN IF !bugs.size %]
-
-[%# Columns whose titles or values should be abbreviated to make the list
-  # more compact.  For columns whose titles should be abbreviated,
-  # the shortened title is included.  For columns whose values should be
-  # abbreviated, a maximum length is provided along with the ellipsis that
-  # should be added to an abbreviated value, if any.
-  # wrap is set if a column's contents should be allowed to be word-wrapped
-  # by the browser.
-  #%]
-
-[% PROCESS global/field-descs.none.tmpl %]
-[% field_descs.short_short_desc = field_descs.short_desc  %]
-[% field_descs.assigned_to_realname = field_descs.assigned_to %]
-[% field_descs.reporter_realname= field_descs.reporter%]
-[% field_descs.qa_contact_realname  = field_descs.qa_contact  %]
-
-[% abbrev = 
-  {
-bug_severity = { maxlength = 3 , title = Sev } , 
-priority = { maxlength = 7 , title = Pri } , 
-rep_platform = { maxlength = 3 , title = HW } , 
-bug_status   = { maxlength = 4 } , 
-assigned_to  = { maxlength = 30 , ellipsis = ... } , 
-assigned_to_realname = { maxlength = 20 , ellipsis = ... } , 
-reporter = { maxlength = 30 , ellipsis = ... } , 
-reporter_realname= { maxlength = 20 , ellipsis = ... } , 
-qa_contact   = { maxlength = 30 , ellipsis = ... , title = 
QAContact } , 
-qa_contact_realname  = { maxlength = 20 , ellipsis = ... , title = 
QAContact } , 
-resolution= { maxlength = 4 } , 
-short_desc= { wrap = 1 } ,
-short_short_desc  = { maxlength = 60 , ellipsis = ... , wrap = 1 } 
,
-status_whiteboard = { title = Whiteboard , wrap = 1 } , 
-keywords  = { wrap = 1 } ,
-flagtypes.name= { wrap = 1 } ,
-component = { maxlength = 8 , title = Comp } , 
-product   = { maxlength = 13 } , 
-version   = { maxlength = 5 , title = Vers } , 
-op_sys= { maxlength = 4 } , 
-bug_file_loc  = { maxlength = 30 } , 
-target_milestone  = { title = TargetM } , 
-longdescs.count   = { title = # Comments },
-percentage_complete = { format_value = %d %% } , 
-  }
-%]
-
-[% PROCESS bug/time.html.tmpl %]
-
-[% Hook.process(before_table) %]
-
-[%%]
-[%# Table Header 

[MediaWiki-commits] [Gerrit] Replace custom template file by using existing Bugzilla hook - change (wikimedia...modifications)

2014-02-19 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/114145

Change subject: Replace custom template file by using existing Bugzilla hook
..

Replace custom template file by using existing Bugzilla hook

Makes our diff smaller. I guess there's more low hanging fruit.

Bug: 58556
Change-Id: I6edc7f5abb1c1a055132ab2f8bfe43118a7ad6f1
---
A 
extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
D template/en/custom/list/table.html.tmpl
2 files changed, 2 insertions(+), 264 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications 
refs/changes/45/114145/1

diff --git 
a/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
 
b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
new file mode 100644
index 000..29aec4f
--- /dev/null
+++ 
b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl
@@ -0,0 +1,2 @@
+[%# See bug 40244 and bug 58556 %]
+[% abbrev.product.maxlength = 13 %]
diff --git a/template/en/custom/list/table.html.tmpl 
b/template/en/custom/list/table.html.tmpl
deleted file mode 100644
index 6e40791..000
--- a/template/en/custom/list/table.html.tmpl
+++ /dev/null
@@ -1,264 +0,0 @@
-[%# The contents of this file are subject to the Mozilla Public
-  # License Version 1.1 (the License); you may not use this file
-  # except in compliance with the License. You may obtain a copy of
-  # the License at http://www.mozilla.org/MPL/
-  #
-  # Software distributed under the License is distributed on an AS
-  # IS basis, WITHOUT WARRANTY OF ANY KIND, either express or
-  # implied. See the License for the specific language governing
-  # rights and limitations under the License.
-  #
-  # The Original Code is the Bugzilla Bug Tracking System.
-  #
-  # The Initial Developer of the Original Code is Netscape Communications
-  # Corporation. Portions created by Netscape are
-  # Copyright (C) 1998 Netscape Communications Corporation. All
-  # Rights Reserved.
-  #
-  # Contributor(s): Myk Melez m...@mozilla.org
-  # Jesse Clark jjclark1...@gmail.com
-  #%]
-
-[%%]
-[%# Initialization   
#%]
-[%%]
-
-[%# Don't display the table or do any processing if there are no bugs 
-  # to display %]
-[% RETURN IF !bugs.size %]
-
-[%# Columns whose titles or values should be abbreviated to make the list
-  # more compact.  For columns whose titles should be abbreviated,
-  # the shortened title is included.  For columns whose values should be
-  # abbreviated, a maximum length is provided along with the ellipsis that
-  # should be added to an abbreviated value, if any.
-  # wrap is set if a column's contents should be allowed to be word-wrapped
-  # by the browser.
-  #%]
-
-[% PROCESS global/field-descs.none.tmpl %]
-[% field_descs.short_short_desc = field_descs.short_desc  %]
-[% field_descs.assigned_to_realname = field_descs.assigned_to %]
-[% field_descs.reporter_realname= field_descs.reporter%]
-[% field_descs.qa_contact_realname  = field_descs.qa_contact  %]
-
-[% abbrev = 
-  {
-bug_severity = { maxlength = 3 , title = Sev } , 
-priority = { maxlength = 7 , title = Pri } , 
-rep_platform = { maxlength = 3 , title = HW } , 
-bug_status   = { maxlength = 4 } , 
-assigned_to  = { maxlength = 30 , ellipsis = ... } , 
-assigned_to_realname = { maxlength = 20 , ellipsis = ... } , 
-reporter = { maxlength = 30 , ellipsis = ... } , 
-reporter_realname= { maxlength = 20 , ellipsis = ... } , 
-qa_contact   = { maxlength = 30 , ellipsis = ... , title = 
QAContact } , 
-qa_contact_realname  = { maxlength = 20 , ellipsis = ... , title = 
QAContact } , 
-resolution= { maxlength = 4 } , 
-short_desc= { wrap = 1 } ,
-short_short_desc  = { maxlength = 60 , ellipsis = ... , wrap = 1 } 
,
-status_whiteboard = { title = Whiteboard , wrap = 1 } , 
-keywords  = { wrap = 1 } ,
-flagtypes.name= { wrap = 1 } ,
-component = { maxlength = 8 , title = Comp } , 
-product   = { maxlength = 13 } , 
-version   = { maxlength = 5 , title = Vers } , 
-op_sys= { maxlength = 4 } , 
-bug_file_loc  = { maxlength = 30 } , 
-target_milestone  = { title = TargetM } , 
-longdescs.count   = { title = # Comments },
-percentage_complete = { format_value = %d %% } , 
-  }
-%]
-
-[% PROCESS bug/time.html.tmpl %]
-
-[% Hook.process(before_table) %]
-
-[%%]
-[%# Table Header