r84487 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84486‎ | r84487 | r84488 >
Date:21:22, 21 March 2011
Author:pdhanda
Status:deferred
Tags:
Comment:
Updated templates for 4.0. These should now work with all bugzilla skins.
Modified paths:
  • /trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/footer.html.tmpl (modified) (history)
  • /trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/header.html.tmpl (modified) (history)
  • /trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/nav-links.html.tmpl (modified) (history)
  • /trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/site-navigation.html.tmpl (modified) (history)
  • /trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/index.html.tmpl (modified) (history)

Diff [purge]

Index: trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/site-navigation.html.tmpl
@@ -20,7 +20,6 @@
2121 #%]
2222
2323 [%# INTERFACE:
24 - # bug_list: list of integers. List of bug numbers of current query (if any).
2524 # bug.bug_id: integer. Number of current bug (for navigation purposes)
2625 #%]
2726
@@ -32,38 +31,13 @@
3332 [% IF NOT (cgi.user_agent("MSIE [1-6]") OR cgi.user_agent("Mozilla/4")) %]
3433 <link rel="Top" href="[% urlbase FILTER html %]">
3534
36 - [%# *** Bug List Navigation *** %]
37 - [% IF bug_list && bug_list.size > 0 %]
38 - <link rel="Up" href="buglist.cgi?regetlastlist=1">
39 -
40 - <link rel="First" href="show_bug.cgi?id=[% bug_list.first %]">
41 - <link rel="Last" href="show_bug.cgi?id=[% bug_list.last %]">
42 -
43 - [% IF bug && bug.bug_id %]
44 - [% current_bug_idx = lsearch(bug_list, bug.bug_id) %]
45 - [% IF current_bug_idx != -1 %]
46 -
47 - [% IF current_bug_idx > 0 %]
48 - [% prev_bug = current_bug_idx - 1 %]
49 - <link rel="Prev" href="show_bug.cgi?id=[% bug_list.$prev_bug %]">
50 - [% END %]
51 -
52 - [% IF current_bug_idx + 1 < bug_list.size %]
53 - [% next_bug = current_bug_idx + 1 %]
54 - <link rel="Next" href="show_bug.cgi?id=[% bug_list.$next_bug %]">
55 - [% END %]
56 -
57 - [% END %]
58 - [% END %]
59 - [% END %]
60 -
6135 [%# *** Attachment *** %]
6236 [% IF attachment && attachment.bug_id %]
6337 <link rel="Up" href="show_bug.cgi?id=[% attachment.bug_id FILTER none %]">
6438 [% END %]
6539
6640
67 - [%# *** Dependencies, Votes, Activity, Print-version *** %]
 41+ [%# *** Dependencies, Activity, Print-version *** %]
6842 [% IF bug %]
6943 <link rel="Show" title="Dependency Tree"
7044 href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">
@@ -86,12 +60,6 @@
8761 href="[% Param('mybugstemplate').replace('%userid%', user_login) %]">
8862 [% END %]
8963
90 - [% FOREACH q = user.queries %]
91 - <link rel="Saved&nbsp;Searches"
92 - title="[% q.name FILTER html %]"
93 - href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name FILTER url_quote %]">
94 - [% END %]
95 -
9664 [% FOREACH q = user.queries_subscribed %]
9765 <link rel="Saved&nbsp;Search"
9866 title="[% q.name FILTER html %] ([% q.user.login FILTER html %])"
Index: trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/nav-links.html.tmpl
@@ -4,7 +4,7 @@
55 <li><a href="enter_bug.cgi">Enter a new [% terms.bug %]</a></li>
66 [% IF doc_section && Param('docs_urlbase') %]
77 <li>
8 - <a href="[% docs_urlbase _ doc_section FILTER html %]" target="_blank">Help [% doc_section %]</a>
 8+ <a href="[% docs_urlbase _ doc_section FILTER html %]" target="_blank">Help</a>
99 </li>
1010 [% ELSIF Param('docs_urlbase') %]
1111 <li>
Index: trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/header.html.tmpl
@@ -44,6 +44,7 @@
4545 [% DEFAULT
4646 subheader = ""
4747 header_addl_info = ""
 48+ bodyclasses = ['skin-vector']
4849 onload = ""
4950 style_urls = []
5051 yui = []
@@ -64,6 +65,13 @@
6566 datatable => ['json', 'connection', 'datasource', 'element'],
6667 } %]
6768
 69+[%# When using certain YUI modules, we need to process certain
 70+ # extra JS templates.
 71+ #%]
 72+[% SET yui_templates = {
 73+ datatable => ['global/value-descs.js.tmpl'],
 74+} %]
 75+
6876 [%# These are JS URLs that are *always* on the page and come before
6977 # every other JS URL.
7078 #%]
@@ -104,8 +112,12 @@
105113 [%# This allows people to switch back to the "Classic" skin if they
106114 # are in another skin.
107115 #%]
108 - <link rel="stylesheet" href="skins/custom/vector.css" media="screen" />
109 - [% PROCESS "global/site-navigation.html.tmpl" %]
 116+ [% IF user.settings.skin.value=='Wikimedia' %]
 117+ <link rel="stylesheet" href="skins/contrib/Wikimedia/vector.css" media="screen" />
 118+ [% END %]
 119+ <link href="[% 'skins/standard/global.css' FILTER mtime FILTER html %]"
 120+ rel="alternate stylesheet"
 121+ title="[% setting_descs.standard FILTER html %]">
110122 [% FOREACH style_url = css_sets.standard %]
111123 [% PROCESS format_css_link css_set_name = 'standard' %]
112124 [% END %]
@@ -153,7 +165,12 @@
154166 <script type="text/javascript">
155167 <!--
156168 YAHOO.namespace('bugzilla');
157 - if (YAHOO.env.ua.gecko) {
 169+ YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) {
 170+ if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; };
 171+ var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false;
 172+ return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
 173+ };
 174+ if ( "onpagehide" in window || YAHOO.env.ua.gecko) {
158175 YAHOO.util.Event._simpleRemove(window, "unload",
159176 YAHOO.util.Event._unload);
160177 }
@@ -194,6 +211,12 @@
195212 'You must select a Version for this [% terms.bug %].'
196213 }
197214 };
 215+
 216+ [% FOREACH yui_name = yui %]
 217+ [% FOREACH yui_template = yui_templates.$yui_name %]
 218+ [% PROCESS $yui_template %]
 219+ [% END %]
 220+ [% END %]
198221 [% IF javascript %]
199222 [% javascript %]
200223 [% END %]
@@ -222,23 +245,82 @@
223246 # but set the onload attribute in the DEFAULT directive above.
224247 #%]
225248
226 -
227249 <body onload="[% onload %]"
228 - class="skin-vector" dir="ltr" >
 250+ class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') %]
 251+ [% FOREACH class = bodyclasses %]
 252+ [% ' ' %][% class FILTER css_class_quote %]
 253+ [% END %] yui-skin-sam">
229254
230 - <div id="page-base" class="noprint"></div>
 255+[%# Migration note: the following file corresponds to the old Param
 256+ # 'bannerhtml'
 257+ #%]
 258+
 259+<!-- If custom Wikimedia skin -->
 260+[% IF user.settings.skin.value=='Wikimedia' %]
 261+ <div id="page-base" class="noprint"></div>
231262 <div id="head-base" class="noprint"></div>
232263 <!-- content -->
233264 <div id="content-container" >
234265 <a id="top"></a>
235266 <!-- bodyContent -->
236267 <div id="bodyContent">
 268+ [% IF header_addl_info %]
 269+ <p class="header_addl_info">[% header_addl_info %]</p>
 270+ [% END %]
237271
238272
 273+[% ELSE %]
 274+
 275+<div id="header">
 276+
 277+[% INCLUDE global/banner.html.tmpl %]
 278+
 279+<table border="0" cellspacing="0" cellpadding="0" id="titles">
 280+<tr>
 281+ <td id="title">
 282+ <p>[% terms.Bugzilla %]
 283+ [% " &ndash; $header" IF header %]</p>
 284+ </td>
 285+
 286+ [% IF subheader %]
 287+ <td id="subtitle">
 288+ <p class="subheader">[% subheader %]</p>
 289+ </td>
 290+ [% END %]
 291+
239292 [% IF header_addl_info %]
 293+ <td id="information">
240294 <p class="header_addl_info">[% header_addl_info %]</p>
 295+ </td>
241296 [% END %]
 297+</tr>
 298+</table>
242299
 300+<table id="lang_links_container" cellpadding="0" cellspacing="0"
 301+ class="bz_default_hidden"><tr><td>
 302+[% IF Bugzilla.languages.size > 1 %]
 303+ <ul class="links">
 304+ [% FOREACH lang = Bugzilla.languages.sort %]
 305+ <li>[% IF NOT loop.first %]<span class="separator"> | </span>[% END %]
 306+ [% IF lang == current_language %]
 307+ <span class="lang_current">[% lang FILTER html FILTER upper %]</span>
 308+ [% ELSE %]
 309+ <a href="#" onclick="set_language('[% lang FILTER none %]');">
 310+ [%- lang FILTER html FILTER upper %]</a>
 311+ [% END %]
 312+ </li>
 313+ [% END %]
 314+ </ul>
 315+[% END %]
 316+</td></tr></table>
 317+
 318+[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %]
 319+</div> [%# header %]
 320+
 321+<div id="bugzilla-body">
 322+
 323+[% END %] <!-- If custom Wikimedia skin -->
 324+
243325 [% IF Param('announcehtml') %]
244326 [% Param('announcehtml') FILTER none %]
245327 [% END %]
Index: trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/global/footer.html.tmpl
@@ -4,6 +4,7 @@
55 <!-- /bodyContent -->
66 </div>
77 <!-- /content -->
 8+ [% IF user.settings.skin.value=='Wikimedia' %]
89 <!-- header -->
910 <div id="head" class="noprint">
1011 <!-- /search -->
@@ -66,7 +67,7 @@
6768 <!-- panel -->
6869 <div id="panel" class="noprint">
6970 <!-- logo -->
70 - <div id="p-logo"><a style="background-image: url(skins/custom/images/bugzilla-logo.png);" href="./" title="Visit the main page"></a></div>
 71+ <div id="p-logo"><a style="background-image: url(skins/contrib/Wikimedia/images/bugzilla-logo.png);" href="./" title="Visit the main page"></a></div>
7172 <!-- /logo -->
7273 <!-- navigation -->
7374 <div class="portal">
@@ -104,6 +105,7 @@
105106 <!-- /toolbox -->
106107 </div>
107108 <!-- /panel -->
 109+ [% END %]
108110
109111 <!-- footer -->
110112 <div id="footer" >
Index: trunk/tools/bugzilla/bugzilla-4.0/template/en/custom/index.html.tmpl
@@ -37,9 +37,11 @@
3838 <link rel="stylesheet" href="skins/custom/index.css" media="screen" />
3939
4040 <div id="page-index">
 41+ [% IF user.settings.skin.value=='Wikimedia' %]
4142 <div class="intro">
42 - <img src="skins/custom/bugzilla-ayb.png" width="308" height="236" border="2" alt="bugzzz"/>
 43+ <img src="skins/contrib/Wikimedia/bugzilla-ayb.png" width="308" height="236" border="2" alt="bugzzz"/>
4344 </div>
 45+ [% END %]
4446
4547 <p>This is the new bug tracker for <a
4648 href="http://www.mediawiki.org/">MediaWiki</a> and its extensions

Status & tagging log