summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl
blob: a9d3146f1139f13cb686f9bd97ada10d8243c57e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% IF !javascript_urls %]
  [% javascript_urls = [] %]
[% END %]

[% IF template.name == 'list/list.html.tmpl' %]
  [% javascript_urls.push('extensions/BMO/web/js/sorttable.js') %]
[% END %]

[% IF !bodyclasses %]
  [% bodyclasses = [] %]
[% END %]

[%# Change the background/border for bugs/attachments in certain bug groups %]
[% IF template.name == 'attachment/edit.html.tmpl'
      || template.name == 'attachment/create.html.tmpl'
      || template.name == 'attachment/diff-header.html.tmpl' %]
  [% style_urls.push("skins/standard/bug_groups.css") %]

  [% IF template.name == 'attachment/edit.html.tmpl'
        || template.name == 'attachment/diff-header.html.tmpl' %]
    [% IF bodyclasses == 'no_javascript' %]
      [% bodyclasses = ['no_javascript'] %]
    [% END %]
    [% FOREACH group = attachment.bug.groups_in %]
      [% bodyclasses.push("bz_group_$group.name") %]
    [% END %]
  [% END %]

  [% IF template.name == 'attachment/create.html.tmpl' %]
    [% FOREACH group = bug.groups_in %]
      [% bodyclasses.push("bz_group_$group.name") %]
    [% END %]
  [% END %]
[% END %]

[%# BMO - add user context menu %]
[% IF user.id %]
  [% jquery.push('contextMenu') %]
  [% style_urls.push('js/jquery/plugins/contextMenu/contextMenu.css') %]
  [% javascript_urls.push('extensions/BMO/web/js/edituser_menu.js') %]
[% END %]