1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[%# This template should be called with PROCESS before processing
10  # "global/header.html.tmpl" in any template that is going to load the
11  # bug form. It expects only a "bug" object, and can even manage to get
12  # along without that. Some of these variables are just defaults that will
13  # be overridden by the calling templates.
14  #%]
15
16[% filtered_alias = bug.alias.join(', ') FILTER html %]
17[% filtered_desc = bug.short_desc FILTER html %]
18[% filtered_timestamp = bug.delta_ts FILTER time %]
19
20[% subheader = filtered_desc %]
21[% title = "$bug.bug_id – " %]
22[% IF bug.alias.size %]
23  [% title = title _ "($filtered_alias) " %]
24[% END %]
25[% title = title _ filtered_desc %]
26[% generate_api_token = 1 %]
27[% yui = ['autocomplete', 'calendar'] %]
28[% yui.push('container') IF user.can_tag_comments %]
29[% javascript_urls = [ "js/util.js", "js/field.js" ] %]
30[% javascript_urls.push("js/bug.js") IF user.id  %]
31[% javascript_urls.push('js/comment-tagging.js')
32     IF user.id && Param('comment_taggers_group') %]
33[% IF bug.defined %]
34  [% header = "$terms.Bug $bug.bug_id" %]
35  [% header_addl_info = "最終更新: $filtered_timestamp" %]
36  [% unfiltered_title = "$bug.bug_id ? " %]
37  [% IF bug.alias.size %]
38    [% unfiltered_title = unfiltered_title _ "(" _ bug.alias.join(', ') _ ") " %]
39  [% END %]
40  [% unfiltered_title = unfiltered_title _ bug.short_desc %]
41  [% javascript =  BLOCK %]
42    if (history && history.replaceState) {
43      if(!document.location.href.match(/show_bug\.cgi/)) {
44        history.replaceState( null,
45                             "[% unfiltered_title FILTER js %]",
46                             "show_bug.cgi?id=[% bug.bug_id FILTER js %]" );
47        document.title = "[% unfiltered_title FILTER js %]";
48      }
49      if (document.location.href.match(/show_bug\.cgi\?.*list_id=/)) {
50        var href = document.location.href;
51        href = href.replace(/[\?&]+list_id=(\d+|cookie)/, '');
52        history.replaceState(null, "[% unfiltered_title FILTER js %]", href);
53      }
54    }
55    YAHOO.util.Event.onDOMReady(function() {
56      initDirtyFieldTracking();
57
58      [% IF user.id AND user.is_involved_in_bug(bug) %]
59        YAHOO.bugzilla.bugUserLastVisit.update([% bug.bug_id FILTER none %]);
60      [% END %]
61    });
62    [% javascript FILTER none %]
63  [% END %]
64[% END %]
65[% style_urls = ['skins/standard/bug.css'] %]
66[% doc_section = "using/understanding.html" %]
67[% bodyclasses = ['bz_bug',
68                  "bz_status_$bug.bug_status",
69                  "bz_product_$bug.product",
70                  "bz_component_$bug.component",
71                  "bz_bug_$bug.bug_id",
72                  ] %]
73[% FOREACH group = bug.groups_in %]
74  [% bodyclasses.push("bz_group_$group.name") %]
75[% END %]
76
77[% Hook.process('end') %]
78